Skip to Content
PredictorSDK

Matching responses now use one shape for every venue

BreakingSDK

GET /v1/matching-markets/sports used to answer with two shapes. The default markets map gave each venue its own field names: Kalshi's event_ticker and market_tickers, Polymarket's market_slug and token_ids, and everyone else's market_id and outcome_ids. include_submarkets=true then added a canonical_events map with uniform fields. Code reading the default map had to branch per venue, and the obvious shortcut broke on exactly one: a Kalshi row had no market_id, and its event_id, an event ticker, looks just like a market ticker, so sending it to GET /v1/markets/{market_id} answered 404.

There is now one shape. Every response is a canonical_events map. Each event lists its participants and submarkets, and every venue market inside a submarket carries the same references:

{
  "provider": "kalshi",
  "event_id": "KXNBAGAME-26OCT20OKCSAS",
  "market_id": "KXNBAGAME-26OCT20OKCSAS-OKC",
  "market_name": "Oklahoma City wins",
  "outcomes": [
    { "canonical_outcome_key": "winner:okc", "outcome_id": "yes", "side": "yes" },
    { "canonical_outcome_key": "winner:sas", "outcome_id": "no", "side": "no" }
  ]
}

event_id is the venue's parent event, for GET /v1/events/{event_id}. market_id is the market itself, for GET /v1/markets/{market_id}. Each outcome ID is mapped to the canonical outcome it pays on, so you can tell which team a venue's yes backs without parsing tickers. By default each event carries only its full-game moneyline, the same content the old map described; include_submarkets=true adds every other matched submarket.

Lookups take one parameter. The eight per-venue parameters (kalshi_event_ticker, polymarket_market_slug, predict_market_id, sxbet_market_id, alpha_arcade_market_id, prophetx_event_id, prophetx_market_id, pred_market_id) are replaced by source_id={provider}:{id}. It takes any market_id, market_slug or event_id a source market publishes, including SX Bet L… fixture IDs, which no old parameter accepted. event_id still takes canonical keys, and the two now combine, across venues, up to 100 identifiers per request.

What to change

  • Read canonical_events instead of markets. Each old row maps onto the source markets in an event's moneyline submarket:
    • Kalshi's market_tickers are the market_ids of its two entries, one per team.
    • Polymarket's market_slug and token_ids are its entry's market_slug and outcomes[].outcome_id.
    • Every other venue's market_id and outcome_ids are its entry's market_id and outcomes[].outcome_id.
    • A row's event_id is now on each entry.
  • Replace per-venue lookups with source_id. kalshi_event_ticker=KX… becomes source_id=kalshi:KX…, predict_market_id=1784504 becomes source_id=predict:1784504, and so on. Response keys are the identifiers as you sent them, so they now carry the prefix.
  • Lowercase provider replaces uppercase platform (ALPHA-ARCADE became alpha-arcade). It is the value GET /v1/markets/{market_id} and GET /v1/events/{event_id} take as platform, so you can pass it straight through, or build the composite {provider}:{id}.
  • include_submarkets=false no longer omits canonical_events. It returns each event with only its moneyline.

The old lookup parameters now answer 400 with the list of accepted ones. Clients still reading markets get nothing: the Python SDK raises a parsing error, and the TypeScript and Go SDKs see a missing or empty map. Upgrade to the SDK release that follows this change for the new types.

On this page