POST /v1/accounts/{accountId}/orders request schema, code examples for every order type, and how to modify, cancel, and retrieve fills.
Place an order — POST /v1/accounts/{accountId}/orders
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
symbol | string | ✅ | Ticker symbol (e.g. "AAPL", "SPY") |
asset_class | string | ✅ | "equity" or "etf" |
order_type | string | ✅ | "market" or "limit" |
side | string | ✅ | "buy" or "sell" |
quantity | string | ✅* | Number of shares. Decimal string (e.g. "10" or "2.5"). Required if notional is omitted. |
notional | string | ✅* | Dollar amount to invest (e.g. "500.00"). Required if quantity is omitted. |
limit_price | string | Required for limit orders | |
time_in_force | string | ✅ | "day", "gtc", "opg", "cls", "ioc", or "fok" |
extended_hours | boolean | true to allow pre/after-market execution. Requires limit + day. | |
client_order_id | string | Your unique idempotency key. Strongly recommended. |
Order examples
Market order — buy by share quantity
Market order — buy by dollar amount (notional)
Limit order
Sample response
All order creation requests return201 Created with the full order object:
List orders — GET /v1/accounts/{accountId}/orders
Returns all orders for the account. Supports filtering by status and date.
Get order details — GET /v1/accounts/{accountId}/orders/{orderId}
Modify an open order — PATCH /v1/accounts/{accountId}/orders/{orderId}
You can modify the limit_price or quantity of an order that is in new or partially_filled status. Modifying results in a replace operation — the original order is cancelled and a new order is submitted with the updated parameters.
⚠️ You cannot modifysymbol,side,order_type, ortime_in_force. Cancel and replace with a new order instead.
Cancel an order — DELETE /v1/accounts/{accountId}/orders/{orderId}
Cancels an open order. The order must be in new or partially_filled status. Returns 204 No Content. Cancellations are not guaranteed — if the order fills before the cancel reaches the market, you will receive an INVALID_ORDER_STATE error and the order will appear as filled.
Get execution reports (fills) — GET /v1/accounts/{accountId}/orders/{orderId}/executions
Returns individual fill reports. Large orders may fill in multiple partial executions at different prices.
filled_avg_price on the order object.
Tracking orders and idempotency
If your order request times out, do not blindly retry without first checking whether the order was created — queryGET /v1/accounts/{accountId}/orders and search for your client_order_id. Subscribe to order.updated and order.filled webhook events rather than polling.
Order state transitions you should handle in your UI
| Event | User message |
|---|---|
pending_new | ”Submitting your order…” |
new | ”Order placed and working” |
partially_filled | ”Order partially filled (N of M shares)“ |
filled | ”Order complete” |
canceled | ”Order cancelled” |
rejected | ”Order could not be placed — {reason}” |
expired | ”Order expired unfilled” |
Common order errors
| Error code | Description | Fix |
|---|---|---|
INSUFFICIENT_BUYING_POWER | Not enough cash to cover the order | Reduce quantity or wait for a deposit to settle |
SYMBOL_NOT_TRADABLE | Symbol is not available for trading | Verify the symbol via Market Data reference endpoints |
MARKET_CLOSED | Market is closed and extended_hours is false | Use extended_hours: true with a limit order, or wait for market open |
DUPLICATE_CLIENT_ORDER_ID | A client_order_id was reused | Use a new unique ID per order |
INVALID_ORDER_STATE | Tried to modify or cancel an order in a terminal state | Check order status before attempting modification |
ACCOUNT_NOT_ACTIVE | Account is not in ACTIVE status | Ensure KYC has completed and account is ACTIVE |
Next steps
- Account Activities — View the full transaction and activity history
- Webhooks Overview — Real-time order fill notifications
- Funding Overview — Deposit cash before trading