Cancel order
Cancel existing order.
- Modification by client_order_id takes priority over order_id.
- The request supports working only with order_id or only with client_order_id.
- Do not pass both values at the same time.
Error Codes
Error Codes
30- default validation error code31- market validation failed
Errors
Errors
{
"code": 30,
"message": "Validation failed",
"errors": {
"market": ["Market field is required."],
"order_id": ["OrderId field is required."]
}
}
{
"code": 30,
"message": "Validation failed",
"errors": {
"market": ["Market is not available."]
}
}
{
"code": 31,
"message": "Validation failed",
"errors": {
"market": ["Market is not available."]
}
}
{
"code": 30,
"message": "Validation failed",
"errors": {
"order_id": ["OrderId field should be an integer."]
}
}
{
"code": 30,
"message": "Validation failed",
"errors": {
"market": [
"Market field should be a string.",
"Market field format is invalid."
]
}
}
{
"code": 2,
"message": "Inner validation failed",
"errors": {
"order_id": ["Unexecuted order was not found."]
}
}
Authorizations
API Key authentication for private endpoints.
Required headers:
- X-TXC-APIKEY: API key
- X-TXC-PAYLOAD: Base64 encoded JSON payload
- X-TXC-SIGNATURE: HMAC SHA512 signature
Body
"{{request}}"
"{{nonce}}"
Order Id. Example: 4180284841. Required if client_order_id is not set.
123456
Custom client order id. Example: 'customId11'. Required if order_id is not set.
"customId11"
Response
Order cancelled successfully
Order ID
4180284841
Custom client order ID; empty string if not specified
"order1987111"
Deal market
"BTC_USDT"
Order side
"buy"
Order type
"limit"
Timestamp of order creation
1595792396.165973
If order finished - amount in money currency that is finished
"0"
If order finished - amount in stock currency that is finished
"0"
Amount
"0.01"
If order not finished - rest of the amount that must be finished
"0.001"
Fee in money currency when order is filled
"0"
Price
"40000"
PostOnly flag
false
IOC flag
false
Order status
"FILLED"
Self trade prevention mode
"no"
Position side (for collateral orders)
"LONG"
Indicates Retail Price Improvement (RPI) mode for the order.
true