Skip to content

Place Order

POST /api/v1.0/accounts/{acc_id}/orders

Place a new order.

Path Parameters

ParameterTypeRequiredDescription
acc_idstringYesBusiness account ID.

Request Parameters

ParameterTypePositionRequiredDescription
codestringbodyYesTradable symbol. Format: exchange.symbol, e.g. US.AAPL, US.AAPL250926C235000
qtystringbodyYesOrder quantity. The unit of options and futures is "contract".
pricestringbodyNoOrder price. 4 decimal place accuracy (9 for futures), excess part will be rounded.
sidestringbodyYesTrading direction. Values: BUY, SELL, SELL_SHORT, BUY_BACK
order_typestringbodyYesOrder type. Values: LIMIT, MARKET, AUCTION, AUCTION_LIMIT, STOP, STOP_LIMIT, MARKET_IF_TOUCHED, LIMIT_IF_TOUCHED
time_in_forcestringbodyYesValid period. Values: DAY (good for the day), GTC (good until cancel)
sessionstringbodyNoTrading session (US stocks only). Values: RTH (regular trading hours), RTH+Pre/Post-Mkt, OVERNIGHT (night trading only), ALL_DAY. Market orders only support RTH.
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.
lot_typestringbodyNoLot type, default round lot. Used for HK stock trading.
remarkstringbodyNoRemark. Maximum length after converting to UTF-8 is 64 bytes.
order_classstringbodyNoOrder class. Specify as MLEG for multi-leg orders.
multi_leg_infoobjectbodyNoMulti-leg order info. Required when placing multi-leg orders.

Request Example

bash
curl -X POST 'https://webapi.moomoo.com/api/v1.0/accounts/{acc_id}/orders' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <AccessToken>' \
  -d '{
    "code": "US.AAPL",
    "qty": "100",
    "price": "150.00",
    "side": "BUY",
    "order_type": "LIMIT",
    "time_in_force": "DAY"
  }' | jq

Response Example

json
{
  "s": "ok",
  "d": {
    "order_id": "New order identifier."
  }
}

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.