Modify order
The endpoint modifies existing order.
Supported order types: limit, stop limit, stop market.
Request must contain one of the following parameters: amount, price, activationPrice.
- Use total parameter instead of amount for modify buy stop market order.
- Modification by client_order_id takes priority.
- 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
Status 400 (client errors): 1, 2, 6, 20, 24, 101, 158
Status 422 (business logic): 10, 11, 12, 13, 14, 15, 16, 17, 25, 27, 40, 42, 51, 103, 104, 105, 106, 111, 112, 113, 114, 115, 150, 151, 152, 153, 155, 157, 159, 160, 161, 162, 163, 250, 251, 300, 302, 330
Errors
Errors
{
"code": 31,
"message": "Validation failed",
"errors": {
"market": ["Market is not available."]
}
}
{
"code": 2,
"message": "Inner validation failed",
"errors": {
"order_id": ["Unexecuted order was not found."]
}
}
{
"code": 10,
"message": "Validation failed",
"errors": {
"amount": ["Not enough balance."]
}
}
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}}"
Active order id. Required if client_order_id is not set.
4180284841
Identifier should be unique and contain letters, dashes, numbers, dots or underscores. Required if order_id is not set.
"order1987111"
Response
Order modified 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