Top of the order book
Build your request
Change the values and the command follows. The token is never typed here: the command reads it from the SPECTRE_LOCAL_API_TOKEN environment variable. Run it in your own terminal.
curl 'http://127.0.0.1:48180/v1/market/orderbook?instrument=binance:futures:BTCUSDT&depth=20' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
The top levels of the order book. A level is [price, size]. If the full book does not arrive within 3 s, the answer is 503 unavailable, because an empty book would look like an empty market.
bearerToken market:readAuthorizationBearer <token>The Local API token: spt_ and 64 hex characters. Copy it from Settings App → General → Local API. It is accepted only in the Authorization header. The names listed with an operation are the scopes it requires. The token of the terminal carries all of them.
Scope: market:read
instrument*stringInstrument address, exchange:market:symbol.
connection_id?integerThe connection to read through. Without it the terminal uses the enabled trading connection of the exchange and market, or the read-only one if there is none.
int64depth?integerLevels on each side.
1 <= value <= 20050The top of the book.
application/json- response
instrument*stringconnection_id*integerint64ts*integerint64depth*integerThe requested depth.
bids*array<array<string>>From the best price down.
asks*array<array<string>>From the best price up.
curl 'http://127.0.0.1:48180/v1/market/orderbook?instrument=binance:futures:BTCUSDT&depth=20' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "instrument": "binance:futures:BTCUSDT", "connection_id": 12, "ts": 1730294400123, "depth": 20, "bids": [ [ "67000.1", "1.25" ] ], "asks": [ [ "67000.2", "0.40" ] ]}Market snapshot GET
The latest the terminal knows about the pair. A field is `null` until its data arrives. `best_bid` and `best_ask` are `[price, size]` from the order book.
Volume clusters GET
Up to ten latest cluster buckets, oldest first. The interval is the one chosen for the instrument in the terminal, `5m` by default. For an instrument that is not open in the terminal, the first call starts the calculation and waits up to 3 s for history.