Skip to content

Trade ​

An order and its fills. Get trades and the trade operations return trades, and TRADE_UPDATED webhook events send one as data.

Fields ​

idnumber | string

Trade It trade ID. Pass it as trade_id to execute or cancel the trade.

created_atstring

When the record was created.

updated_atstringoptional

When the record last changed.

user_idnumber | string

The Trade It user who owns the trade.

asset_idnumber | string

The traded asset, or the underlying for options.

account_idnumber | string | null

The account the trade is sent to.

sourcestring | null

Where the trade came from: ios_app, chatgpt, mcp, api, or discord, or brokerage:<brokerage id> for trades synced from brokerage history.

image_urlstring | null

Screenshot the trade was created from.

external_idstring

The brokerage's order ID. Not included in webhook events.

typeenum

0 for a simple buy/sell, 1 for options/multi-leg.

01
actionenum

Whether the trade buys or sells.

buysell
directionenum | null

Whether a multi-leg trade pays (debit) or receives (credit) its net premium. Null for simple trades.

debitcrediteven
total_unitsnumber

Shares or coins ordered. A multi-leg trade counts its whole package as 1.

filled_unitsnumber

Units filled so far.

canceled_unitsnumber

Units canceled. A canceled order can still be partly filled.

notional_amountBalance | null

Dollar amount, for orders placed by value instead of units.

execution_priceBalance | null

Average fill price, always positive. For multi-leg trades, the net cash for the whole package. Null until something fills.

statusenum

Order status. complete, canceled, failed, and disconnected are final.

draftpendingplacedpartially_filledcompletecanceledfaileddisconnected
order_typeenum

How the order is priced.

marketlimitstopstop_limit
limit_priceBalance | null

Limit price, for limit and stop-limit orders. For multi-leg trades, the net premium per spread unit.

stop_priceBalance | null

Price that triggers a stop or stop-limit order.

take_profitobject | nulloptional

Take-profit exit attached to a buy.

valuenumber

Exit trigger level

unitenum

Absolute price ($) or percent from entry price (%).

$%
stop_lossobject | nulloptional

Stop-loss exit attached to a buy.

valuenumber

Exit trigger level

unitenum

Absolute price ($) or percent from entry price (%).

$%
time_in_forceenum | null

How long the order stays active.

daygtciocfok
placed_atstring (format: date-time) | null

When the order was sent to the brokerage.

executed_atstring (format: date-time) | null

When the order finished filling.

error_messagestring | null

Why the trade failed.

feeBalance | null

Fees the brokerage charged.

legsarray of object | null

Legs of a multi-leg trade. Null for simple trades.

Each item has:

typeenum

Whether the leg trades an option or the underlying stock.

optionequity
actionenum

Whether the leg buys or sells.

buysell
position_effectenum | null

Whether the leg opens or closes a position.

openclose
occstring | null

OCC option contract symbol, e.g. 260717C00435000. Null for stock legs.

quantitynumber

Number of option contracts, or shares for a stock leg.

execution_priceBalance | null

The leg's fill price per share. Null when the brokerage only reports a price for the whole package.

eventenum | null

Set when the trade records an option assignment, exercise, or expiration instead of an order.

assignmentexerciseexpiration
analysisstring | null

Analysis of the screenshot the trade was created from.

assetobjectoptional

The traded asset. Returned by get_trades; webhook events only include asset_id.

idnumber | string

The database ID. Use for lookups.

created_atstring

When the record was created.

updated_atstringoptional

When the record last changed.

namestring | null

Company or coin name.

tickerstring

Ticker symbol.

typeenum

Asset type: 2 for stocks, 4 for crypto, 8 for indexes.

0248
logo_urlstring | null

Logo image URL.

descriptionstring | null

Short description of the asset.

exchangestring

Exchange the asset trades on.

mic_codestring | null

ISO 10383 market identifier code of the exchange.

underlyingstring | null

Underlying ticker, for derivatives.

countrystring | null

Country the asset is listed in.

delisted_atstring (format: date-time) | null

When the asset was delisted.

Balance ​

Money fields are Balance objects.

amountnumber

Amount in currency.

currencystring

ISO 4217 currency code, such as USD.