Preview Order
Simulates an order submission to calculate estimated costs, fees, commissions, and buying power impact before actual execution. Returns detailed breakdown of order economics without committing to the trade.
Use Case: Review total order costs and verify buying power sufficiency before placing trades to avoid rejections and unexpected fees.
Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Body
Same shape as Place Order — fill out exactly what you would send to actually place the order. The preview just returns cost/fees/buying-power numbers without putting the order on the market.
Request body for placing a live order through the core trading API. Use Preview Order first when available, then submit this only after the user confirms the trade.
Trading account identifier that should receive the order. Enter the tradingAccountId selected by the user.
1 - 50"TEST-ACCOUNT-001"
Ticker or underlying symbol to trade. Confirm the exact uppercase value with symbol search before placing an order.
1 - 21"AAPL"
Which direction to trade in. Pick one:
BUY— buying shares or contracts (opens a long position or closes an existing short).SELL— selling shares or contracts you already hold (closes a long position).SELL_SHORT— selling shares you do not own (opens a short position). Subject to short-sale regulations.BUY_TO_COVER— buying shares to close an open short position.
BUY, SELL, SELL_SHORT, BUY_TO_COVER "BUY"
How the order is priced. Pick one:
MARKET— Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.LIMIT— Execute only at the limitpriceor better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires thepricefield.STOP— Sits inactive until the market hitsstopPrice, then converts to a market order. Common for stop-loss exits. Requires thestopPricefield.STOP_LIMIT— Sits inactive until the market hitsstopPrice, then converts to a limit order atprice. More control thanSTOP, but the limit may not fill. Requires bothstopPriceandprice.
MARKET, LIMIT, STOP, STOP_LIMIT "LIMIT"
Number of shares or contracts to trade, sent as a decimal string. Example: "10" for ten shares or "1" for one option contract.
"10"
How long the order should stay alive before automatically cancelling. Pick one:
DAY— Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.GTC— Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).IOC— Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.FOK— Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.EXTENDED_HOURS— Active during pre-market and after-hours trading sessions in addition to regular hours.AT_THE_OPENING— Execute at the official market open price; if it can't fill at open, it's cancelled.AT_THE_CLOSE— Execute at the official market close price; if it can't fill at close, it's cancelled.
DAY, GTC, IOC, FOK, EXTENDED_HOURS, AT_THE_OPENING, AT_THE_CLOSE "DAY"
Optional identifier from your app. Send this when you want to tag orders by app, user, strategy, or integration for your own reconciliation.
50"CLIENT-001"
Limit price as a decimal string. Required for LIMIT and STOP_LIMIT orders. For buys, this is the maximum price you will pay; for sells, it is the minimum price you will accept.
"150.00"
Trigger price as a decimal string. Required for STOP and STOP_LIMIT orders. When the market reaches this price, the stop order becomes active.
"145.00"
Three-letter currency code for the order. Use USD for U.S. dollar orders unless your integration supports another currency.
3"USD"
Option legs for single-leg or multi-leg option orders. Omit this field for equity orders. Send 1 leg for a single option contract or 2 to 4 legs for a spread or other multi-leg strategy.
4Response
Order preview calculated successfully
Response schema for order preview (PreviewOrdResponse)
Estimated cash cost of the order before it is placed. Use this to show the user the expected trade cost during review.
"1500.00"
Estimated margin requirement for the order. Use this to explain how much margin capacity the order may consume.
"0.00"
Estimated commission for the order. Show this as part of the total trading cost.
"0.00"
Estimated reduction in available buying power if the order is submitted. Use this before Place Order to confirm the account can support the trade.
"1500.01"
Estimated regulatory and exchange fees. Add this to commissions and order cost when showing total estimated cost.
"0.01"
Estimated option-specific fees. Present this only when the preview is for an option order.
"0.70"
Estimated option requirement or margin requirement for the option strategy.
"0.00"
Estimated premium paid or received for an option order.
"550.00"
Estimated number of day trades this order would count toward. Use this to warn pattern-day-trader-sensitive users.
0
Identifier for a warning rule triggered by the preview. Use with warnings when present.
"0"
Non-blocking warnings returned by preview. Show these to the user before they submit the live order.
Blocking validation or risk errors returned by preview. Do not call Place Order until these are resolved.