Modify Order
PUT/api/v1.0/accounts/{acc_id}/orders/{order_id}Modify an existing order.
Note
Does not support modifying A-share orders.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
acc_id | string | Yes | Business account ID. |
order_id | string | Yes | Order ID. |
Request Parameters
| Parameter | Type | Position | Required | Description |
|---|---|---|---|---|
exchange | Exchange | body | Yes | Exchange. See Naming Dictionary - exchange. |
qty | string | body | Yes | The quantity after the order is changed. The unit of options and futures is "contract". |
price | string | body | Yes | The price after the order is changed. 9 decimal places for futures, 4 for others; excess is discarded. |
aux_price | string | body | No | Trigger price. Required when order type is STOP, STOP_LIMIT, MARKET_IF_TOUCHED, or LIMIT_IF_TOUCHED. The price will be rounded to 3 decimals for securities account, and 9 decimals for futures account. |
Request Example
bash
curl -X PUT 'https://webapi.moomoo.com/api/v1.0/accounts/{acc_id}/orders/{order_id}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <AccessToken>' \
-d '{
"exchange": "US",
"qty": "200",
"price": "155.00"
}' | jqResponse Example
json
{
"s": "ok"
}Failure:
General error:
json
{
"s": "error",
"errcode": -1200,
"errmsg": "Error message."
}Special case - order confirmation required:
json
{
"s": "error",
"errcode": -2100,
"errmsg": "Order confirmation required.",
"need_order_confirm": true,
"confirm_id": "a confirm id"
}Special case - web page required:
json
{
"s": "error",
"errcode": -2101,
"errmsg": "Action required in browser.",
"need_order_confirm": false,
"jump_url": "a jump url"
}TIP
- When
need_order_confirmistruein the response, you need to call the Order Confirm endpoint. - When
jump_urlis present in the response, open the provided URL in a browser to complete the operation.