Cancel all 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.
curl -X POST 'http://127.0.0.1:48180/v1/orders/trigger/cancel-all' \
-H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"connection_id": 12,
"instrument": "binance:futures:BTCUSDT"
}'Cancels the trigger orders of one instrument. Ordinary orders are not touched. Cancel those with POST /orders/cancel-all.
bearerToken trading:writeAuthorizationBearer <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: trading:write
application/json- body
connection_id*integerint64instrument*stringInstrument address, exchange:market:symbol.
The terminal accepted the command. key is null.
application/json- response
The answer of every trading, trigger and leverage command.
accepted*booleanAccepted by the terminal, not by the exchange.
operation_id*stringThe id of the operation in the trading operations log of the terminal. The key of a placed order is t- and this id.
key*|The key of the placed order, t-…, or of the placed trigger: sl_…, tp_… or stop_…. null for cancels, amendments and leverage.
connection_id*integerint64instrument*stringcurl -X POST 'http://127.0.0.1:48180/v1/orders/trigger/cancel-all' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "connection_id": 12, "instrument": "binance:futures:BTCUSDT"}'{ "accepted": true, "operation_id": "173029440000000006", "key": null, "connection_id": 12, "instrument": "binance:futures:BTCUSDT"}Place a trigger order POST
`stop_loss` and `take_profit` are placed on the open position and take only `trigger_price`. `stop` needs its own `side` and `notional`. Without `rule` a buy stop triggers above the market and a sell stop below.
Change the trigger price PATCH
Sets a new trigger price. The terminal cancels the previous trigger and places a new one, as the window does. A `stop` also needs `side`.