Modify Order
Modify the price and quantity of an order.
API Information
- Method:
PUT - Path:
/api/v1/orders/{id} - Authentication: Requires signature authentication (see Common Module · Signature Specification)
Request Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes | Original order ID |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| new_price | string | No | New price |
| new_qty | string | No | New quantity |
| client_order_id | string | No | Client order ID for new order |
Request Example
PUT /api/v1/orders/1234567890123456789
{
"new_price": "31000",
"new_qty": "0.2",
"client_order_id": "my-new-order-001"
}
Response Fields
After modification, returns new order's placement response, fields same as order placement interface.
| Field | Type | Description |
|---|---|---|
| code | integer | Status code |
| message | string | Response message |
| data.order_id | string | New order ID |
| data.client_order_id | string | Client order ID |
| data.status | integer | Status |
| data.filled_qty | string | Filled quantity |
| data.filled_quote | string | Filled amount |
| data.trades | array | Trade details |
Response Example
{
"code": 0,
"message": "success",
"data": {
"order_id": "1234567890123456789",
"client_order_id": "my-order-001",
"status": 1,
"filled_qty": "0.05",
"filled_quote": "1500",
"trades": [
{
"maker_order_id": "1234567890123",
"match_id": "9876543210",
"price": "30000",
"qty": "0.05",
"quote_qty": "1500",
"trade_index": 0
}
]
}
}