IOrder

Property

Description

orderId() As Integer

The id for this order.

clientId() As Integer

The id of the client that placed this order.

permid() As Integer

The TWS id used to identify orders, remains the same over TWS sessions.

action() As String

Identifies the side. Valid values are: BUY, SELL, SSHORT

totalQuantity() As Integer

The order quantity.

orderType() As String

Identifies the order type. Valid values are:

·          MKT

·          MKTCLS

·          LMT

·          LMTCLS

·          PEGMKT

·          SCALE

·          STP

·          STPLMT

·          TRAIL

·          REL

·          VWAP

·          TRAILLIMIT

lmtPrice() As Double

This is the LIMIT price, used for limit, stop-limit and relative orders. In all other cases specify zero. For relative orders with no limit price, also specify zero.

auxPrice() As Double

This is the STOP price for stop-limit orders, and the offset amount for relative orders. In all other cases, specify zero.

timeInForce() As String

The time in force. Valid values are: DAY, GTC, IOC, GTD.

ocaGroup() As String

Identifies an OCA (one cancels all) group.

ocaType() As Integer

Tells how to handle remaining orders in an OCA group when one order or part of an order executes. Valid values include:

·          1 = Cancel all remaining orders with block

·          2 = Remaining orders are proportionately reduced in size with block

·          3 = Remaining orders are proportionately reduced in size with no block

If you use a value "with block" gives your order has overfill protection. This means  that only one order in the group will be routed at a time to remove the possibility of an overfill.

account() As String

The account. For institutional customers only.

openClose() As String

Specifies whether the order is an open or close order. For institutional customers only. Valid values are O, C.

origin() As Integer

The order origin. For institutional customers only. Valid values are 0 = customer, 1 = firm

orderRef() String

The order reference. For institutional customers only.

transmit() As Integer

Specifies whether the order will be transmitted by TWS. If set to false, the order will be created at TWS but will not be sent.

parentId() As Integer

The order ID of the parent order, used for bracket and auto trailing stop orders.

blockOrder() As Integer

If set to true, specifies that the order is an ISE Block order.

sweepToFill() As Integer

If set to true, specifies that the order is a Sweep-to-Fill order.

displaySize() As Integer

The publicly disclosed order size, used when placing Iceberg orders.

triggerMethod() As Integer

Specifies how Simulated Stop, Stop-Limit and Trailing Stop orders are triggered. Valid values are:

·          0 - The default value. The "double bid/ask" method will be used for orders for OTC stocks and US options. All other orders will used the "last" method.

·          1 - use "double bid/ask" method, where stop orders are triggered based on two consecutive bid or ask prices.

·          2 - "last" method, where stop orders are triggered based on the last price.

·          3 double last method.

·          4 bid/ask method.

·          7 last or bid/ask method.

·          8 mid-point method.

outsideRth() As Integer

If set to true, allows orders to also trigger or fill outside of regular trading hours.

hidden() As Integer

If set to true, the order will not be visible when viewing the market depth. This option only applies to orders routed to the ISLAND exchange.

discretionaryAmt() As Double

The amount off the limit price allowed for discretionary orders.

goodAfterTime() As String

The trade's "Good After Time," format
"YYYYMMDD hh:mm:ss (optional time zone)"

Use an empty String if not applicable.

goodTillDate() As String

You must enter a tif value of GTD. The trade's "Good Till Date," format is:

YYYYMMDD hh:mm:ss (optional time zone)

Use an empty String if not applicable.

faGroup() As String

The Financial Advisor group the trade will be allocated to -- use an empty String if not applicable.

faProfile() As String

The Financial Advisor allocation profile the trade will be allocated to -- use an empty String if not applicable.

faMethod() As String

The Financial Advisor allocation method the trade will be allocated with -- use an empty String if not applicable.

faPercentage() As String

The Financial Advisor percentage concerning the trade's allocation -- use an empty String if not applicable.

shortSaleSlot() As Integer

Values are 1 or 2.

designatedLocation() As String

Use only when shortSaleSlot value = 2.

ocaType() As Integer

Cancel on Fill with Block = 1
Reduce on Fill with Block = 2
Reduce on Fill without Block = 3

overridePercentageConstraints() As Integer

Precautionary constraints are defined on the TWS Presets page, and help ensure tha tyour price and size order values are reasonable. Orders sent from the API are also validated against these safety constraints, and may be rejected if any constraint is violated. To override validation, set this parameter’s value to True.

