cURL
curl --request POST \
--url https://test.deribit.com/api/v2/private/cancel_all_by_instrument \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 4122,
"method": "private/cancel_all_by_instrument",
"params": {
"instrument_name": "ETH-22FEB19-120-P",
"type": "all"
}
}'{
"jsonrpc": "2.0",
"id": 4122,
"result": 7
}Trading
private/cancel_all_by_instrument
Cancels all open orders for a specific instrument. This is useful for quickly clearing all orders for a single instrument.
Orders can be optionally filtered by order type (limit, market, stop, etc.). Use the detailed parameter to receive a list of all cancelled orders. The include_combos parameter can be used to include combo orders in the cancellation.
Scope: trade:read_write
cURL
curl --request POST \
--url https://test.deribit.com/api/v2/private/cancel_all_by_instrument \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 4122,
"method": "private/cancel_all_by_instrument",
"params": {
"instrument_name": "ETH-22FEB19-120-P",
"type": "all"
}
}'{
"jsonrpc": "2.0",
"id": 4122,
"result": 7
}Query Parameters
When detailed is set to true, the output format is changed to include a list of all cancelled orders.
📖 Related Article: Detailed Response for Cancel Methods
Default: false
Was this page helpful?