REST APIMarkets
Get market orderbook
GET
Get the orderbook for a specific market. The order book stores prices based on the Yes outcome.
ApiKeyAuthheader
x-api-key<token>API key authentication via the x-api-key header.
id*integerThe market's ID.
Format
int64application/json; charset=utf-8- response
Response for GET /v1/markets/:id/orderbook
success*booleandata*Orderbook data (single object, not array)
curl -X GET 'https://api.predict.fun/v1/markets/0/orderbook'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 ] ] }}Get market last sale GET
Get the last sale information for a specific market.
Get market quote GET
Get the best bid and best ask resting on a market's order book, quoted against the outcome whose indexSet is 1, as the book itself is. Prefer this over the full order book when only the current price matters, and over the quotes embedded in a market payload, which are deprecated.