REST APIMarkets

Get orderbooks for multiple markets

GET
/markets/orderbooks

Returns orderbooks for up to 100 markets in a single call. Markets without an orderbook are omitted from the response.

Authorization

ApiKeyAuth
headerx-api-key<token>

API key authentication via the x-api-key header.

Query Parameters

ids*array<>

Up to 100 market IDs, comma-separated or repeated. A longer list is rejected.

Response Body

application/json; charset=utf-8
  1. response

Response for GET /v1/markets/orderbooks

success*boolean
data*array<>
Example Request
curl -X GET 'https://api.predict.fun/v1/markets/orderbooks?ids=0'
Example Response
{  "success": true,  "data": [    {      "marketId": 0,      "updateTimestampMs": 0,      "lastOrderSettled": {        "id": "string",        "price": "string",        "kind": "string",        "marketId": 0,        "side": "Ask",        "outcome": "Yes"      },      "asks": [        [          0.1        ]      ],      "bids": [        [          0.1        ]      ]    }  ]}