Skip to content

Place Order ​

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

Place a simulated trade order. Limit orders require price; quantity and price are strings.

Parameters ​

ParameterTypeLocationRequiredDescription
acc_idstringpathYesBusiness account ID
marketintbodyYesMarket (from market_id in account list)
symbolstringbodyYesSecurity symbol
order_typeintbodyYes1=Limit 3=Market
order_sideintbodyYes1=Buy 2=Sell 3=Short Sell 4=Buy Back
qtystringbodyYesQuantity
pricestringbodyNoPrice (required for limit orders)
textstringbodyNoRemark (≤100 bytes)
order_trade_time_typeintbodyNoTrading session: 0=unset, 1=regular session only, 2=include pre/post-market (supported by US margin accounts)

Request Example ​

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

Response Fields ​

FieldTypeDescription
order_idint64Order ID

Response Example ​

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

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