Skip to Content
HTTP APIConnections

Get a connection

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/connections/12' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/connections/{id}

Authorization

bearerToken connections: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: connections:read

Path Parameters

id*integer

Connection id.

Formatint64

Response Body

The connection.

application/json
  1. response
id*integer
Formatint64
exchange*string

The exchange in lower case, as in an instrument address: binance.

market*string

spot, futures, …

label*string
enabled*boolean
read_only*boolean

A connection without credentials, created by the terminal for market data.

has_credentials*boolean
proxy_bound*boolean

Whether a proxy is bound to the connection.

status*
Example Request
curl 'http://127.0.0.1:48180/v1/connections/12' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
Example Response
{  "id": 12,  "exchange": "binance",  "market": "futures",  "label": "Main",  "enabled": true,  "read_only": false,  "has_credentials": true,  "proxy_bound": false,  "status": {    "state": "connected",    "last_event": {      "code": "connected",      "ts": 1730294400123    }  }}