Skip to main content

Modify Order

Modify the price and quantity of an order.

API Information

Request Parameters

ParameterLocationTypeRequiredDescription
idpathstringYesOriginal order ID

Body

ParameterTypeRequiredDescription
new_pricestringNoNew price
new_qtystringNoNew quantity
client_order_idstringNoClient 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.

FieldTypeDescription
codeintegerStatus code
messagestringResponse message
data.order_idstringNew order ID
data.client_order_idstringClient order ID
data.statusintegerStatus
data.filled_qtystringFilled quantity
data.filled_quotestringFilled amount
data.tradesarrayTrade 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
}
]
}
}