Volume clusters
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/clusters?instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
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.
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.
int64The latest buckets.
application/json- response
instrument*stringconnection_id*integerint64interval*stringThe interval chosen for the instrument in the terminal.
ts*integerint64data*array<>curl 'http://127.0.0.1:48180/v1/market/clusters?instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "instrument": "binance:futures:BTCUSDT", "connection_id": 12, "interval": "5m", "ts": 1730294400123, "data": [ { "interval": "5m", "ts": 1730294100000, "end_ts": 1730294400000, "volume": "12.5", "buy_volume": "7.25", "sell_volume": "5.25", "trades": 120, "vwap": "67000.1", "min_price": "66990.0", "max_price": "67010.5", "completed": false, "last_trade_ts": 1730294399870, "levels": [ { "price": "67000.1", "volume": "1.25", "buy_volume": "0.75", "sell_volume": "0.5", "buy_trades": 3, "sell_trades": 2 } ] } ]}Top of the order book GET
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.
Open orders and trigger orders GET
Open orders and trigger orders of the connection. `key` and `exchange_id` are `null` until they are known. `size`, `filled` and `remaining` are in the base coin.