Skip to Content
HTTP APIAccount

Open orders and trigger orders

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/orders?connection_id=12' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/account/orders

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.

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

Response Body

Orders and triggers of the connection.

application/json
  1. response
connection_id*integer
Formatint64
data*array<>
triggers*array<>
Example Request
curl 'http://127.0.0.1:48180/v1/account/orders?connection_id=12' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
Example Response
{  "connection_id": 12,  "data": [    {      "key": "t-123456789012345678",      "exchange_id": "987654321",      "instrument": "binance:futures:BTCUSDT",      "side": "buy",      "type": "limit",      "price": "67000.1",      "size": "0.012",      "filled": "0",      "remaining": "0.012",      "notional": "804",      "status": "open",      "created_ts": 1730294400123    }  ],  "triggers": [    {      "id": "42",      "instrument": "binance:futures:BTCUSDT",      "type": "stop_loss",      "trigger_price": "66000",      "rule": "price_below_or_equal",      "size": "0.012",      "notional": "804",      "status": "open",      "order_type": "market",      "client_id": "c1",      "created_ts": 1730294400123    }  ]}