latestOpenAPI 3.1.02026-08-22181751733.6 KB

67f9f562c2c6

tradingOrders

Trade History

Retrieve a list of trades, up to a maximum of 7 days prior.

get/iserver/account/trades

Query parameters

daysinteger

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_idstring

IB-assigned execution identifier.

symbolstring

Symbol of the instrument involved in the execution.

supports_tax_opt'0' | '1'

Indicates whether the order is supported by IB's Tax Optimization tool.

side'B' | 'S'

Side of the execution.

order_descriptionstring

Human-readable description of the outcome of the execution.

trade_timestring

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

trade_time_rinteger

Unix timestamp of the execution time in milliseconds.

sizenumber double

The size of the execution in units of the instrument.

pricestring

The price at which the execution occurred.

order_refstring

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

submitterstring

The IB username that originated the order ticket against which the execution occurred.

exchangestring

The exchange or other venue on which the execution occurred.

commissionstring

Commissions incurred by the execution. May also include

net_amountnumber double

net_amount

accountstring

The IB account ID of the account that received the execution.

accountCodestring

The IB account ID of the account that received the execution.

account_allocation_namestring

The IB account ID of the account that received the execution.

company_namestring

Name of business associated with instrument, or otherwise description of instrument.

contract_description_1string

Human-readable description of the order's instrument.

sec_type'STK' | 'OPT' | 'FUT' | 'FOP' | 'CASH' | 'CRYPTO' | 'BOND' | 'WAR' | 'FUND'

IB asset class identifier.

listing_exchangestring

The primary exchange on which the instrument is listed.

conidstring

Contract ID of the order's instrument.

conidExstring

Contract ID and routing destination in format 123456@EXCHANGE.

clearing_idstring

Identifier of the firm clearing the trade. Value is "IB" if account is cleared by Interactive Brokers.

clearing_namestring

Name of the firm clearing the trade. Value is "IB" if account is cleared by Interactive Brokers.

liquidation_trade'0' | '1'

Indicates whether the trade is the result of a liquidiation by IB.

is_event_trading'0' | '1'

Indicates whether the order ticket is an Event Trading order.

order_idinteger

Order ID