---
id: stock
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Stock Trading

The Stock Orders API supports placing, modifying, and cancelling orders for US stocks and ETFs. The unified order interface supports standard orders, combo orders (OTO/OCO/OTOCO), take-profit/stop-loss, trailing stops, algorithmic orders, and fractional share trading.

Stock orders are placed through the common **Place Order** endpoint `POST /trading/orders/place`. For the full request/response schema and all field definitions, see the [Place Order API reference](../reference/common-order-place.api.mdx). To preview an order before submitting, see [Preview Order](../reference/common-order-preview.api.mdx).

For options trading, see the dedicated [Options](options.md) page. For the full list of supported order types and features by product, see the [Feature Matrix](overview.md#feature-matrix) in the Trading API Overview.

## Order Lifecycle

Every order follows this lifecycle:

1. **Preview** — Estimate costs and fees before committing
2. **Place** — Submit the order
3. **Replace** — Modify price or quantity while the order is open
4. **Cancel** — Cancel a pending order
5. **Query** — Check order status, history, or details at any time

## 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 | Order combination type: `NORMAL`, `MASTER`, `STOP_PROFIT`, `STOP_LOSS`, `OTO`, `OCO`, `OTOCO` |
| `symbol` | Yes | Trading symbol (e.g., `AAPL`, `TSLA`) |
| `instrument_type` | Yes | `EQUITY` for stock orders |
| `market` | Yes | `US` |
| `order_type` | Yes | Order type — see table below |
| `side` | Yes | `BUY`, `SELL`, or `SHORT` |
| `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`, `LIMIT_ON_OPEN` |
| `stop_price` | Conditional | Required for `STOP_LOSS`, `STOP_LOSS_LIMIT` |
| `support_trading_session` | Yes | `CORE`, `ALL`, or `NIGHT` |
| `trailing_type` | Conditional | Required for `TRAILING_STOP_LOSS`. `AMOUNT` or `PERCENTAGE` |
| `trailing_stop_step` | Conditional | Required for `TRAILING_STOP_LOSS`. Trail amount or percentage (e.g., `0.01` = 1%) |
| `client_combo_order_id` | Conditional | Required when `combo_type` is not `NORMAL` |


## 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 |
| `TRAILING_STOP_LOSS` | Stop price trails the market price by a set amount or percentage. Only supports `DAY` time in force |
| `MARKET_ON_OPEN` | Execute at the opening price (institutional only) |
| `MARKET_ON_CLOSE` | Execute at the closing price (institutional only) |
| `LIMIT_ON_OPEN` | Limit order at market open (institutional only) |

### Time in Force

| Value | Description |
|-------|-------------|
| `DAY` | Valid for the current trading day only |
| `GTC` | Good till cancelled — remains active until filled or manually cancelled (typically up to 60 days) |

### Trading Sessions

| Value | Description |
|-------|-------------|
| `CORE` | Regular market hours only (9:30 AM – 4:00 PM ET) |
| `ALL` | Extended hours including pre-market and after-hours |
| `NIGHT` | Night trading session only |

## Combo Orders

Combo orders let you link multiple orders together with conditional logic:

| Combo Type | Description |
|------------|-------------|
| `NORMAL` | Standard single order |
| `MASTER` | Primary order with attached take-profit and/or stop-loss |
| `STOP_PROFIT` | Take-profit leg attached to a `MASTER` order |
| `STOP_LOSS` | Stop-loss leg attached to a `MASTER` order |
| `OTO` | One-Triggers-Other — secondary order triggers after primary fills |
| `OCO` | One-Cancels-Other — two linked orders, when one fills the other is cancelled |
| `OTOCO` | One-Triggers-OCO — primary order triggers two linked OCO orders upon fill |

:::caution
Combo orders require a `client_combo_order_id` in addition to individual `client_order_id` for each leg. Each `client_order_id` must be unique.
:::

### Combo Order Examples

<Tabs groupId="combo-order-type">
  <TabItem value="tp-sl" label="Buy-to-Open TP/SL" default>

Open a position with take-profit and stop-loss (`MASTER` + `STOP_PROFIT` + `STOP_LOSS`). Buy 10 shares of AAPL at $309.53, with a take-profit limit sell at $378.33 and a stop-loss at $292.34.

```json
{
  "account_id": "<your_account_id>",
  "client_combo_order_id": "<unique_combo_id>",
  "new_orders": [
    {
      "client_order_id": "<unique_id_1>",
      "combo_type": "MASTER",
      "symbol": "AAPL",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "LIMIT",
      "quantity": "10",
      "side": "BUY",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE",
      "limit_price": "309.53"
    },
    {
      "client_order_id": "<unique_id_2>",
      "combo_type": "STOP_PROFIT",
      "symbol": "AAPL",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "LIMIT",
      "quantity": "10",
      "side": "SELL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE",
      "limit_price": "378.33"
    },
    {
      "client_order_id": "<unique_id_3>",
      "combo_type": "STOP_LOSS",
      "symbol": "AAPL",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "STOP_LOSS",
      "quantity": "10",
      "side": "SELL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE",
      "stop_price": "292.34"
    }
  ]
}
```

  </TabItem>
  <TabItem value="tp-sl-close" label="Sell-to-Close TP/SL">

Sell to close an existing position with take-profit and stop-loss (no `MASTER` order). Place a take-profit limit sell for 10 shares of TSLA at $326.59 and a stop-loss at $252.36.

```json
{
  "account_id": "<your_account_id>",
  "client_combo_order_id": "<unique_combo_id>",
  "new_orders": [
    {
      "client_order_id": "<unique_id_1>",
      "combo_type": "STOP_PROFIT",
      "symbol": "TSLA",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "LIMIT",
      "quantity": "10",
      "side": "SELL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE",
      "limit_price": "326.59"
    },
    {
      "client_order_id": "<unique_id_2>",
      "combo_type": "STOP_LOSS",
      "symbol": "TSLA",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "STOP_LOSS",
      "quantity": "10",
      "side": "SELL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE",
      "stop_price": "252.36"
    }
  ]
}
```

  </TabItem>
  <TabItem value="oto" label="OTO">

Buy 10 shares of AAPL at $180.00 (master). Once filled, a limit sell order at $200.00 is triggered automatically.

```json
{
  "account_id": "<your_account_id>",
  "client_combo_order_id": "<unique_combo_id>",
  "new_orders": [
    {
      "client_order_id": "<unique_id_1>",
      "combo_type": "MASTER",
      "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"
    },
    {
      "client_order_id": "<unique_id_2>",
      "combo_type": "OTO",
      "symbol": "AAPL",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "LIMIT",
      "limit_price": "200.00",
      "quantity": "10",
      "side": "SELL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE"
    }
  ]
}
```

  </TabItem>
  <TabItem value="oco" label="OCO">

Place two OCO limit buy orders on AAPL at $360.00 and $370.80. When one order fills, the other is cancelled automatically.

```json
{
  "account_id": "<your_account_id>",
  "client_combo_order_id": "<unique_combo_id>",
  "new_orders": [
    {
      "market": "US",
      "instrument_type": "EQUITY",
      "symbol": "AAPL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE",
      "combo_type": "OCO",
      "order_type": "LIMIT",
      "side": "BUY",
      "quantity": "1",
      "limit_price": "360.00",
      "client_order_id": "<unique_id_1>"
    },
    {
      "market": "US",
      "instrument_type": "EQUITY",
      "symbol": "AAPL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE",
      "combo_type": "OCO",
      "order_type": "LIMIT",
      "side": "BUY",
      "quantity": "1",
      "limit_price": "370.80",
      "client_order_id": "<unique_id_2>"
    }
  ]
}
```

  </TabItem>
  <TabItem value="otoco" label="OTOCO">

Buy 10 shares of AAPL at $180.00 (master). Once filled, trigger an OCO pair: a take-profit limit sell at $200.00 and a stop-loss at $170.00. When one order fills, the other is cancelled.

```json
{
  "account_id": "<your_account_id>",
  "client_combo_order_id": "<unique_combo_id>",
  "new_orders": [
    {
      "client_order_id": "<unique_id_1>",
      "combo_type": "MASTER",
      "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"
    },
    {
      "client_order_id": "<unique_id_2>",
      "combo_type": "OTOCO",
      "symbol": "AAPL",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "LIMIT",
      "limit_price": "200.00",
      "quantity": "10",
      "side": "SELL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE"
    },
    {
      "client_order_id": "<unique_id_3>",
      "combo_type": "OTOCO",
      "symbol": "AAPL",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "STOP_LOSS",
      "stop_price": "170.00",
      "quantity": "10",
      "side": "SELL",
      "time_in_force": "DAY",
      "entrust_type": "QTY",
      "support_trading_session": "CORE"
    }
  ]
}
```

  </TabItem>
</Tabs>

## Algorithmic Orders

Algorithmic orders execute large orders over time to minimize market impact. Only `MARKET` and `LIMIT` order types are supported. Algo orders only run during regular trading hours.

| Parameter | Required | Description |
|-----------|----------|-------------|
| `algo_type` | Yes | `TWAP`, `VWAP`, or `POV` |
| `algo_start_time` | Yes | Start time in `HH:mm:ss` format (US Eastern Time). Must be later than current time |
| `algo_end_time` | Yes | End time in `HH:mm:ss` format (US Eastern Time) |
| `max_target_percent` | TWAP/VWAP | Maximum participation rate (1–20). Defines execution aggressiveness |
| `target_vol_percent` | POV | Target volume participation percentage (1–20) |

| Algo Type | Description |
|-----------|-------------|
| `TWAP` | Time Weighted Average Price — distributes execution evenly over time |
| `VWAP` | Volume Weighted Average Price — distributes execution proportional to historical volume |
| `POV` | Percentage of Volume — participates at a target percentage of real-time market volume |

## Request Examples

<Tabs groupId="stock-order-type">
  <TabItem value="limit" label="Limit" default>

Buy 10 shares of AAPL at a limit price of $180, valid for the current trading day during regular hours.

```json
{
  "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"
    }
  ]
}
```

  </TabItem>
  <TabItem value="market" label="Market">

Buy 5 shares of TSLA at market price.

```json
{
  "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"
    }
  ]
}
```

  </TabItem>
  <TabItem value="stop-loss" label="Stop Loss">

Sell 20 shares of NVDA when the price drops to $100 (triggers a market order).

```json
{
  "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"
    }
  ]
}
```

  </TabItem>
  <TabItem value="stop-loss-limit" label="Stop Loss Limit">

Sell 10 shares of AMZN when the price drops to $180 (stop), then place a limit order at $178.

```json
{
  "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"
    }
  ]
}
```

  </TabItem>
  <TabItem value="trailing-stop" label="Trailing Stop">

Sell 15 shares of AAPL with a trailing stop of $5. The stop price will trail the market price downward by $5.

```json
{
  "account_id": "<your_account_id>",
  "new_orders": [
    {
      "client_order_id": "<unique_id>",
      "combo_type": "NORMAL",
      "symbol": "AAPL",
      "instrument_type": "EQUITY",
      "market": "US",
      "order_type": "TRAILING_STOP_LOSS",
      "trailing_type": "AMOUNT",
      "trailing_stop_step": "5",
      "quantity": "15",
      "side": "SELL",
      "time_in_force": "DAY",
      "support_trading_session": "CORE",
      "entrust_type": "QTY"
    }
  ]
}
```

  </TabItem>
  <TabItem value="fractional" label="Fractional Shares">

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.

```json
{
  "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"
    }
  ]
}
```

  </TabItem>
  <TabItem value="extended" label="Extended Hours">

Buy 10 shares of AAPL with a limit order, valid across all trading sessions including pre-market and after-hours.

```json
{
  "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": "178.00",
      "quantity": "10",
      "side": "BUY",
      "time_in_force": "DAY",
      "support_trading_session": "ALL",
      "entrust_type": "QTY"
    }
  ]
}
```

  </TabItem>
  <TabItem value="algo" label="Algo (TWAP)">

Buy 1000 shares of AAPL using TWAP algorithm, distributed between 10:00 AM and 2:00 PM ET, with max 10% volume participation.

```json
{
  "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": "1000",
      "side": "BUY",
      "time_in_force": "DAY",
      "support_trading_session": "CORE",
      "entrust_type": "QTY",
      "algo_type": "TWAP",
      "algo_start_time": "10:00:00",
      "algo_end_time": "14:00:00",
      "max_target_percent": "10"
    }
  ]
}
```

  </TabItem>
</Tabs>

## What's Next

- [Options](options.md) — Options trading
- [Futures](futures.md) — Futures contract trading
- [Crypto](crypto.md) — Crypto trading
- [Event Contracts](event-contract.md) — Binary outcome event trading
- [Trading API FAQ](faq.md) — Common questions and troubleshooting