Place Order
POST/api/v1.0/sim-trade/{acc_id}/ordersPlace 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
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
acc_id | string | path | Yes | Business account ID |
market | int | body | Yes | Account 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 |
symbol | string | body | Yes | Symbol as MARKET.CODE (e.g. US.AAPL, US.AAPL261120C275000) or without the market prefix |
order_type | int | body | Yes | Order type: 1=limit 3=market |
order_side | int | body | Yes | Side: 1=buy 2=sell |
qty | string | body | Yes | Quantity |
price | string | body | No | Order price (required for limit orders; may be omitted for market orders) |
text | string | body | No | Remark (≤100 bytes) |
order_trade_time_type | int | body | No | Trading 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}' | jqResponse Fields
| Field | Type | Description |
|---|---|---|
order_id | string | Order 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"}
}