Stock Trading
The Stock Orders API supports placing, modifying, and cancelling orders for stocks and ETFs on the US market.
For the full list of supported order types and features by market, see the Feature Matrix in the Trading API Overview.
Order Lifecycle
Every order follows this lifecycle:
- Preview — Estimate costs and fees before committing
- Place — Submit the order
- Replace — Modify price or quantity while the order is open
- Cancel — Cancel a pending order
Key Parameters
| Parameter | Required | Description |
|---|---|---|
account_id | Yes | Trading account identifier |
client_order_id | Yes | Unique client-defined order ID (max 32 chars, must be unique per account) |
combo_type | Yes | NORMAL for standard single orders |
symbol | Yes | Trading symbol (e.g., AAPL) |
instrument_type | Yes | EQUITY for stock orders |
market | Yes | US |
order_type | Yes | Order type — see table below |
side | Yes | BUY or SELL |
quantity | Yes | Number of shares. Supports decimals for fractional orders (e.g., "0.5") |
total_cash_amount | Conditional | Total dollar amount. Required when entrust_type is AMOUNT. Amount must be less than the price of 1 share |
entrust_type | Yes | QTY (by quantity, supports fractional decimals) or AMOUNT (by cash amount, for buying less than 1 share) |
time_in_force | Yes | DAY or GTC |
limit_price | Conditional | Required for LIMIT, STOP_LOSS_LIMIT |
stop_price | Conditional | Required for STOP_LOSS, STOP_LOSS_LIMIT |
Supported Order Types
| Order Type | Description |
|---|---|
MARKET | Execute immediately at the best available price |
LIMIT | Execute at the specified price or better |
STOP_LOSS | Trigger a market order when the stop price is reached |
STOP_LOSS_LIMIT | Trigger a limit order when the stop price is reached |
Time in Force
| Value | Description |
|---|---|
DAY | Valid for the current trading day only |
GTC | Good till cancelled — remains active until filled or manually cancelled |
Request Examples
- Limit
- Market
- Stop Loss
- Stop Loss Limit
- Fractional Shares
Buy 10 shares of AAPL at a limit price of $180, valid for the current trading day during regular hours.
{
"account_id": "<your_account_id>",
"new_orders": [
{
"client_order_id": "<unique_id>",
"combo_type": "NORMAL",
"symbol": "AAPL",
"instrument_type": "EQUITY",
"market": "US",
"order_type": "LIMIT",
"limit_price": "180.00",
"quantity": "10",
"side": "BUY",
"time_in_force": "DAY",
"support_trading_session": "CORE",
"entrust_type": "QTY"
}
]
}
Buy 5 shares of TSLA at market price.
{
"account_id": "<your_account_id>",
"new_orders": [
{
"client_order_id": "<unique_id>",
"combo_type": "NORMAL",
"symbol": "TSLA",
"instrument_type": "EQUITY",
"market": "US",
"order_type": "MARKET",
"quantity": "5",
"side": "BUY",
"time_in_force": "DAY",
"support_trading_session": "CORE",
"entrust_type": "QTY"
}
]
}
Sell 20 shares of NVDA when the price drops to $100 (triggers a market order).
{
"account_id": "<your_account_id>",
"new_orders": [
{
"client_order_id": "<unique_id>",
"combo_type": "NORMAL",
"symbol": "NVDA",
"instrument_type": "EQUITY",
"market": "US",
"order_type": "STOP_LOSS",
"stop_price": "100.00",
"quantity": "20",
"side": "SELL",
"time_in_force": "GTC",
"support_trading_session": "CORE",
"entrust_type": "QTY"
}
]
}
Sell 10 shares of AMZN when the price drops to $180 (stop), then place a limit order at $178.
{
"account_id": "<your_account_id>",
"new_orders": [
{
"client_order_id": "<unique_id>",
"combo_type": "NORMAL",
"symbol": "AMZN",
"instrument_type": "EQUITY",
"market": "US",
"order_type": "STOP_LOSS_LIMIT",
"stop_price": "180.00",
"limit_price": "178.00",
"quantity": "10",
"side": "SELL",
"time_in_force": "GTC",
"support_trading_session": "CORE",
"entrust_type": "QTY"
}
]
}
Buy 0.5 shares of AAPL (fractional share order). Only MARKET orders are supported for fractional trading. The quantity must be between 0 (exclusive) and 1 (inclusive), and the order value must be at least $5.
{
"account_id": "<your_account_id>",
"new_orders": [
{
"client_order_id": "<unique_id>",
"combo_type": "NORMAL",
"symbol": "AAPL",
"instrument_type": "EQUITY",
"market": "US",
"order_type": "MARKET",
"quantity": "0.5",
"side": "BUY",
"time_in_force": "DAY",
"support_trading_session": "CORE",
"entrust_type": "QTY"
}
]
}
What's Next
- Trading API Overview — Full feature matrix by market
- Trading API FAQ — Common questions and troubleshooting