Skip to Content
HTTP APISettings

Order-book settings of an instrument

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/settings/orderbook?connection_id=12&instrument=binance:futures:BTCUSDT' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/settings/orderbook

The order-book settings of an instrument as a stack of this connection sees them, by category and key. A value comes from the first place that has it: the row of the pair on the connection, the default of the connection, the row of the pair without a connection, the global default. resolved_from names that place.

Authorization

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

Query Parameters

connection_id*integer

The connection of the instrument.

Formatint64
instrument*string

Instrument address, exchange:market:symbol.

Response Body

data[category][key].

application/json
  1. response
connection_id*integer
Formatint64
instrument*string
data*

Categories.

Example Request
curl 'http://127.0.0.1:48180/v1/settings/orderbook?connection_id=12&instrument=binance:futures:BTCUSDT' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
Example Response
{  "connection_id": 12,  "instrument": "binance:futures:BTCUSDT",  "data": {    "general": {      "auto_scroll": {        "value": false,        "resolved_from": "global",        "writable": true      }    },    "trading": {      "slippage": {        "value": {          "value": "0.1",          "type": "percent"        },        "resolved_from": "instrument",        "writable": true      }    }  }}