Skip to content

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

ParameterTypeRequiredDescription
acc_idstringYesBusiness account ID.
order_idstringYesOrder ID.

Request Parameters

ParameterTypePositionRequiredDescription
exchangestringbodyYesExchange. Values: US, SEHK, SGX, SSE, SZSE, JP, CA, etc.
qtystringbodyYesThe quantity after the order is changed. The unit of options and futures is "contract".
pricestringbodyYesThe price after the order is changed. 9 decimal places for futures, 4 for others; excess is discarded.
aux_pricestringbodyNoTrigger 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"
  }' | jq

Response 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.