Leverage and margin mode
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/leverage?connection_id=12&instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
The leverage the terminal has loaded for the instrument. It is loaded when the instrument is chosen in the window or when the leverage is set with POST. Before that the answer is 409 not_active.
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 of the instrument.
int64instrument*stringInstrument address, exchange:market:symbol.
Leverage of the instrument.
application/json- response
connection_id*integerint64instrument*stringleverage*integermax_leverage*integermode*stringThe leverage mode of the terminal, not of the exchange.
"manual""max""smart"margin_mode*MarginMode"cross""isolated"curl 'http://127.0.0.1:48180/v1/account/leverage?connection_id=12&instrument=binance:futures:BTCUSDT' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"{ "connection_id": 12, "instrument": "binance:futures:BTCUSDT", "leverage": 10, "max_leverage": 125, "mode": "manual", "margin_mode": "cross"}