Valid values include:

·          0 = False

·          1 = True

rule80A() As String

Valid values are:

·          Individual = 'I'

·          Agency = 'A',

·          AgentOtherMember = 'W'

·          IndividualPTIA = 'J'

·          AgencyPTIA = 'U'

·          AgentOtherMemberPTIA = 'M'

·          IndividualPT = 'K'

·          AgencyPT = 'Y'

·          AgentOtherMemberPT = 'N'

settlingFirm() As String

Institutional only.

clearingAccount() As String

For IBExecution customers: Specifies the true beneficiary of the order. This value is required for FUT/FOP orders for reporting to the exchange.

clearingIntent() As String

For IBExecution customers: Valid values are: IB, Away, and PTA (post trade allocation).

allOrNone() As Integer

yes=1, no=0

minQty() As Integer

Identifies a minimum quantity order type.

percentOffset() As Double

The percent offset amount for relative orders.

eTradeOnly() As Integer

Trade with electronic quotes.

yes = 1, no = 0

firmQuoteOnly() As Integer

Trade with firm quotes.

yes = 1, no = 0

nbboPriceCap() As Double

The maximum Smart order distance from the NBBO.

auctionStrategy() As Integer

Valid values are:

·          match = 1

·          improvement = 2

·          transparent = 3

For BOX exchange only.

startingPrice() As Double

The starting price. Valid on BOX orders only.

stockRefPrice() As Double

The stock reference price. The reference price is used for VOL orders to compute the limit price sent to an exchange (whether or not Continuous Update is selected), and for price range monitoring.

delta() As Double

The stock delta. Valid on BOX orders only.

stockRangeLower() As Double

The lower value for the acceptable underlying stock price range. For price improvement option orders on BOX and VOL orders with dynamic management.

stockRangeUpper() As Double

The upper value for the acceptable underlying stock price range. For price improvement option orders on BOX and VOL orders with dynamic management.

volatility() Double

What the price is, computed via TWS’s Options Analytics.  For VOL orders, the limit price sent to an exchange is not editable, as it is the output of a function.  Volatility is expressed as a percentage.

volatilityType() Integer

How the volatility is calculated.

·          Daily = 1

·          Annual = 2

deltaNeutralOrderType() As String

VOL orders only. Enter an order type to instruct TWS to submit a delta neutral trade on full or partial execution of the VOL order. For no hedge delta order to be sent, specify NONE.

deltaNeutralAuxPrice() As Double

VOL orders only. Use this field to enter a value if  the value in the deltaNeutralOrderType field is an order type that requires an Aux price, such as a REL order.

continuousUpdate() As Integer

Used for dynamic management of volatility orders. Determines if TWS is supposed to update the order price as the underlying moves. If selected, the limit price sent to an exchange is modified by TWS if the computed price of the option changes enough to warrant doing so. This helps keep the limit price sent to the exchange updated as the underlying price changes.

ireferencePriceType() As Integer

For dynamic management of volatility orders. Set to

·          1 = Average of National Best Bid or Ask, or set to

·          2 =  National Best Bid when buying a call or selling a put; and National Best Ask when selling a call or buying a put.

trailStopPrice() As Double

For TRAILLIMIT orders only

scaleInitLevelSize() As Integer

For Scale orders: Defines the size of the first, or initial, order component.

scaleSubsLevelSize() As Integer

For Scale orders: Defines the order size of the subsequent scale order components. Used in conjunction with scaleInitLevelSize().

scalePriceIncrement() As Double

For Scale orders: Defines the price increment between scale components. This field is required.

basisPoints() As Integer

For EFP orders only

basisPointsType() As Double

For EFP orders only

whatIf() As Integer

Use to request pre-trade commissions and margin information.

If set to true, margin and commissions data is received back via the IOrderState() object for the openOrder() callback.

optOutSmartRouting() As Integer

Use to opt out of default SmartRouting for orders routed directly to ASX. This attribute defaults to false unless explicitly set to true. When set to false, orders routed directly to ASX will NOT use SmartRouting. When set to true, orders routed directly to ASX orders WILL use SmartRouting.

hedgeType() As String

For hedge orders. Possible values are:

·          D = Delta

·          B = Beta

·          F = FX

·          P = Pair

hedgeParam() As String

Sent from API only if hedgeType is NOT null. hedgeParam is required for Pair hedge order, optional for Beta hedge orders, and ignored for Delta and FX hedge orders.