Trade History

View as MarkdownOpen in Claude
Retrieve a list of trades, up to a maximum of 7 days prior.

Authentication

AuthorizationBearer
SSO bearer token.

Query parameters

dayslongOptional
The number of prior days prior to include in response, up to a maximum of 7. If omitted, only the current day's executions will be returned.

Response

trades
execution_idstringOptional

IB-assigned execution identifier.

symbolstringOptional
Symbol of the instrument involved in the execution.
supports_tax_optenumOptional
Indicates whether the order is supported by IB's Tax Optimization tool.
Allowed values:
sideenumOptional
Side of the execution.
Allowed values:
order_descriptionstringOptional

Human-readable description of the outcome of the execution.

trade_timestringOptional

UTC date and time of the execution in format YYYYMMDD-hh:mm:ss.

trade_time_rlongOptional
Unix timestamp of the execution time in milliseconds.
sizedoubleOptional
The size of the execution in units of the instrument.
pricestringOptional
The price at which the execution occurred.
order_refstringOptional

The client-provided customer order identifier. Specified via cOID during order submission in the Web API.

submitterstringOptional
The IB username that originated the order ticket against which the execution occurred.
exchangestringOptional
The exchange or other venue on which the execution occurred.
commissionstringOptional
Commissions incurred by the execution. May also include
net_amountdoubleOptional

net_amount

accountstringOptional
The IB account ID of the account that received the execution.
accountCodestringOptional
The IB account ID of the account that received the execution.
account_allocation_namestringOptional
The IB account ID of the account that received the execution.
company_namestringOptional
Name of business associated with instrument, or otherwise description of instrument.
contract_description_1stringOptional

Human-readable description of the order’s instrument.

sec_typeenumOptional
IB asset class identifier.
listing_exchangestringOptional
The primary exchange on which the instrument is listed.
conidstringOptional
Contract ID of the order's instrument.
conidExstringOptional

Contract ID and routing destination in format 123456@EXCHANGE.

clearing_idstringOptional
Identifier of the firm clearing the trade. Value is "IB" if account is cleared by Interactive Brokers.
clearing_namestringOptional
Name of the firm clearing the trade. Value is "IB" if account is cleared by Interactive Brokers.
liquidation_tradeenumOptional
Indicates whether the trade is the result of a liquidiation by IB.
Allowed values:
is_event_tradingenumOptional
Indicates whether the order ticket is an Event Trading order.
Allowed values:
order_idlongOptional
Order ID

Errors

401
Unauthorized Error
500
Internal Server Error
503
Service Unavailable Error