Skip to content

Modify Order ​

POST /api/v1.0/sim-trade/{acc_id}/orders/{order_id}/modify

Modify a simulated trading order. Send both new_qty and new_price, using the original value for the one that does not change. For market orders, pass the order's current price as new_price; the server reprices it. Only orders with status=2 (Submitted) can be modified.

Parameters ​

ParameterTypeLocationRequiredDescription
acc_idstringpathYesBusiness account ID
order_idstringpathYesOriginal order ID
marketintbodyYesAccount market ID (the account's market_id from the account list, e.g. 1=HK stocks 100=US margin); must match the account of acc_id
new_qtystringbodyYesNew order quantity (required; pass the original value if unchanged)
new_pricestringbodyYesNew order price (required; pass the original value if unchanged, or the order's current price for market orders)

Request Example ​

bash
curl -s -X POST "https://webapi.futunn.com/api/v1.0/sim-trade/80306537/orders/1294505/modify" \
  -H "Authorization: Bearer <AccessToken>" \
  -H "Content-Type: application/json" \
  -d '{"market":100,"new_qty":"2","new_price":"1.01"}' | jq

Response Fields ​

FieldTypeDescription
order_idstringModified order ID (echo of the path parameter)

Response Example ​

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "order_id": "1294505"
  }
}

Error response ​

HTTP status remains 200. A failed request returns ret_code != 0 and an error object.

json
{
  "ret_code": -3,
  "ret_msg": "invalid request",
  "error": {"code": "invalid_parameter", "message": "invalid request"}
}