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
    • Move Order
    • Balance Adjustment
  • Orderbook
    • Introduction
    • Orderbook Snapshot
    • Orderbook Update
  • Price Ticks
    • Introduction
    • Price Tick
  • Book Ticker
    • Introduction
    • Book Tick
REST APIWebSocket API
REST APIWebSocket API
  1. Trading

Cancel Order by Order ID

You must be authenticated and subscribed to the TRADING channel in order to send trading messages.
Submits a request to cancel an open order by providing a valid order_id.

Cancel Order Request#

{
    "type": "CANCEL_ORDER",
    "order_id": "cf39efef-2924-4713-9fb0-e06bd4acd13d"
 }
CancelOrderOrderIdRequest

Cancel Order by Order ID Response#

Error#

Order not found#

{
    "error": "ORDER_NOT_FOUND",
    "order_id": "cf39efef-2924-4713-9fb0-e06bd4acd13d"
}

Invalid Order ID#

{
    "error": "ORDER_ID_ERROR",
    "payload": {
        "type": "CANCEL_ORDER",
        "order_id": "not valid"
    }
}

Success#

If a cancel order by order ID request is valid, you will receive an Order Closed notification.
Previous
Cancel Order by Client ID
Next
Margin Update
Built with