Skip to main content
View on GitHub → Find arbitrage opportunities across prediction markets. One AISA_API_KEY matches equivalent events on Polymarket and Kalshi, compares implied probabilities, and verifies orderbook depth so agents can execute with confidence.

Install

First, install the AIsa CLI if you have not already:
npm install -g @aisa-one/cli
Then install the skill:
aisa skills install prediction-market-arbitrage

What can agents do with it?

Cross-exchange scan

“Find NFL games with priced markets on both Polymarket and Kalshi.”

Spread detection

“Flag outcome pairs where combined implied probability < 1.0.”

Liquidity verification

“Check top-of-book depth on both sides before triggering an alert.”

Sports arb workflow

“Daily NBA/NFL/MLB arbitrage scan with configurable edge threshold.”

Elections & macro

“Surface arbitrage windows on election, rate, and macro event markets.”

Execution prep

“Produce a trade plan with size limits from orderbook depth.”

How it works

1

Match equivalent events

Use the /matching-markets/sports (and /sports/{sport}) endpoints, or slug/ticker heuristics, to pair up a Polymarket token_id with a Kalshi market_ticker for the same real-world event.
2

Compare prices

Call each platform’s market-price endpoint. An arbitrage window exists when the combined implied probabilities of mutually-exclusive outcomes sum to less than 1.0.Example: buying complementary outcomes at 0.40 and 0.55 totals 0.95 — a 0.05 edge before fees.
3

Verify liquidity

Before executing, pull each platform’s orderbook to confirm there’s enough depth at the quoted price to absorb your size.
When passing a path parameter with curl, make sure every {placeholder} is replaced with a concrete value. Literal { and } trigger cURL’s URL globbing syntax and will fail.

Quick start

export AISA_API_KEY="your-key"

1. Match markets

# Find NBA games with markets on both platforms for a specific date
curl "https://api.aisa.one/apis/v1/matching-markets/sports/nba?date=2025-08-16" \
  -H "Authorization: Bearer $AISA_API_KEY"

2. Compare prices

# Polymarket implied probability
curl "https://api.aisa.one/apis/v1/polymarket/market-price/POLY_TOKEN_ID" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Kalshi implied probability
curl "https://api.aisa.one/apis/v1/kalshi/market-price/KALSHI_MARKET_TICKER" \
  -H "Authorization: Bearer $AISA_API_KEY"

3. Check orderbook depth

# Polymarket orderbook
curl "https://api.aisa.one/apis/v1/polymarket/orderbooks?token_id=POLY_TOKEN_ID" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Kalshi orderbook
curl "https://api.aisa.one/apis/v1/kalshi/orderbooks?ticker=KALSHI_MARKET_TICKER" \
  -H "Authorization: Bearer $AISA_API_KEY"

Python client

# Full sports arbitrage scan for a given day
python3 scripts/arbitrage_finder.py find-sports-arbitrage --sport nba --date 2025-08-16

# Check liquidity across a matched pair
python3 scripts/arbitrage_finder.py check-liquidity \
  --polymarket-token-id POLY_TOKEN_ID \
  --kalshi-ticker KALSHI_MARKET_TICKER

# Compare prices only (no liquidity check)
python3 scripts/arbitrage_finder.py compare-prices \
  --polymarket-token-id POLY_TOKEN_ID \
  --kalshi-ticker KALSHI_MARKET_TICKER

Endpoint reference

EndpointMethodPurpose
/matching-markets/sportsGETAll sports
/matching-markets/sports/{sport}GETBy sport
/polymarket/market-price/{token_id}GETPolymarket price
/kalshi/market-price/{ticker}GETKalshi price
/polymarket/orderbooksGETPolymarket orderbook
/kalshi/orderbooksGETKalshi orderbook

Get started

  1. Sign up at aisa.one (new accounts start with $2 free credit).
  2. Generate an API key from the console.
  3. export AISA_API_KEY="your-key" and install the skill:
    npm install -g @aisa-one/cli
    aisa skills install prediction-market-arbitrage
    

Prediction Market API

All Polymarket, Kalshi, and matching-markets endpoints.

Market Data skill

The underlying data skill this one builds on.

Rate Limits

Concurrency caps when running arb scans.