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
- 404
- 409
- 500
Order placed and confirmed synchronously
Order accepted and queued for async processing
Validation failed, broker does not support order execution, or referenced trade/strategy not found
Authentication required
Account not found or does not belong to the authenticated user
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