preflight_order
Estimate trade costs and impact before placing an order. Get commission, fees, order value, buying power, and margin impact without executing the trade.
Instructions
Estimate costs and impact of a potential single-leg trade before placing it.
Returns estimated commission, regulatory fees, order value, buying power requirements, and margin impact. Does NOT place an order.
Args: symbol: Ticker symbol (e.g. "AAPL"). instrument_type: EQUITY, OPTION, or CRYPTO. order_side: BUY or SELL. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT. time_in_force: DAY or GTD. Default is DAY. quantity: Number of shares/contracts (mutually exclusive with amount). amount: Dollar amount (mutually exclusive with quantity). limit_price: Required for LIMIT and STOP_LIMIT orders. stop_price: Required for STOP and STOP_LIMIT orders. open_close_indicator: For options only — OPEN or CLOSE. expiration_time: Required when time_in_force is GTD. ISO 8601 format. equity_market_session: CORE or EXTENDED. For equity orders only. tax_lot_matching_instructions: Optional list of specific tax lots to sell, each a dict {"tax_lot_id": str, "quantity": str}. Constraints enforced by the API: at most 8 per request; only for a SELL equity order with open_close_indicator=CLOSE; every lot must be the same symbol as the order; only MARKET or good-for-day LIMIT orders; the quantities must sum to the order quantity; and the account's tax-lot information must have been updated today. Omit to let the broker apply its default lot-matching. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | ||
| symbol | Yes | ||
| quantity | No | ||
| account_id | No | ||
| order_side | Yes | ||
| order_type | Yes | ||
| stop_price | No | ||
| limit_price | No | ||
| time_in_force | No | DAY | |
| expiration_time | No | ||
| instrument_type | Yes | ||
| open_close_indicator | No | ||
| equity_market_session | No | ||
| tax_lot_matching_instructions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |