Recent trades
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/trades?instrument=binance:futures:BTCUSDT&limit=50' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
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.
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.
int64limit?integerHow many of the last trades. A value outside the range is moved into it.
1 <= value <= 1000100since_ts?integerOnly trades the terminal received at this time or later. UTC milliseconds.
int64Trades of the pair.
application/json- response
instrument*stringconnection_id*integerint64data*array<>curl 'http://127.0.0.1:48180/v1/market/trades?instrument=binance:futures:BTCUSDT&limit=50' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "instrument": "binance:futures:BTCUSDT", "connection_id": 12, "data": [ { "id": null, "price": "67000.1", "qty": "0.012", "side": "buy", "ts": 1730294400125, "exchange_ts": 1730294400119 } ]}Candle history GET
The candle history of an instrument, read the same way the chart of the terminal reads it. `ts` is the opening time of a bar.
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.