Trade
An order and its fills. Get trades and the trade operations return trades, and TRADE_UPDATED webhook events send one as data.
Failure codes
When status is failed, use error_code to decide how to handle the failure and error_message for any available detail. A missing or null error_code means Trade It could not identify the cause: review error_message and check get trades with refresh: true before retrying.
| Code | Handling |
|---|---|
insufficient_buying_power | The account cannot fund the order. Confirm sufficient buying power before retrying. |
market_closed | The market or trading session is closed for this order. Wait for an eligible session. |
invalid_order | Order validation failed, for example because of the price, quantity, or order type. Correct the order before resubmitting. |
not_tradable | A restriction on the asset prevented the trade, such as a halted symbol or an option contract that no longer trades. Do not retry automatically. |
account_action_required | The brokerage needs the user to act on their account first, such as accepting an agreement or risk disclosure, raising their options approval level, or using a margin account. Do not retry until the user confirms it is done. |
brokerage_rate_limited | The brokerage throttled the request. Back off before retrying. |
brokerage_unavailable | The brokerage request timed out or encountered a service error. The order may still have reached the brokerage, so check get_trades with refresh: true before retrying. |
needs_relink | The user must reconnect the brokerage before trading. |
Fields
Trade It trade ID. Pass it as trade_id to execute or cancel the trade.
When the record was created.
When the record last changed.
The Trade It user who owns the trade.
The traded asset, or the underlying for options.
The account the trade is sent to.
The trade this take-profit or stop-loss exit belongs to, for certain bracket orders. Null otherwise.
Machine-readable failure reason. Absent or null when Trade It could not identify the cause.
insufficient_buying_powermarket_closedinvalid_ordernot_tradableaccount_action_requiredbrokerage_rate_limitedbrokerage_unavailableneeds_relinkWhere the trade came from: ios_app, chatgpt, mcp, api, or discord, or brokerage:<brokerage id> for trades synced from brokerage history.
Screenshot the trade was created from.
The brokerage's order ID. Not included in webhook events.
The brokerage's ID for OCO group the order belongs to. Not included in webhook events.
0 for a simple buy/sell, 1 for options/multi-leg.
01Whether the trade buys or sells.
buysellWhether a multi-leg trade pays (debit) or receives (credit) its net premium. Null for simple trades.
debitcreditevenShares, coins, or futures contracts ordered. A multi-leg trade counts its whole package as 1.
Units filled so far.
Units canceled. A canceled order can still be partly filled.
Dollar amount, for orders placed by value instead of units.
Average fill price, always positive. For multi-leg trades, the net cash for the whole package. Null until something fills.
Order status. complete, canceled, failed, and disconnected are final.
draftpendingplacedpartially_filledcompletecanceledfaileddisconnectedHow the order is priced.
marketlimitstopstop_limitLimit price, for limit and stop-limit orders. For multi-leg trades, the net premium per spread unit.
Price that triggers a stop or stop-limit order.
Take-profit exit attached to a buy or OCO sell order.
Exit trigger level
Absolute price ($) or percent from entry price (%).
$%Stop-loss exit attached to a buy or OCO sell order.
Exit trigger level
Absolute price ($) or percent from entry price (%).
$%How long the order stays active.
daygtciocfokExecution window selected for the order, when known.
regularpremarketafter_hoursextendedovernight24_524_7When the order was sent to the brokerage.
When the order finished filling.
Human-readable failure or order warning, when available.
Fees the brokerage charged.
Legs of a multi-leg trade. Null for simple trades.
Each item has:
Whether the leg trades an equity option, the underlying stock, or an option on a futures contract.
optionequityfuture_optionWhether the leg buys or sells.
buysellWhether the leg opens or closes a position.
opencloseOCC option contract symbol, e.g. 260717C00435000. Null for stock and futures-option legs.
What the leg trades: the ticker for a stock leg, e.g. AAPL; the ticker followed by the OCC symbol for an option leg, e.g. AAPL260717C00435000; or the futures option symbol for a futures-option leg, e.g. ./ESZ26 EW3X26 261120C6000 (underlying contract, option series, expiration, call or put, strike).
Number of option contracts, or shares for a stock leg.
The leg's fill price per share. Null when the brokerage only reports a price for the whole package.
Futures contract month code, e.g. Z26. Null for everything but futures.
Set when the trade records an option assignment, exercise, or expiration instead of an order.
assignmentexerciseexpirationAnalysis of the screenshot the trade was created from.
The traded asset. Expanded in get_trades responses and TRADE_UPDATED webhooks.
The database ID. Use for lookups.
When the record was created.
When the record last changed.
Company or coin name.
Ticker symbol.
Asset type: 2 for stocks, 4 for crypto, 8 for indexes, 16 for futures.
024816Logo image URL.
Short description of the asset.
Exchange the asset trades on.
ISO 10383 market identifier code of the exchange.
Underlying ticker, for derivatives.
Country the asset is listed in.
Root-level futures specifications. Null for non-futures assets or unknown products. Contract-specific dates, quotes, and account margin are separate.
Futures monetary value of a 1.00 move in the quoted price, per contract, in quote_currency. Quoted price × multiplier × contracts gives notional exposure.
Default outright futures price increment, in quoted price units. tick_size × multiplier gives the monetary tick value per contract.
ISO 4217 currency of futures monetary values after applying multiplier, e.g. USD.
Listed futures delivery month codes in calendar order, e.g. HMUZ for March, June, September, December.
When the asset was delisted.
Balance
Money fields are Balance objects.
Amount in currency.
ISO 4217 currency code, such as USD.