One Trading API
REST APIWebSocket API
REST APIWebSocket API
  1. Trading
  • Introduction
  • Authenticate
  • Subscribe
  • Ping / Pong
  • Trading
    • Introduction
    • Dead Man Switch (Auto Cancellation)
    • Create Order
    • Cancel All Orders
    • Cancel Order by Client ID
    • Cancel Order by Order ID
    • Margin Update
    • Settlement
    • Funding Payment
    • Order Booked
    • Order Rejected
    • Order Closed
    • Trade Executed
    • Order Fully Filled
    • Balance Adjustment
  • Orderbook
    • Introduction
    • Orderbook Snapshot
    • Orderbook Update
  • Price Ticks
    • Introduction
    • Price Tick
  • Book Ticker
    • Introduction
    • Book Tick
  1. Trading

Cancel All Orders

You must be authenticated and subscribed to the TRADING channel in order to send trading messages.
Allows a client to cancel all open orders, an optional instrument_code can be passed, which will result in even faster cancellations.

Cancel All Orders Request#

{
    "type": "CANCEL_ALL_ORDERS",
    "instrument_code": "BTC_EUR" // Optional
 }
CancelAllOrdersRequest
type
enum<string> 
required
Allowed value:
CANCEL_ALL_ORDERS
instrument_code
string 
optional
Optional instrument code to cancel orders only on this market.

Cancel All Orders Response#

Error#

No orders to cancel#

{
    "error": "no orders to cancel"
}

Invalid request#

{
    "error": "PAIR_ERROR",
    "payload": {
        "type": "CANCEL_ALL_ORDERS",
        "instrument_code": "BTC_PEPE"
    }
}

Success#

On initial request, if there are open orders, you will receive a notification that the cancellations are booked.
{
    "channel_name": "TRADING",
    "type": "BOOKED",
    "details": "cancelling 2 orders"
}
This will be followed by separate Order Closed notifications for each order.
Previous
Create Order
Next
Cancel Order by Client ID
Built with