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.
Documentation Index
Fetch the complete documentation index at: https://finance.dev/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Body
Same structure as Place Order (PlaceOrdRequest); returns estimated cost and buying power impact without placing.
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 account ID 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 - 20"AAPL"
Direction of the trade. Use BUY when purchasing shares or contracts, SELL when selling a position you own, SELL_SHORT when opening a short sale, and BUY_TO_COVER when closing a short position.
BUY, SELL, SELL_SHORT, BUY_TO_COVER "BUY"
How the order should execute. MARKET tries to fill immediately at the current market price. LIMIT fills only at your price or better. STOP activates when stopPrice is reached. STOP_LIMIT activates at stopPrice and then uses price as the limit.
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 remain active. DAY cancels at market close if unfilled. GTC stays active until filled or canceled. IOC fills what is available immediately and cancels the rest. FOK fills the entire quantity immediately or cancels the whole order. EXTENDED_HOURS allows eligible extended-hours trading. AT_THE_OPENING and AT_THE_CLOSE target the opening or closing auction.
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.