Market snapshot
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/snapshot?instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
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.
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 snapshot.
application/json- response
instrument*stringconnection_id*integerint64ts*integerint64best_bid*array<string>|nullbest_ask*array<string>|nulllast_trade*|nullmark_price*string|nullticker*|nullcurl 'http://127.0.0.1:48180/v1/market/snapshot?instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "instrument": "binance:futures:BTCUSDT", "connection_id": 12, "ts": 1730294400130, "best_bid": [ "67000.1", "1.25" ], "best_ask": [ "67000.2", "0.40" ], "last_trade": { "id": null, "price": "67000.1", "qty": "0.012", "side": "buy", "ts": 1730294400125, "exchange_ts": 1730294400119 }, "mark_price": "67001.0", "ticker": { "price": "67000.1", "change_24h_pct": "1.25", "volume_24h": "81234.5", "high_24h": null, "low_24h": null, "best_bid": null, "best_ask": null, "ts": 1730294400120 }}Recent trades GET
The last trades of the pair, oldest first. The terminal keeps the last 1000 trades of a pair. If no trade arrives within 3 s, the answer is empty.
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.