preflight_multileg_order
Estimate costs for multi-leg options strategies before trading. Specify legs, limit price, and quantity to preview potential order costs.
Instructions
Estimate costs for a multi-leg (options strategy) trade before placing it.
Does NOT place an order.
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}] limit_price: The limit price for the spread. time_in_force: DAY or GTD. Default is DAY. quantity: Number of spreads. Must be > 0. 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 | ||
| limit_price | Yes | ||
| time_in_force | No | DAY | |
| quantity | No | ||
| expiration_time | No | ||
| account_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |