GET /api/v1/market/orderbook/{market_id}
Returns the current orderbook for a market, showing all open limit orders. Bids are sorted from highest to lowest price, asks from lowest to highest.
Authenticationβ
None required. This is a public endpoint.
Requestβ
Path Parametersβ
| Parameter | Type | Required | Description |
|---|---|---|---|
market_id | integer | Yes | The market ID |
Exampleβ
curl https://intotes.com/api/v1/market/orderbook/101
Responseβ
200 OKβ
Prices are expressed as integers in the range 0--10000, representing a probability from 0% to 100% with two decimal places of precision (e.g., 5500 = 55.00%). Amounts are in share cents.
{
"market_id": 101,
"bids": [
{
"price": 5500,
"amount": 10000
},
{
"price": 5400,
"amount": 25000
},
{
"price": 5200,
"amount": 15000
}
],
"asks": [
{
"price": 5600,
"amount": 12000
},
{
"price": 5800,
"amount": 8000
},
{
"price": 6000,
"amount": 30000
}
]
}
Fieldsβ
| Field | Type | Description |
|---|---|---|
market_id | integer | The market this orderbook belongs to |
bids | array | Buy orders, sorted highest price first |
bids[].price | integer | Bid price (0--10000 scale) |
bids[].amount | integer | Bid size in share cents |
asks | array | Sell orders, sorted lowest price first |
asks[].price | integer | Ask price (0--10000 scale) |
asks[].amount | integer | Ask size in share cents |
Price Scaleβ
The orderbook uses an integer price scale from 0 to 10000:
| Price Value | Probability | Meaning |
|---|---|---|
| 0 | 0.00% | Impossible |
| 2500 | 25.00% | Low probability |
| 5000 | 50.00% | Even odds |
| 7500 | 75.00% | High probability |
| 10000 | 100.00% | Certain |
Errorsβ
| Status | Code | Description |
|---|---|---|
| 400 | invalid_market_id | The market ID is not a valid integer |
| 404 | market_not_found | No market exists with the given ID |
| 500 | internal_error | Unexpected server error |