REST APIMarkets

Get market orderbook

GET
/markets/{id}/orderbook

Get the orderbook for a specific market. The order book stores prices based on the Yes outcome.

Authorization

ApiKeyAuth
headerx-api-key<token>

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

Path Parameters

id*integer

The market's ID.

Formatint64

Response Body

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

Response for GET /v1/markets/:id/orderbook

success*boolean
data*

Orderbook data (single object, not array)

Example Request
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      ]    ]  }}