Place Order
/accounts/{accountId}/ordersPlace a new order for the specified account. Call Preview Order first to pre-validate and show the results to the user, and then use confirmId in this request.
Path Parameters
The account identifier.
Body Parameters
Security symbol. Example: AAPL.
Order direction. Enum: buy — buy; sell — sell.
Order type. Enum: limit — limit order; market — market order; stop — stop market order; stopLimit — stop limit order.
Whether the order size is specified by quantity or notional amount. Enum: qty — order by quantity; amount — order by notional amount.
Asset class. Enum: stock; etf; crypto; option; future; arbitrage; others.
Order time-in-force. Enum: day — day order; gtc — good till cancelled.
Trading session. Enum: reg — regular hours only; all — pre-market + regular + after-hours.
Order quantity. Required when quantityType is qty.
Order notional amount. Required when quantityType is amount.
Limit price. Required for limit and stopLimit order types.
Stop trigger price. Required for stop and stopLimit order types.
Position direction. Enum: open — open position; close — close position.
Take-profit leg. Contains price (string, required) — take-profit limit price; type (string, optional, default limit) — order type, only limit supported.
Stop-loss leg. Contains stopPrice (string, required) — stop trigger price; price (string, optional) — limit price for stopLimit type; type (string, optional, default stop) — order type: stop or stopLimit.
The confirmId returned from a prior preview request.
Request Example
{
"instrument": "BAC",
"side": "buy",
"type": "limit",
"quantityType": "qty",
"qty": "100",
"limitPrice": "30.0",
"category": "stock",
"durationType": "day",
"extendHours": "reg",
"confirmId": "0000001"
}Response
Order accepted.
Status indicator. ok on success.
The identifier of the newly created order.
Response
Request rejected.
Error code string, e.g. invalid_grant.
Human-readable error message.
Response Example
{
"s": "ok",
"d": {
"orderId": "112358"
}
}