Skip to Content
HTTP APIAccount

Recent fills

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.

Command
curl 'http://127.0.0.1:48180/v1/account/fills?connection_id=12&limit=50' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/account/fills

Fills of the connection, oldest first. The terminal keeps the last 1000 fills of a connection since the API was switched on.

Authorization

bearerToken account:read
headerAuthorizationBearer <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: account:read

Query Parameters

connection_id*integer

The connection whose account to read.

Formatint64
limit?integer

How many of the last fills.

Range1 <= value <= 1000
Default100
since_ts?integer

Only fills at this exchange time or later. UTC milliseconds.

Formatint64

Response Body

Fills of the connection.

application/json
  1. response
connection_id*integer
Formatint64
data*array<>
Example Request
curl 'http://127.0.0.1:48180/v1/account/fills?connection_id=12&limit=50' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
Example Response
{  "connection_id": 12,  "data": [    {      "trade_id": "t1",      "order_id": "987654321",      "instrument": "binance:futures:BTCUSDT",      "side": "buy",      "price": "67000.1",      "qty": "0.012",      "fee": "0.32",      "fee_currency": "USDT",      "position_side": "long",      "ts": 1730294400123    }  ]}