Place Order
POST/api/v1.0/accounts/{acc_id}/ordersPlace a new order.
How to read the place result
- This endpoint requires OAuth
trade:write. If you get insufficient permission, confirm the tokenscopeincludes it — see Getting Started · Scopes. sisok: accepted; order ID is ind.order_id.siserrorandneed_order_confirmistrue: confirmation is still required (not a final failure); call Order Confirm with the top-levelconfirm_id.jump_urlis present: open it in a browser to continue.- Other errors: handle via
errcode/errmsg.
need_order_confirm, confirm_id, and jump_url are top-level fields, not inside d. See Order Confirm.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
acc_id | string | Yes | Business account ID. |
Request Parameters
| Parameter | Type | Position | Required | Description |
|---|---|---|---|---|
code | string | body | Conditional | Tradable symbol. Format: market.symbol, e.g. US.AAPL, US.AAPL250926C235000. Required for regular orders; omit when order_class is MLEG (synthesized from multi_leg_info.leg_infos). |
qty | string | body | Yes | Order quantity. The unit of options and futures is "contract". |
price | string | body | No | Order price. 9 decimal places for futures accounts, 5 for forex accounts, 4 for securities accounts; excess is rounded. |
side | trd_side | body | Yes | Trading direction |
order_type | order_type | body | Yes | Order type |
time_in_force | time_in_force | body | Yes | Valid period |
expire_time | uint64 | body | Conditional | Unix timestamp in microseconds. Required when time_in_force is GTD. |
session | trading_session | body | No | Trading session (US stocks only). Market orders only support RTH. |
aux_price | string | body | No | Trigger price. Required when order type is STOP, STOP_LIMIT, MARKET_IF_TOUCHED, or LIMIT_IF_TOUCHED. Rounded to 9 decimals for futures accounts, 5 for forex accounts, 3 for securities accounts. |
trail_type | trail_type | body | No | Trailing stop type. Only for TRAILING_STOP and TRAILING_STOP_LIMIT orders. |
trail_value | string | body | No | Trailing amount or percentage. Only for trailing stop orders. |
trail_spread | string | body | No | Trailing spread. Only for TRAILING_STOP_LIMIT orders. |
lot_type | lot_type | body | No | Lot type, default round lot. Used for HK / JP stock trading. |
remark | string | body | No | Remark. Maximum length after converting to UTF-8 is 64 bytes. |
order_class | order_class | body | No | Order class. Specify as MLEG for multi-leg orders. Combo options are not supported for JP brokers. |
multi_leg_info | multi_leg_info | body | No | Multi-leg order info. Required when placing multi-leg orders. |
sub_acc_id | string | body | Conditional | Required for JP accounts. Sub-account id, selected by the client from the account's sub_accounts[] (returned by the Get Authorized Trading Accounts interface). Ignored by non-JP brokers. |
position_id | string | body | Conditional | Required for forex close orders (SELL / BUY_BACK). Optional elsewhere: closes the specified position when provided; if omitted, quantity is allocated automatically across positions of the same symbol. |
position_open_type | position_open_type | body | No | Open type. Only for trailing stop orders (TRAILING_STOP, TRAILING_STOP_LIMIT), controls whether opening new positions is allowed. |
algo_info | algo_info | body | No | Algo params. Required when order_type is an algo type. Structure mirrors the response algo_info; the twap/vwap/pov/slicer/peg/iceberg sub-structures contain algo-specific required fields, see Naming Dictionary. |
Supported order types
Supported order_type values are grouped below (full list: Naming Dictionary · order_type). Whether an order can be placed still depends on the account market, symbol, and trading permissions; unsupported requests return an error.
Multi-leg combo options use order_class=MLEG with multi_leg_info; that is not a separate order_type. JP brokers do not support combo options.
Basic
order_type | Meaning | Key extra fields |
|---|---|---|
LIMIT | Limit | Usually send price |
MARKET | Market | Usually omit price; US session supports RTH only |
AUCTION | At-auction market | Often HK auction |
AUCTION_LIMIT | At-auction limit | Same, usually with price |
Stop / if-touched
order_type | Meaning | Key extra fields |
|---|---|---|
STOP | Stop market | Required aux_price |
STOP_LIMIT | Stop limit | Required aux_price, usually also price |
MARKET_IF_TOUCHED | Market if touched | Required aux_price |
LIMIT_IF_TOUCHED | Limit if touched | Required aux_price, usually also price |
Trailing stop
order_type | Meaning | Key extra fields |
|---|---|---|
TRAILING_STOP | Trailing stop market | Required trail_type, trail_value; optional position_open_type |
TRAILING_STOP_LIMIT | Trailing stop limit | Above + required trail_spread |
Algo
Algo order_type values require algo_info. Type-specific sub-structures: Naming Dictionary · algo_info.
order_type | Meaning | Type-specific constraints (summary) |
|---|---|---|
TWAP / TWAP_LIMIT | TWAP market / limit | algo_info.twap.participation_rate |
VWAP / VWAP_LIMIT | VWAP market / limit | algo_info.vwap.participation_rate |
POV / POV_LIMIT | POV market / limit (% of volume) | algo_info.pov.participation_rate |
SLICER / SLICER_LIMIT | Slicer market / limit | algo_info.slicer; at least one of slice_interval or display_qty |
PEG / PEG_LIMIT | Peg market / limit | display_qty, peg_offset |
ICEBERG_LIMIT | Iceberg limit | algo_info.iceberg.display_qty; non-US also needs start_time / end_time (US may omit) |
Request Example
Limit buy. Buy 100 shares of US.AAPL at 150 USD, valid for the day.
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"
}' | jqMarket sell. Sell 100 shares of HK.00700, valid for the day. A market order omits price.
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": "HK.00700",
"qty": "100",
"side": "SELL",
"order_type": "MARKET",
"time_in_force": "DAY"
}' | jqStop limit. STOP_LIMIT requires trigger price aux_price and limit price price. GTC stays open until you cancel it.
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.NVDA",
"qty": "100",
"price": "999.00",
"aux_price": "1000.00",
"side": "SELL",
"order_type": "STOP_LIMIT",
"time_in_force": "GTC"
}' | jqTrailing stop limit. TRAILING_STOP_LIMIT requires trail_type, trail_value, and trail_spread. GTD requires expire_time in microseconds, later than now. With RATIO, trail_value 0.5 means 0.5%.
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.NVDA",
"qty": "100",
"side": "SELL",
"order_type": "TRAILING_STOP_LIMIT",
"time_in_force": "GTD",
"expire_time": 1814313600000000,
"trail_type": "RATIO",
"trail_value": "0.5",
"trail_spread": "1.2"
}' | jqTWAP limit algo order. algo_info is required, with start_time and end_time (end_time later than start_time) and twap.participation_rate. A limit-style algo order also sends price.
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",
"side": "BUY",
"order_type": "TWAP_LIMIT",
"time_in_force": "DAY",
"price": "150.00",
"algo_info": {
"start_time": 1798761600000000,
"end_time": 1798765200000000,
"pricing_strategy": "ADAPTIVE",
"layering": "AUTO",
"twap": {
"participation_rate": "20"
}
}
}' | jqResponse Parameters
| Field | Type | Description |
|---|---|---|
order_id | string | Order ID of the newly created order. |
Top-level fields
need_order_confirm,confirm_id, andjump_urlmay also be returned; see the examples and notes below.
Response Example
{
"s": "ok",
"d": {
"order_id": "FH1D5B797DAC864000"
}
}Failure:
Business error:
{
"s": "error",
"errcode": 344,
"errmsg": "Trading for this market not activated.",
"need_order_confirm": false
}Order confirmation required:
{
"s": "error",
"errcode": 108330261,
"errmsg": "Due to liquidity and market conditions, you may be unable to open or close positions for this security. Do you want to continue?",
"need_order_confirm": true,
"confirm_id": "0a1984f400616ae1b2100008eb430000"
}Authentication failure. An invalid Access Token returns this body on every API. The fields are code and trace_id, not s / errcode:
{
"code": -12006,
"trace_id": "385e116c10c8d386334acfc839f63251"
}