Balances
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/account/balances?connection_id=12' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
The last value the exchange sent for each currency since the API was switched on. The exchange sends a balance only when it changes, so a currency with no change since then is absent. available and locked are null when the exchange does not report them. ts is the exchange time, or the time of receipt when there is none.
bearerToken account: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: account:read
connection_id*integerThe connection whose account to read.
int64Balances of the connection.
application/json- response
connection_id*integerint64data*array<>curl 'http://127.0.0.1:48180/v1/account/balances?connection_id=12' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "connection_id": 12, "data": [ { "currency": "USDT", "total": "1000.5", "available": "900.5", "locked": "100", "ts": 1730294400123 } ]}Open positions GET
Open positions of the connection. `unrealized_pnl` and `mark_price` are computed by the terminal. `mark_price` is the best bid for a long and the best ask for a short.
Recent fills GET
Fills of the connection, oldest first. The terminal keeps the last 1000 fills of a connection since the API was switched on.