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.
curl 'http://127.0.0.1:48180/v1/settings/orderbook?connection_id=12&instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
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.
bearerToken settings: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: settings:read
connection_id*integerThe connection of the instrument.
int64instrument*stringInstrument address, exchange:market:symbol.
data[category][key].
application/json- response
connection_id*integerint64instrument*stringdata*Categories.
curl 'http://127.0.0.1:48180/v1/settings/orderbook?connection_id=12&instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "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 } } }}Change settings PATCH
Up to 100 changes in a request. All of them are checked first, then applied in order. If a change fails to apply, the list stops there and the answer names its number: `changes[2]: …`. Changes already applied are not rolled back. A change is addressed like this: - `scope` is `global` by default. With `instrument` it is always `order_book`. - `instrument` addresses the row of a pair. `connection_id` is then chosen by the common rule. - For `order_book` without `instrument`, `connection_id` addresses the default of that connection. Without it the change goes to the global default. - `connection_id` is not accepted for `global`. Some keys are handled in their own way. `appearance/theme` takes an object with any subset of `stack`, `graphic` and `interface`. Each value is a theme name, and `graphic` and `interface` accept only `light` and `dark`. `hotkeys_*` take `{ "code", "modifiers" }` or `null`. A combination taken by another action is refused. `appearance/font_family` and `localization/current_language` are handled in their own way too. The limit is 5 requests a second for all clients together.
WebSocket stream
One connection for market data, the account, the layout of the windows and settings.