Get Order Book
Returns the current order book snapshot for a single token, including aggregated bid and ask levels alongside the last trade price.
Endpoint
Section titled “Endpoint”GET /book
Base URL: https://api.openfish.fun
Authentication
Section titled “Authentication”None required.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
token_id | string | Yes | Token ID (asset ID) |
Response
Section titled “Response”{ "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"}OrderBookSummary Schema
Section titled “OrderBookSummary Schema”| Field | Type | Description |
|---|---|---|
market | string | Condition ID |
asset_id | string | Token ID |
timestamp | string | Snapshot timestamp in milliseconds |
hash | string | Deterministic hash derived from the timestamp and bid/ask depth, useful for detecting changes between polls |
bids | array | Bid levels ordered by price descending |
asks | array | Ask levels ordered by price ascending |
min_order_size | integer | Minimum allowed order size |
tick_size | string | Minimum price increment (sourced from the clob_markets table) |
neg_risk | boolean | Whether negative risk is active for this market (sourced from the clob_markets table) |
last_trade_price | string | Most recent trade price |
OrderSummary Schema
Section titled “OrderSummary Schema”| Field | Type | Description |
|---|---|---|
price | string | Price level |
size | string | Aggregate size at this level |
Example
Section titled “Example”curl "https://api.openfish.fun/book?token_id=0xabc123..."