Skip to content

Place Order ​

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

Place a simulated trading order. Quantity and price are strings; limit orders require price, market orders may omit it. Orders are not idempotent: on timeout or an unknown result, check today's orders before retrying. If the server does not create the order (for example, market does not match the account), the API returns -5 backend_biz_error.

Parameters ​

ParameterTypeLocationRequiredDescription
acc_idstringpathYesBusiness account 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
symbolstringbodyYesSymbol as MARKET.CODE (e.g. US.AAPL, US.AAPL261120C275000) or without the market prefix
order_typeintbodyYesOrder type: 1=limit 3=market
order_sideintbodyYesSide: 1=buy 2=sell
qtystringbodyYesQuantity
pricestringbodyNoOrder price (required for limit orders; may be omitted for market orders)
textstringbodyNoRemark (≤100 bytes)
order_trade_time_typeintbodyNoTrading session: 0=unset 1=regular only 2=include pre/post-market (US margin account)

Request Example ​

bash
curl -s -X POST "https://webapi.futunn.com/api/v1.0/sim-trade/80306537/orders" \
  -H "Authorization: Bearer <AccessToken>" \
  -H "Content-Type: application/json" \
  -d '{"market":100,"symbol":"US.AAPL","order_type":1,"order_side":1,"qty":"1","price":"1","order_trade_time_type":1}' | jq

Response Fields ​

FieldTypeDescription
order_idstringOrder ID

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"}
}

If the server does not create the order (for example, market does not match the account), the API also returns an error:

json
{
  "ret_code": -5,
  "ret_msg": "backend business error",
  "error": {"code": "backend_biz_error", "message": "backend business error"}
}