Skip to content

Get Order Book

Returns the current order book snapshot for a single token, including aggregated bid and ask levels alongside the last trade price.

GET /book

Base URL: https://api.openfish.fun

None required.

ParameterTypeRequiredDescription
token_idstringYesToken ID (asset ID)
{
"market": "0x0000...0001",
"asset_id": "0xabc123...",
"timestamp": "1700000000000",
"hash": "a1b2c3d4e5f67890",
"bids": [
{ "price": "0.45", "size": "100.00" },
{ "price": "0.44", "size": "200.00" }
],
"asks": [
{ "price": "0.46", "size": "150.00" },
{ "price": "0.47", "size": "250.00" }
],
"min_order_size": 1,
"tick_size": "0.01",
"neg_risk": false,
"last_trade_price": "0.4500"
}
FieldTypeDescription
marketstringCondition ID
asset_idstringToken ID
timestampstringSnapshot timestamp in milliseconds
hashstringDeterministic hash derived from the timestamp and bid/ask depth, useful for detecting changes between polls
bidsarrayBid levels ordered by price descending
asksarrayAsk levels ordered by price ascending
min_order_sizeintegerMinimum allowed order size
tick_sizestringMinimum price increment (sourced from the clob_markets table)
neg_riskbooleanWhether negative risk is active for this market (sourced from the clob_markets table)
last_trade_pricestringMost recent trade price
FieldTypeDescription
pricestringPrice level
sizestringAggregate size at this level
Terminal window
curl "https://api.openfish.fun/book?token_id=0xabc123..."