place_multileg_order
Execute a multi-leg options order, such as spreads or straddles, by specifying legs, quantity, and limit price. Supports debit or credit transactions.
Instructions
Place a multi-leg order (options strategies: spreads, straddles, etc.).
⚠️ This executes a real trade. Consider running preflight_multileg_order first.
Args: legs: List of leg objects. Each leg must have: - symbol (str): The option/equity symbol (e.g. "SPY260313P00670000") - type (str): EQUITY or OPTION - side (str): BUY or SELL - open_close_indicator (str, optional): OPEN or CLOSE (required for options) - ratio_quantity (int, optional): Ratio between legs (default 1) Example: [{"symbol": "SPY260313P00670000", "type": "OPTION", "side": "SELL", "open_close_indicator": "OPEN", "ratio_quantity": 1}, {"symbol": "SPY260313P00665000", "type": "OPTION", "side": "BUY", "open_close_indicator": "OPEN", "ratio_quantity": 1}] quantity: Number of spreads. Must be > 0. limit_price: Limit price. Positive for debit, negative for credit. time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | ||
| quantity | Yes | ||
| limit_price | Yes | ||
| time_in_force | No | DAY | |
| expiration_time | No | ||
| account_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |