Skip to content

Get Order Books

Fetches order book snapshots for several tokens at once.

POST /books

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

None required.

A JSON array where each element identifies a token by its ID.

[
{ "token_id": "0xabc123..." },
{ "token_id": "0xdef456..." }
]

A JSON array of order book summaries — one per requested token. Each entry conforms to the schema described in Get Order Book.

[
{
"market": "0x0000...0001",
"asset_id": "0xabc123...",
"timestamp": "1700000000000",
"hash": "",
"bids": [{ "price": "0.45", "size": "100.00" }],
"asks": [{ "price": "0.46", "size": "150.00" }],
"min_order_size": 1,
"tick_size": "0.01",
"neg_risk": false,
"last_trade_price": "0.4500"
},
{
"market": "0x0000...0002",
"asset_id": "0xdef456...",
"timestamp": "1700000000000",
"hash": "",
"bids": [],
"asks": [],
"min_order_size": 1,
"tick_size": "0.01",
"neg_risk": false,
"last_trade_price": "0.5000"
}
]
Terminal window
curl -X POST https://api.openfish.fun/books \
-H "Content-Type: application/json" \
-d '[{"token_id":"0xabc123..."},{"token_id":"0xdef456..."}]'