The Execution Object

View as MarkdownOpen in Claude

The Execution object is used to maintain all data related to a user’s traded orders. This can be used in both querying execution details and navigating received data. The details provided will display all information pertaining to the execution, including how many shares were filled, the price of the execution, and what time it took place.

Execution()

OrderId: int. The API client’s order Id. May not be unique to an account.

ClientId: int. The API client identifier which placed the order which originated this execution.

ExecId: String. The 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, e.g. an ExecId ending in “.02” would be a correction of a previous execution with an ExecId ending in “.01”.

Time: String. The execution’s server time.

AcctNumber: String. The account to which the order was allocated.

Exchange: String. The exchange where the execution took place.

Side: String. Specifies if the transaction was buy or sale BOT for bought, SLD for sold.

Shares: decimal. The number of shares filled.

Price: double. The order’s execution price excluding commissions.

PermId: int. The TWS order identifier. The PermId can be 0 for trades originating outside IB.

Liquidation: int. Identifies whether an execution occurred because of an IB-initiated liquidation.

CumQty: decimal. Cumulative quantity. Used in regular trades, combo trades and legs of the combo.

AvgPrice: double. Average price. Used in regular trades, combo trades and legs of the combo. Does not include commissions.

OrderRef: String. The 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.

EvRule: String. The Economic Value Rule name and the respective optional argument. The two values should be separated by a colon. For example, aussieBond:YearsToExpiration=3. When the optional argument is not present, the first value will be followed by a colon.

EvMultiplier: double. Tells 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.

ModelCode: String. model code

LastLiquidity: Liquidity. The liquidity type of the execution.

pendingPriceRevision: bool. Describes if the execution is still pending price revision.

Given additional structures for executions are ever evolving, it is recommended to review the relevant Execution class in your programming language for a comprehensive review of what fields are available.

Execution Class Reference