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 | string | body | Yes | Exchange. Values: US, SEHK, SGX, SSE, SZSE, JP, CA, etc. |
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:
json
{
"s": "error",
"errcode": -1200,
"errmsg": "Error message.",
"jump_url": "a jump url",
"need_order_confirm": true,
"confirm_id": "a confirm id"
}TIP
When need_order_confirm is true in the response, you need to call the Order Confirm endpoint.