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 Order by Client 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 client_id.
Note
If you have created multiple orders with the same client_id, only the most recent will be cancelled with this request. It is your responsibility to ensure uniqueness in your client_ids.

Cancel Order by Client ID Request#

{
    "type": "CANCEL_ORDER",
    "client_id": "8fd80590-4679-4e7d-9ef9-4346dadb5c8f"
 }
CancelOrderClientIdRequest
type
enum<string> 
required
Allowed value:
CANCEL_ORDER
client_id
string <uuid>
required
Unique client id of the order to cancel

Cancel Order by Client ID Response#

Error#

Order not found#

{
    "error": "ORDER_NOT_FOUND",
    "client_id": "8fd80590-4679-4e7d-9ef9-4346dadb5c8f"
}

Invalid Client ID#

{
    "error": "CLIENT_ID_ERROR",
    "payload": {
        "type": "CANCEL_ORDER",
        "client_id": "not valid"
    }
}

Success#

If a cancel order by client ID request is valid, you will receive an Order Closed notification.
Previous
Cancel All Orders
Next
Cancel Order by Order ID
Built with