API Reference

Cancel Algo Order

Rate Limit: 3 requests per 10 seconds

Tip:
You can cancel order by websocket after login.

Request

{
  "id": "XXX",
  "action": "cancel_order",  
  "args":  
  {  
  	"algoOrderId": "XXX"
    "clientOrderId": "XXXX",  
    "orderId": "XXX"
  }  
}
Field nameTypeNecessaryRemarks
idStringNclient request id
actionStringYcancel_order
argsObjectYrequest params
> algoOrderIdStringNAlgo Order ID
> orderIdStringNOrder ID
> clientOrderIdStringNCustomer defined order ID ,only support letters(a-z) and numbers(0-9)

Tip:For TPSL, either algoOrderId or clientOrderId must be sent; For ATTACHED_TPSL, either orderId or clientOrderId must be sent.

Response

Success example:

{
  "id": "XXXX", // request id
  "event": "cancel_order",  
  "code": "0",  
  "msg": "",
  "data": {
  	"algoOrderId": "XXXX"
    "clientOrderId": "XXXX"
    "orderId": "XXXXX",
  }
}

Fail example:

{  
  "id":"***", // 
  "event": "error",  
  "code": "60009",  
  "msg": "Cancel Order failed."  
}
Field nameTypeRemarks
idStringclient request id
eventStringEvent
codeStringCode
msgStringMsg
dataObjectresponse data
> algoOrderIdStringAlgo Order ID
> orderIdStringOrder ID
> clientOrderIdStringCustomer-defined order ID