curl --request POST \
--url https://test.deribit.com/api/v2/private/cancel_all_by_kind_or_type \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "private/cancel_all_by_kind_or_type",
"params": {
"currency": [
"BTC",
"ETH"
],
"kind": "future"
}
}'{
"jsonrpc": "2.0",
"id": 2,
"result": 6
}private/cancel_all_by_kind_or_type
Cancels all open orders in one or more currencies, optionally filtered by instrument kind and/or order type. This provides flexible bulk cancellation across multiple currencies.
Specify one or more currencies, and optionally filter by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the detailed parameter to receive a list of all cancelled orders.
include_starbase_orders only applies to a full cancel-all (order type all); it is ignored when cancelling a specific order type such as quote.
Scope: trade:read_write
curl --request POST \
--url https://test.deribit.com/api/v2/private/cancel_all_by_kind_or_type \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "private/cancel_all_by_kind_or_type",
"params": {
"currency": [
"BTC",
"ETH"
],
"kind": "future"
}
}'{
"jsonrpc": "2.0",
"id": 2,
"result": 6
}Query Parameters
Instrument kind, "combo" for any combo or "any" for all. If not provided instruments of all kinds are considered
Instrument kind: "future", "option", "spot", "future_combo", "option_combo", "combo" for any combo or "any" for all
future, option, spot, future_combo, option_combo, combo, any 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
When set to true, the subaccount's Starbase direct-access open orders are also cancelled, and the number cancelled is included in the returned cancelled-order count. Default: false.
Cannot be combined with detailed (doing so returns an invalid_params error). Note that freeze_quotes is not enforced for Starbase orders.
Was this page helpful?