# cancel_all_orders

cancel_all_orders cancel_by

The cancel_all_orders cancels the active orders created by the Komodo DeFi Framework node by specified condition.

# Arguments

Structure Type Description
cancel_by object orders matching this condition are cancelled
cancel_by.type string All to cancel all orders; Pair to cancel all orders for specific coin pairs; Coin to cancel all orders for a specific coin
cancel_by.data object additional data the cancel condition; present with Pair and Coin types
cancel_by.data.base string base coin of the pair; Pair type only
cancel_by.data.rel string rel coin of the pair; Pair type only
cancel_by.data.ticker string order is cancelled if it uses ticker as base or rel; Coin type only

# Response

Structure Type Description
result object
result.cancelled array of strings (uuids) uuids of cancelled orders
result.currently_matching array of strings (uuids) uuids of the orders being matched with other orders; these are not cancelled even if they fit cancel condition

# 📌 Examples

# Command (All orders)

curl --url "" --data "{\"userpass\":\"$userpass\",\"method\":\"cancel_all_orders\",\"cancel_by\":{\"type\":\"All\"}}"

# Command (Cancel by pair)

curl --url "" --data "{\"userpass\":\"$userpass\",\"method\":\"cancel_all_orders\",\"cancel_by\":{\"type\":\"Pair\",\"data\":{\"base\":\"RICK\",\"rel\":\"MORTY\"}}}"

# Command (Cancel by coin)

curl --url "" --data "{\"userpass\":\"$userpass\",\"method\":\"cancel_all_orders\",\"cancel_by\":{\"type\":\"Coin\",\"data\":{\"ticker\":\"RICK\"}}}"