Kalshi Orderbook History

GET/gateway/v1/prediction-market/kalshi/orderbooks

Historical orderbook snapshots for a Kalshi market. Returns yes-side bid/ask levels. Timestamps in milliseconds, prices in cents.

Data refresh: ~5 minutes

Query Parameters

tickerstringrequired

Kalshi market ticker

Example: KXCITRINI-28JUL01
start_timeinteger

Start time in Unix milliseconds. 0 means 7 days ago.

end_timeinteger

End time in Unix milliseconds. 0 means current time.

limitinteger

Maximum number of snapshots to return

pagination_keystring

Base64 cursor for pagination

Kalshi Orderbook History
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/prediction-market/kalshi/orderbooks?ticker=KXCITRINI-28JUL01', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/V2KalshiOrderbooksResponse.json",
  "pagination": {
    "count": 123,
    "has_more": true,
    "limit": 123,
    "pagination_key": "<string>"
  },
  "snapshots": [
    {
      "ask_depth": 123,
      "best_ask": 123,
      "best_bid": 123,
      "bid_depth": 123,
      "sequence": 123,
      "ticker": "<string>",
      "timestamp": 123,
      "yes_asks": [
        {
          "price": 123,
          "size": 123
        }
      ],
      "yes_bids": [
        {
          "price": 123,
          "size": 123
        }
      ]
    }
  ]
}