Place Option Order
place_option_orderSubmit single-leg or multi-leg options orders to Alpaca. Specify symbol, side, and quantity, or provide up to four legs with ratio quantities, to open or close option positions.
Instructions
Place an options order (single-leg or multi-leg).
For single-leg orders, provide symbol, side, and qty. For multi-leg orders, provide qty, legs, and optionally order_class="mleg" (auto-inferred). Symbol and side on the parent are not needed for multi-leg.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | Yes | Number of contracts. Required for both single-leg and multi-leg orders. For multi-leg, this is the strategy multiplier — each leg's ratio_qty is scaled by this value (e.g., qty="10" with ratio_qty="2" = 20 contracts for that leg). | |
| legs | No | List of leg dicts for multi-leg orders (max 4). Each leg requires "symbol" and "ratio_qty" (string). Optional per-leg fields: "side" ("buy" or "sell") and "position_intent". | |
| side | No | "buy" or "sell". Required for single-leg. | |
| type | No | "market", "limit", "stop", or "stop_limit" for single-leg. Multi-leg supports only "market" and "limit". | market |
| symbol | No | OCC option symbol (e.g., "AAPL250321C00150000"). Required for single-leg. | |
| stop_price | No | Required for stop and stop_limit orders. Single-leg only. | |
| limit_price | No | Required for limit and stop_limit orders. For multi-leg, this is the net debit/credit (positive = debit/cost, negative = credit/proceeds). | |
| order_class | No | Set to "mleg" for multi-leg orders. Automatically inferred when legs are provided. | |
| time_in_force | No | "day" or "gtc". | day |
| client_order_id | No | Unique idempotency key. If the request times out, you can safely retry with the same value — the API will reject duplicates. Recommended for every order. | |
| position_intent | No | "buy_to_open", "buy_to_close", "sell_to_open", or "sell_to_close". Clarifies whether the trade opens or closes a position. Optional but recommended. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||