v1

latestOpenAPI 3.1.02026-07-243035381.4 MB
Prediction API

Get current market orderbook

/v4/data/prediction/markets/{id}/orderbook

100 credits per API call

Current orderbook snapshot for one side of a market. The orderbook is per-outcome — pass side=yes or side=no to choose which outcome's book you want. Returns top-of-book through to depth levels of bids and asks, with a computed quoted-liquidity figure within 1% and 5% of the midpoint.

Other notes

  • side is required.
  • hash is a content fingerprint of the book snapshot useful for ETag-style change detection on poll. Populated on Polymarket; null on Kalshi (no equivalent upstream field).
  • Returns 404 when the market does not exist on either platform.
get/v4/data/prediction/markets/{id}/orderbook

Path parameters

idstring required
Example:KXELONMARS-99

Platform-native market identifier.

Query parameters

side'yes' | 'no' required

Which outcome of a binary market a row refers to.

Example:yes

Which outcome's orderbook to return.

depthinteger
Example:20

Number of levels to return per side. Defaults to 20 when omitted.

Response

OK

Example response

{
  "data": {
    "marketId": "KXELONMARS-99",
    "platform": "polymarket",
    "side": "yes",
    "timestamp": "2026-05-18T12:34:56Z",
    "hash": "0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b",
    "bids": [
      {
        "price": 0.41,
        "size": 1250
      }
    ],
    "asks": [
      {
        "price": 0.41,
        "size": 1250
      }
    ],
    "spread": 0.02,
    "midPrice": 0.42,
    "liquidity": {
      "within1pct": 18450.2,
      "within5pct": 92310.8
    }
  }
}