Place order
POST/api/v1/orders
Submit a new order for execution through the broker. When the order queue is available the order is processed asynchronously and a 202 is returned. When the queue is unavailable the order is processed synchronously and a 201 is returned.
The session trading mode must match the account type. A paper-mode session cannot place orders on a live account, and vice versa.
Supply either tradeId (assign to an existing trade) or createTrade: true
(create a new trade automatically). Both are optional; omitting both places
the order without trade assignment.
Request
Responses
- 201
- 202
- 400
- 401
- 403
- 404
- 409
- 500
Order placed and confirmed synchronously
Order accepted and queued for async processing
Validation failed, broker does not support order execution, referenced strategy not found (missing or not yours), or referenced trade not found (also when the trade is on another account, has a different symbol, or is not pending, open, or partially closed). code: ACCOUNT_INACTIVE when the account is inactive, code: STRATEGY_INACTIVE when the strategy for the order is inactive. Both apply to every order, including a close.
Authentication required
Subscription entitlement denied for opening new exposure. Opening an order (createTrade: true or a resolved intent of OPEN, including a same-side add to an existing trade) requires the trading:place_order feature, which needs a BASIC or higher tier and a non-expired subscription. code: FEATURE_UNAVAILABLE when the tier is insufficient, or code: SUBSCRIPTION_EXPIRED when the subscription has lapsed. Risk-reducing orders (a CLOSE against an owned open trade) and order cancels are never gated.
Account not found or does not belong to the authenticated user (bare error, no code). code: NOT_FOUND when the account or its broker is deleted ("Account not found or access denied"), or the strategy is deleted ("Strategy not found"), for the strategy named by strategyId or the strategy of the trade named by tradeId. These apply to every order, including a close.
Conflict. code: OPPOSING_POSITION_OPEN - the request asked to create a new trade (createTrade: true) on the opposite side of an existing non-terminal trade for the same (account, symbol) on a netting broker (Alpaca, TradeStation). Response details.conflictingTradeId carries the existing trade id. Close the conflicting trade to flat first, or assign the order to the existing trade via tradeId instead.
Server error