Introduction

View as MarkdownOpen in Claude

Class describing an order’s execution.

NameTypeDescription
OrderIdintThe API client’s order Id. May not be unique to an account.
ClientIdintThe API client identifier which placed the order which originated this execution.
ExecIdstringThe execution’s identifier. Each partial fill has a separate ExecId. A correction is indicated by an ExecId which differs from a previous ExecId in only the digits after the final period
TimestringThe execution’s server time.
AcctNumberstringThe account to which the order was allocated.
ExchangestringThe exchange where the execution took place.
SidestringSpecifies if the transaction was buy or sale BOT for bought
SharesdecimalThe number of shares filled.
PricedoubleThe order’s execution price excluding commissions.
PermIdintThe TWS order identifier. The PermId can be 0 for trades originating outside IB.
LiquidationintIdentifies whether an execution occurred because of an IB-initiated liquidation.
CumQtydecimalCumulative quantity. Used in regular trades
AvgPricedoubleAverage price. Used in regular trades
OrderRefstringThe OrderRef is a user-customizable string that can be set from the API or TWS and will be associated with an order for its lifetime.
EvRulestringThe Economic Value Rule name and the respective optional argument. The two values should be separated by a colon. For example
EvMultiplierdoubleTells you approximately how much the market value of a contract would change if the price were to change by 1. It cannot be used to get market value by multiplying the price by the approximate multiplier.
ModelCodestringmodel code
LastLiquidityLiquidityThe liquidity type of the execution. Requires TWS 968+ and API v973.05+. Python API specifically requires API v973.06+.
PendingPriceRevisionboolpending price revision