ib_async.order
Generated from the installed ib_async 2.1.0 package. Signatures and defaults are version-specific.
Order types used by Interactive Brokers.
Public constants
| Name | Value |
|---|---|
UNSET_DOUBLE | 1.7976931348623157e+308 |
UNSET_INTEGER | 2147483647 |
BracketOrder
BracketOrder(parent: ForwardRef('Order'), takeProfit: ForwardRef('Order'), stopLoss: ForwardRef('Order'))
BracketOrder(parent, takeProfit, stopLoss)
ExecutionCondition
ExecutionCondition(condType: 'int' = 5, conjunction: 'str' = 'a', secType: 'str' = '', exch: 'str' = '', symbol: 'str' = '') -> None
ExecutionCondition(condType: 'int' = 5, conjunction: 'str' = 'a', secType: 'str' = '', exch: 'str' = '', symbol: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
condType | int | 5 |
conjunction | str | a |
secType | str | `` |
exch | str | `` |
symbol | str | `` |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
LimitOrder
LimitOrder(action: 'str', totalQuantity: 'float', lmtPrice: 'float', **kwargs)
Order for trading contracts.
https://interactivebrokers.github.io/tws-api/available_orders.html
Fields
| Name | Type | Default |
|---|---|---|
orderId | int | 0 |
clientId | int | 0 |
permId | int | 0 |
action | str | `` |
totalQuantity | float | 0.0 |
orderType | str | `` |
lmtPrice | float | Decimal | None | 1.7976931348623157e+308 |
auxPrice | float | Decimal | None | 1.7976931348623157e+308 |
tif | str | `` |
activeStartTime | str | `` |
activeStopTime | str | `` |
ocaGroup | str | `` |
ocaType | int | 0 |
orderRef | str | `` |
transmit | bool | True |
parentId | int | 0 |
blockOrder | bool | False |
sweepToFill | bool | False |
displaySize | int | 0 |
triggerMethod | int | 0 |
outsideRth | bool | False |
hidden | bool | False |
goodAfterTime | str | `` |
goodTillDate | str | `` |
rule80A | str | `` |
allOrNone | bool | False |
minQty | int | 2147483647 |
percentOffset | float | Decimal | 1.7976931348623157e+308 |
overridePercentageConstraints | bool | False |
trailStopPrice | float | Decimal | 1.7976931348623157e+308 |
trailingPercent | float | Decimal | 1.7976931348623157e+308 |
faGroup | str | `` |
faProfile | str | `` |
faMethod | str | `` |
faPercentage | str | `` |
designatedLocation | str | `` |
openClose | str | O |
origin | int | 0 |
shortSaleSlot | int | 0 |
exemptCode | int | -1 |
discretionaryAmt | float | 0.0 |
eTradeOnly | bool | False |
firmQuoteOnly | bool | False |
nbboPriceCap | float | Decimal | 1.7976931348623157e+308 |
optOutSmartRouting | bool | False |
auctionStrategy | int | 0 |
startingPrice | float | Decimal | 1.7976931348623157e+308 |
stockRefPrice | float | Decimal | 1.7976931348623157e+308 |
delta | float | Decimal | 1.7976931348623157e+308 |
stockRangeLower | float | Decimal | 1.7976931348623157e+308 |
stockRangeUpper | float | Decimal | 1.7976931348623157e+308 |
randomizePrice | bool | False |
randomizeSize | bool | False |
volatility | float | Decimal | 1.7976931348623157e+308 |
volatilityType | int | 2147483647 |
deltaNeutralOrderType | str | `` |
deltaNeutralAuxPrice | float | Decimal | 1.7976931348623157e+308 |
deltaNeutralConId | int | 0 |
deltaNeutralSettlingFirm | str | `` |
deltaNeutralClearingAccount | str | `` |
deltaNeutralClearingIntent | str | `` |
deltaNeutralOpenClose | str | `` |
deltaNeutralShortSale | bool | False |
deltaNeutralShortSaleSlot | int | 0 |
deltaNeutralDesignatedLocation | str | `` |
continuousUpdate | bool | False |
referencePriceType | int | 2147483647 |
basisPoints | float | Decimal | 1.7976931348623157e+308 |
basisPointsType | int | 2147483647 |
scaleInitLevelSize | int | 2147483647 |
scaleSubsLevelSize | int | 2147483647 |
scalePriceIncrement | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustValue | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustInterval | int | 2147483647 |
scaleProfitOffset | float | Decimal | 1.7976931348623157e+308 |
scaleAutoReset | bool | False |
scaleInitPosition | int | 2147483647 |
scaleInitFillQty | int | 2147483647 |
scaleRandomPercent | bool | False |
scaleTable | str | `` |
hedgeType | str | `` |
hedgeParam | str | `` |
account | str | `` |
settlingFirm | str | `` |
clearingAccount | str | `` |
clearingIntent | str | `` |
algoStrategy | str | `` |
algoParams | list[TagValue] | factory: list |
smartComboRoutingParams | list[TagValue] | factory: list |
algoId | str | `` |
whatIf | bool | False |
notHeld | bool | False |
solicited | bool | False |
modelCode | str | `` |
orderComboLegs | list[OrderComboLeg] | factory: list |
orderMiscOptions | list[TagValue] | factory: list |
referenceContractId | int | 0 |
peggedChangeAmount | float | 0.0 |
isPeggedChangeAmountDecrease | bool | False |
referenceChangeAmount | float | 0.0 |
referenceExchangeId | str | `` |
adjustedOrderType | str | `` |
triggerPrice | float | Decimal | None | 1.7976931348623157e+308 |
adjustedStopPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedStopLimitPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedTrailingAmount | float | Decimal | 1.7976931348623157e+308 |
adjustableTrailingUnit | int | 0 |
lmtPriceOffset | float | Decimal | 1.7976931348623157e+308 |
conditions | list[OrderCondition] | factory: list |
conditionsCancelOrder | bool | False |
conditionsIgnoreRth | bool | False |
extOperator | str | `` |
softDollarTier | SoftDollarTier | factory: SoftDollarTier |
cashQty | float | Decimal | 1.7976931348623157e+308 |
mifid2DecisionMaker | str | `` |
mifid2DecisionAlgo | str | `` |
mifid2ExecutionTrader | str | `` |
mifid2ExecutionAlgo | str | `` |
dontUseAutoPriceForHedge | bool | False |
isOmsContainer | bool | False |
discretionaryUpToLimitPrice | bool | False |
autoCancelDate | str | `` |
filledQuantity | float | Decimal | 1.7976931348623157e+308 |
refFuturesConId | int | 0 |
autoCancelParent | bool | False |
shareholder | str | `` |
imbalanceOnly | bool | False |
routeMarketableToBbo | bool | False |
parentPermId | int | 0 |
usePriceMgmtAlgo | bool | False |
duration | int | 2147483647 |
postToAts | int | 2147483647 |
advancedErrorOverride | str | `` |
manualOrderTime | str | `` |
minTradeQty | int | 2147483647 |
minCompeteSize | int | 2147483647 |
competeAgainstBestOffset | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtWhole | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtHalf | float | Decimal | 1.7976931348623157e+308 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
MarginCondition
MarginCondition(condType: 'int' = 4, conjunction: 'str' = 'a', isMore: 'bool' = True, percent: 'int' = 0) -> None
MarginCondition(condType: 'int' = 4, conjunction: 'str' = 'a', isMore: 'bool' = True, percent: 'int' = 0)
Fields
| Name | Type | Default |
|---|---|---|
condType | int | 4 |
conjunction | str | a |
isMore | bool | True |
percent | int | 0 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
MarketOrder
MarketOrder(action: 'str', totalQuantity: 'float', **kwargs)
Order for trading contracts.
https://interactivebrokers.github.io/tws-api/available_orders.html
Fields
| Name | Type | Default |
|---|---|---|
orderId | int | 0 |
clientId | int | 0 |
permId | int | 0 |
action | str | `` |
totalQuantity | float | 0.0 |
orderType | str | `` |
lmtPrice | float | Decimal | None | 1.7976931348623157e+308 |
auxPrice | float | Decimal | None | 1.7976931348623157e+308 |
tif | str | `` |
activeStartTime | str | `` |
activeStopTime | str | `` |
ocaGroup | str | `` |
ocaType | int | 0 |
orderRef | str | `` |
transmit | bool | True |
parentId | int | 0 |
blockOrder | bool | False |
sweepToFill | bool | False |
displaySize | int | 0 |
triggerMethod | int | 0 |
outsideRth | bool | False |
hidden | bool | False |
goodAfterTime | str | `` |
goodTillDate | str | `` |
rule80A | str | `` |
allOrNone | bool | False |
minQty | int | 2147483647 |
percentOffset | float | Decimal | 1.7976931348623157e+308 |
overridePercentageConstraints | bool | False |
trailStopPrice | float | Decimal | 1.7976931348623157e+308 |
trailingPercent | float | Decimal | 1.7976931348623157e+308 |
faGroup | str | `` |
faProfile | str | `` |
faMethod | str | `` |
faPercentage | str | `` |
designatedLocation | str | `` |
openClose | str | O |
origin | int | 0 |
shortSaleSlot | int | 0 |
exemptCode | int | -1 |
discretionaryAmt | float | 0.0 |
eTradeOnly | bool | False |
firmQuoteOnly | bool | False |
nbboPriceCap | float | Decimal | 1.7976931348623157e+308 |
optOutSmartRouting | bool | False |
auctionStrategy | int | 0 |
startingPrice | float | Decimal | 1.7976931348623157e+308 |
stockRefPrice | float | Decimal | 1.7976931348623157e+308 |
delta | float | Decimal | 1.7976931348623157e+308 |
stockRangeLower | float | Decimal | 1.7976931348623157e+308 |
stockRangeUpper | float | Decimal | 1.7976931348623157e+308 |
randomizePrice | bool | False |
randomizeSize | bool | False |
volatility | float | Decimal | 1.7976931348623157e+308 |
volatilityType | int | 2147483647 |
deltaNeutralOrderType | str | `` |
deltaNeutralAuxPrice | float | Decimal | 1.7976931348623157e+308 |
deltaNeutralConId | int | 0 |
deltaNeutralSettlingFirm | str | `` |
deltaNeutralClearingAccount | str | `` |
deltaNeutralClearingIntent | str | `` |
deltaNeutralOpenClose | str | `` |
deltaNeutralShortSale | bool | False |
deltaNeutralShortSaleSlot | int | 0 |
deltaNeutralDesignatedLocation | str | `` |
continuousUpdate | bool | False |
referencePriceType | int | 2147483647 |
basisPoints | float | Decimal | 1.7976931348623157e+308 |
basisPointsType | int | 2147483647 |
scaleInitLevelSize | int | 2147483647 |
scaleSubsLevelSize | int | 2147483647 |
scalePriceIncrement | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustValue | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustInterval | int | 2147483647 |
scaleProfitOffset | float | Decimal | 1.7976931348623157e+308 |
scaleAutoReset | bool | False |
scaleInitPosition | int | 2147483647 |
scaleInitFillQty | int | 2147483647 |
scaleRandomPercent | bool | False |
scaleTable | str | `` |
hedgeType | str | `` |
hedgeParam | str | `` |
account | str | `` |
settlingFirm | str | `` |
clearingAccount | str | `` |
clearingIntent | str | `` |
algoStrategy | str | `` |
algoParams | list[TagValue] | factory: list |
smartComboRoutingParams | list[TagValue] | factory: list |
algoId | str | `` |
whatIf | bool | False |
notHeld | bool | False |
solicited | bool | False |
modelCode | str | `` |
orderComboLegs | list[OrderComboLeg] | factory: list |
orderMiscOptions | list[TagValue] | factory: list |
referenceContractId | int | 0 |
peggedChangeAmount | float | 0.0 |
isPeggedChangeAmountDecrease | bool | False |
referenceChangeAmount | float | 0.0 |
referenceExchangeId | str | `` |
adjustedOrderType | str | `` |
triggerPrice | float | Decimal | None | 1.7976931348623157e+308 |
adjustedStopPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedStopLimitPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedTrailingAmount | float | Decimal | 1.7976931348623157e+308 |
adjustableTrailingUnit | int | 0 |
lmtPriceOffset | float | Decimal | 1.7976931348623157e+308 |
conditions | list[OrderCondition] | factory: list |
conditionsCancelOrder | bool | False |
conditionsIgnoreRth | bool | False |
extOperator | str | `` |
softDollarTier | SoftDollarTier | factory: SoftDollarTier |
cashQty | float | Decimal | 1.7976931348623157e+308 |
mifid2DecisionMaker | str | `` |
mifid2DecisionAlgo | str | `` |
mifid2ExecutionTrader | str | `` |
mifid2ExecutionAlgo | str | `` |
dontUseAutoPriceForHedge | bool | False |
isOmsContainer | bool | False |
discretionaryUpToLimitPrice | bool | False |
autoCancelDate | str | `` |
filledQuantity | float | Decimal | 1.7976931348623157e+308 |
refFuturesConId | int | 0 |
autoCancelParent | bool | False |
shareholder | str | `` |
imbalanceOnly | bool | False |
routeMarketableToBbo | bool | False |
parentPermId | int | 0 |
usePriceMgmtAlgo | bool | False |
duration | int | 2147483647 |
postToAts | int | 2147483647 |
advancedErrorOverride | str | `` |
manualOrderTime | str | `` |
minTradeQty | int | 2147483647 |
minCompeteSize | int | 2147483647 |
competeAgainstBestOffset | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtWhole | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtHalf | float | Decimal | 1.7976931348623157e+308 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
Order
Order(orderId: 'int' = 0, clientId: 'int' = 0, permId: 'int' = 0, action: 'str' = '', totalQuantity: 'float' = 0.0, orderType: 'str' = '', lmtPrice: 'float | Decimal | None' = 1.7976931348623157e+308, auxPrice: 'float | Decimal | None' = 1.7976931348623157e+308, tif: 'str' = '', activeStartTime: 'str' = '', activeStopTime: 'str' = '', ocaGroup: 'str' = '', ocaType: 'int' = 0, orderRef: 'str' = '', transmit: 'bool' = True, parentId: 'int' = 0, blockOrder: 'bool' = False, sweepToFill: 'bool' = False, displaySize: 'int' = 0, triggerMethod: 'int' = 0, outsideRth: 'bool' = False, hidden: 'bool' = False, goodAfterTime: 'str' = '', goodTillDate: 'str' = '', rule80A: 'str' = '', allOrNone: 'bool' = False, minQty: 'int' = 2147483647, percentOffset: 'float | Decimal' = 1.7976931348623157e+308, overridePercentageConstraints: 'bool' = False, trailStopPrice: 'float | Decimal' = 1.7976931348623157e+308, trailingPercent: 'float | Decimal' = 1.7976931348623157e+308, faGroup: 'str' = '', faProfile: 'str' = '', faMethod: 'str' = '', faPercentage: 'str' = '', designatedLocation: 'str' = '', openClose: 'str' = 'O', origin: 'int' = 0, shortSaleSlot: 'int' = 0, exemptCode: 'int' = -1, discretionaryAmt: 'float' = 0.0, eTradeOnly: 'bool' = False, firmQuoteOnly: 'bool' = False, nbboPriceCap: 'float | Decimal' = 1.7976931348623157e+308, optOutSmartRouting: 'bool' = False, auctionStrategy: 'int' = 0, startingPrice: 'float | Decimal' = 1.7976931348623157e+308, stockRefPrice: 'float | Decimal' = 1.7976931348623157e+308, delta: 'float | Decimal' = 1.7976931348623157e+308, stockRangeLower: 'float | Decimal' = 1.7976931348623157e+308, stockRangeUpper: 'float | Decimal' = 1.7976931348623157e+308, randomizePrice: 'bool' = False, randomizeSize: 'bool' = False, volatility: 'float | Decimal' = 1.7976931348623157e+308, volatilityType: 'int' = 2147483647, deltaNeutralOrderType: 'str' = '', deltaNeutralAuxPrice: 'float | Decimal' = 1.7976931348623157e+308, deltaNeutralConId: 'int' = 0, deltaNeutralSettlingFirm: 'str' = '', deltaNeutralClearingAccount: 'str' = '', deltaNeutralClearingIntent: 'str' = '', deltaNeutralOpenClose: 'str' = '', deltaNeutralShortSale: 'bool' = False, deltaNeutralShortSaleSlot: 'int' = 0, deltaNeutralDesignatedLocation: 'str' = '', continuousUpdate: 'bool' = False, referencePriceType: 'int' = 2147483647, basisPoints: 'float | Decimal' = 1.7976931348623157e+308, basisPointsType: 'int' = 2147483647, scaleInitLevelSize: 'int' = 2147483647, scaleSubsLevelSize: 'int' = 2147483647, scalePriceIncrement: 'float | Decimal' = 1.7976931348623157e+308, scalePriceAdjustValue: 'float | Decimal' = 1.7976931348623157e+308, scalePriceAdjustInterval: 'int' = 2147483647, scaleProfitOffset: 'float | Decimal' = 1.7976931348623157e+308, scaleAutoReset: 'bool' = False, scaleInitPosition: 'int' = 2147483647, scaleInitFillQty: 'int' = 2147483647, scaleRandomPercent: 'bool' = False, scaleTable: 'str' = '', hedgeType: 'str' = '', hedgeParam: 'str' = '', account: 'str' = '', settlingFirm: 'str' = '', clearingAccount: 'str' = '', clearingIntent: 'str' = '', algoStrategy: 'str' = '', algoParams: 'list[TagValue]' = <factory>, smartComboRoutingParams: 'list[TagValue]' = <factory>, algoId: 'str' = '', whatIf: 'bool' = False, notHeld: 'bool' = False, solicited: 'bool' = False, modelCode: 'str' = '', orderComboLegs: 'list[OrderComboLeg]' = <factory>, orderMiscOptions: 'list[TagValue]' = <factory>, referenceContractId: 'int' = 0, peggedChangeAmount: 'float' = 0.0, isPeggedChangeAmountDecrease: 'bool' = False, referenceChangeAmount: 'float' = 0.0, referenceExchangeId: 'str' = '', adjustedOrderType: 'str' = '', triggerPrice: 'float | Decimal | None' = 1.7976931348623157e+308, adjustedStopPrice: 'float | Decimal' = 1.7976931348623157e+308, adjustedStopLimitPrice: 'float | Decimal' = 1.7976931348623157e+308, adjustedTrailingAmount: 'float | Decimal' = 1.7976931348623157e+308, adjustableTrailingUnit: 'int' = 0, lmtPriceOffset: 'float | Decimal' = 1.7976931348623157e+308, conditions: 'list[OrderCondition]' = <factory>, conditionsCancelOrder: 'bool' = False, conditionsIgnoreRth: 'bool' = False, extOperator: 'str' = '', softDollarTier: 'SoftDollarTier' = <factory>, cashQty: 'float | Decimal' = 1.7976931348623157e+308, mifid2DecisionMaker: 'str' = '', mifid2DecisionAlgo: 'str' = '', mifid2ExecutionTrader: 'str' = '', mifid2ExecutionAlgo: 'str' = '', dontUseAutoPriceForHedge: 'bool' = False, isOmsContainer: 'bool' = False, discretionaryUpToLimitPrice: 'bool' = False, autoCancelDate: 'str' = '', filledQuantity: 'float | Decimal' = 1.7976931348623157e+308, refFuturesConId: 'int' = 0, autoCancelParent: 'bool' = False, shareholder: 'str' = '', imbalanceOnly: 'bool' = False, routeMarketableToBbo: 'bool' = False, parentPermId: 'int' = 0, usePriceMgmtAlgo: 'bool' = False, duration: 'int' = 2147483647, postToAts: 'int' = 2147483647, advancedErrorOverride: 'str' = '', manualOrderTime: 'str' = '', minTradeQty: 'int' = 2147483647, minCompeteSize: 'int' = 2147483647, competeAgainstBestOffset: 'float | Decimal' = 1.7976931348623157e+308, midOffsetAtWhole: 'float | Decimal' = 1.7976931348623157e+308, midOffsetAtHalf: 'float | Decimal' = 1.7976931348623157e+308) -> None
Order for trading contracts.
https://interactivebrokers.github.io/tws-api/available_orders.html
Fields
| Name | Type | Default |
|---|---|---|
orderId | int | 0 |
clientId | int | 0 |
permId | int | 0 |
action | str | `` |
totalQuantity | float | 0.0 |
orderType | str | `` |
lmtPrice | float | Decimal | None | 1.7976931348623157e+308 |
auxPrice | float | Decimal | None | 1.7976931348623157e+308 |
tif | str | `` |
activeStartTime | str | `` |
activeStopTime | str | `` |
ocaGroup | str | `` |
ocaType | int | 0 |
orderRef | str | `` |
transmit | bool | True |
parentId | int | 0 |
blockOrder | bool | False |
sweepToFill | bool | False |
displaySize | int | 0 |
triggerMethod | int | 0 |
outsideRth | bool | False |
hidden | bool | False |
goodAfterTime | str | `` |
goodTillDate | str | `` |
rule80A | str | `` |
allOrNone | bool | False |
minQty | int | 2147483647 |
percentOffset | float | Decimal | 1.7976931348623157e+308 |
overridePercentageConstraints | bool | False |
trailStopPrice | float | Decimal | 1.7976931348623157e+308 |
trailingPercent | float | Decimal | 1.7976931348623157e+308 |
faGroup | str | `` |
faProfile | str | `` |
faMethod | str | `` |
faPercentage | str | `` |
designatedLocation | str | `` |
openClose | str | O |
origin | int | 0 |
shortSaleSlot | int | 0 |
exemptCode | int | -1 |
discretionaryAmt | float | 0.0 |
eTradeOnly | bool | False |
firmQuoteOnly | bool | False |
nbboPriceCap | float | Decimal | 1.7976931348623157e+308 |
optOutSmartRouting | bool | False |
auctionStrategy | int | 0 |
startingPrice | float | Decimal | 1.7976931348623157e+308 |
stockRefPrice | float | Decimal | 1.7976931348623157e+308 |
delta | float | Decimal | 1.7976931348623157e+308 |
stockRangeLower | float | Decimal | 1.7976931348623157e+308 |
stockRangeUpper | float | Decimal | 1.7976931348623157e+308 |
randomizePrice | bool | False |
randomizeSize | bool | False |
volatility | float | Decimal | 1.7976931348623157e+308 |
volatilityType | int | 2147483647 |
deltaNeutralOrderType | str | `` |
deltaNeutralAuxPrice | float | Decimal | 1.7976931348623157e+308 |
deltaNeutralConId | int | 0 |
deltaNeutralSettlingFirm | str | `` |
deltaNeutralClearingAccount | str | `` |
deltaNeutralClearingIntent | str | `` |
deltaNeutralOpenClose | str | `` |
deltaNeutralShortSale | bool | False |
deltaNeutralShortSaleSlot | int | 0 |
deltaNeutralDesignatedLocation | str | `` |
continuousUpdate | bool | False |
referencePriceType | int | 2147483647 |
basisPoints | float | Decimal | 1.7976931348623157e+308 |
basisPointsType | int | 2147483647 |
scaleInitLevelSize | int | 2147483647 |
scaleSubsLevelSize | int | 2147483647 |
scalePriceIncrement | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustValue | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustInterval | int | 2147483647 |
scaleProfitOffset | float | Decimal | 1.7976931348623157e+308 |
scaleAutoReset | bool | False |
scaleInitPosition | int | 2147483647 |
scaleInitFillQty | int | 2147483647 |
scaleRandomPercent | bool | False |
scaleTable | str | `` |
hedgeType | str | `` |
hedgeParam | str | `` |
account | str | `` |
settlingFirm | str | `` |
clearingAccount | str | `` |
clearingIntent | str | `` |
algoStrategy | str | `` |
algoParams | list[TagValue] | factory: list |
smartComboRoutingParams | list[TagValue] | factory: list |
algoId | str | `` |
whatIf | bool | False |
notHeld | bool | False |
solicited | bool | False |
modelCode | str | `` |
orderComboLegs | list[OrderComboLeg] | factory: list |
orderMiscOptions | list[TagValue] | factory: list |
referenceContractId | int | 0 |
peggedChangeAmount | float | 0.0 |
isPeggedChangeAmountDecrease | bool | False |
referenceChangeAmount | float | 0.0 |
referenceExchangeId | str | `` |
adjustedOrderType | str | `` |
triggerPrice | float | Decimal | None | 1.7976931348623157e+308 |
adjustedStopPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedStopLimitPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedTrailingAmount | float | Decimal | 1.7976931348623157e+308 |
adjustableTrailingUnit | int | 0 |
lmtPriceOffset | float | Decimal | 1.7976931348623157e+308 |
conditions | list[OrderCondition] | factory: list |
conditionsCancelOrder | bool | False |
conditionsIgnoreRth | bool | False |
extOperator | str | `` |
softDollarTier | SoftDollarTier | factory: SoftDollarTier |
cashQty | float | Decimal | 1.7976931348623157e+308 |
mifid2DecisionMaker | str | `` |
mifid2DecisionAlgo | str | `` |
mifid2ExecutionTrader | str | `` |
mifid2ExecutionAlgo | str | `` |
dontUseAutoPriceForHedge | bool | False |
isOmsContainer | bool | False |
discretionaryUpToLimitPrice | bool | False |
autoCancelDate | str | `` |
filledQuantity | float | Decimal | 1.7976931348623157e+308 |
refFuturesConId | int | 0 |
autoCancelParent | bool | False |
shareholder | str | `` |
imbalanceOnly | bool | False |
routeMarketableToBbo | bool | False |
parentPermId | int | 0 |
usePriceMgmtAlgo | bool | False |
duration | int | 2147483647 |
postToAts | int | 2147483647 |
advancedErrorOverride | str | `` |
manualOrderTime | str | `` |
minTradeQty | int | 2147483647 |
minCompeteSize | int | 2147483647 |
competeAgainstBestOffset | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtWhole | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtHalf | float | Decimal | 1.7976931348623157e+308 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
OrderComboLeg
OrderComboLeg(price: 'float | Decimal' = 1.7976931348623157e+308) -> None
OrderComboLeg(price: 'float | Decimal' = 1.7976931348623157e+308)
Fields
| Name | Type | Default |
|---|---|---|
price | float | Decimal | 1.7976931348623157e+308 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
OrderCondition
OrderCondition() -> None
OrderCondition()
Fields
| Name | Type | Default |
|---|
And
And(self)
No library docstring is provided; consult the signature, type fields, and operational guides.
Or
Or(self)
No library docstring is provided; consult the signature, type fields, and operational guides.
createClass
createClass(condType)
No library docstring is provided; consult the signature, type fields, and operational guides.
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
OrderState
OrderState(status: 'str' = '', initMarginBefore: 'str' = '', maintMarginBefore: 'str' = '', equityWithLoanBefore: 'str' = '', initMarginChange: 'str' = '', maintMarginChange: 'str' = '', equityWithLoanChange: 'str' = '', initMarginAfter: 'str' = '', maintMarginAfter: 'str' = '', equityWithLoanAfter: 'str' = '', commission: 'float' = 1.7976931348623157e+308, minCommission: 'float' = 1.7976931348623157e+308, maxCommission: 'float' = 1.7976931348623157e+308, commissionCurrency: 'str' = '', warningText: 'str' = '', completedTime: 'str' = '', completedStatus: 'str' = '') -> None
OrderState(status: 'str' = '', initMarginBefore: 'str' = '', maintMarginBefore: 'str' = '', equityWithLoanBefore: 'str' = '', initMarginChange: 'str' = '', maintMarginChange: 'str' = '', equityWithLoanChange: 'str' = '', initMarginAfter: 'str' = '', maintMarginAfter: 'str' = '', equityWithLoanAfter: 'str' = '', commission: 'float' = 1.7976931348623157e+308, minCommission: 'float' = 1.7976931348623157e+308, maxCommission: 'float' = 1.7976931348623157e+308, commissionCurrency: 'str' = '', warningText: 'str' = '', completedTime: 'str' = '', completedStatus: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
status | str | `` |
initMarginBefore | str | `` |
maintMarginBefore | str | `` |
equityWithLoanBefore | str | `` |
initMarginChange | str | `` |
maintMarginChange | str | `` |
equityWithLoanChange | str | `` |
initMarginAfter | str | `` |
maintMarginAfter | str | `` |
equityWithLoanAfter | str | `` |
commission | float | 1.7976931348623157e+308 |
minCommission | float | 1.7976931348623157e+308 |
maxCommission | float | 1.7976931348623157e+308 |
commissionCurrency | str | `` |
warningText | str | `` |
completedTime | str | `` |
completedStatus | str | `` |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
formatted
formatted(self, digits: 'int' = 2)
Return a new OrderState with the current values as formatted strings.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
numeric
numeric(self, digits: 'int' = 2) -> 'OrderStateNumeric'
Return a new OrderState with the current values values to floats instead of strings as returned from IBKR directly.
transform
transform(self, transformer)
Convert the numeric values of this OrderState into a new OrderState transformed by 'using'
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
OrderStateNumeric
OrderStateNumeric(status: 'str' = '', initMarginBefore: 'float' = nan, maintMarginBefore: 'float' = nan, equityWithLoanBefore: 'float' = nan, initMarginChange: 'float' = nan, maintMarginChange: 'float' = nan, equityWithLoanChange: 'float' = nan, initMarginAfter: 'float' = nan, maintMarginAfter: 'float' = nan, equityWithLoanAfter: 'float' = nan, commission: 'float' = 1.7976931348623157e+308, minCommission: 'float' = 1.7976931348623157e+308, maxCommission: 'float' = 1.7976931348623157e+308, commissionCurrency: 'str' = '', warningText: 'str' = '', completedTime: 'str' = '', completedStatus: 'str' = '') -> None
Just a type helper for mypy to check against if you convert OrderState to .numeric().
Usage:
state_numeric: OrderStateNumeric = state.numeric(digits=2)
Fields
| Name | Type | Default |
|---|---|---|
status | str | `` |
initMarginBefore | float | nan |
maintMarginBefore | float | nan |
equityWithLoanBefore | float | nan |
initMarginChange | float | nan |
maintMarginChange | float | nan |
equityWithLoanChange | float | nan |
initMarginAfter | float | nan |
maintMarginAfter | float | nan |
equityWithLoanAfter | float | nan |
commission | float | 1.7976931348623157e+308 |
minCommission | float | 1.7976931348623157e+308 |
maxCommission | float | 1.7976931348623157e+308 |
commissionCurrency | str | `` |
warningText | str | `` |
completedTime | str | `` |
completedStatus | str | `` |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
OrderStatus
OrderStatus(orderId: 'int' = 0, status: 'str' = '', filled: 'float' = 0.0, remaining: 'float' = 0.0, avgFillPrice: 'float' = 0.0, permId: 'int' = 0, parentId: 'int' = 0, lastFillPrice: 'float' = 0.0, clientId: 'int' = 0, whyHeld: 'str' = '', mktCapPrice: 'float' = 0.0) -> None
OrderStatus(orderId: 'int' = 0, status: 'str' = '', filled: 'float' = 0.0, remaining: 'float' = 0.0, avgFillPrice: 'float' = 0.0, permId: 'int' = 0, parentId: 'int' = 0, lastFillPrice: 'float' = 0.0, clientId: 'int' = 0, whyHeld: 'str' = '', mktCapPrice: 'float' = 0.0)
Fields
| Name | Type | Default |
|---|---|---|
orderId | int | 0 |
status | str | `` |
filled | float | 0.0 |
remaining | float | 0.0 |
avgFillPrice | float | 0.0 |
permId | int | 0 |
parentId | int | 0 |
lastFillPrice | float | 0.0 |
clientId | int | 0 |
whyHeld | str | `` |
mktCapPrice | float | 0.0 |
Properties
total
Helper property to return the total size of this requested order.
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
PercentChangeCondition
PercentChangeCondition(condType: 'int' = 7, conjunction: 'str' = 'a', isMore: 'bool' = True, changePercent: 'float' = 0.0, conId: 'int' = 0, exch: 'str' = '') -> None
PercentChangeCondition(condType: 'int' = 7, conjunction: 'str' = 'a', isMore: 'bool' = True, changePercent: 'float' = 0.0, conId: 'int' = 0, exch: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
condType | int | 7 |
conjunction | str | a |
isMore | bool | True |
changePercent | float | 0.0 |
conId | int | 0 |
exch | str | `` |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
PriceCondition
PriceCondition(condType: 'int' = 1, conjunction: 'str' = 'a', isMore: 'bool' = True, price: 'float' = 0.0, conId: 'int' = 0, exch: 'str' = '', triggerMethod: 'int' = 0) -> None
PriceCondition(condType: 'int' = 1, conjunction: 'str' = 'a', isMore: 'bool' = True, price: 'float' = 0.0, conId: 'int' = 0, exch: 'str' = '', triggerMethod: 'int' = 0)
Fields
| Name | Type | Default |
|---|---|---|
condType | int | 1 |
conjunction | str | a |
isMore | bool | True |
price | float | 0.0 |
conId | int | 0 |
exch | str | `` |
triggerMethod | int | 0 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
StopLimitOrder
StopLimitOrder(action: 'str', totalQuantity: 'float', lmtPrice: 'float', stopPrice: 'float', **kwargs)
Order for trading contracts.
https://interactivebrokers.github.io/tws-api/available_orders.html
Fields
| Name | Type | Default |
|---|---|---|
orderId | int | 0 |
clientId | int | 0 |
permId | int | 0 |
action | str | `` |
totalQuantity | float | 0.0 |
orderType | str | `` |
lmtPrice | float | Decimal | None | 1.7976931348623157e+308 |
auxPrice | float | Decimal | None | 1.7976931348623157e+308 |
tif | str | `` |
activeStartTime | str | `` |
activeStopTime | str | `` |
ocaGroup | str | `` |
ocaType | int | 0 |
orderRef | str | `` |
transmit | bool | True |
parentId | int | 0 |
blockOrder | bool | False |
sweepToFill | bool | False |
displaySize | int | 0 |
triggerMethod | int | 0 |
outsideRth | bool | False |
hidden | bool | False |
goodAfterTime | str | `` |
goodTillDate | str | `` |
rule80A | str | `` |
allOrNone | bool | False |
minQty | int | 2147483647 |
percentOffset | float | Decimal | 1.7976931348623157e+308 |
overridePercentageConstraints | bool | False |
trailStopPrice | float | Decimal | 1.7976931348623157e+308 |
trailingPercent | float | Decimal | 1.7976931348623157e+308 |
faGroup | str | `` |
faProfile | str | `` |
faMethod | str | `` |
faPercentage | str | `` |
designatedLocation | str | `` |
openClose | str | O |
origin | int | 0 |
shortSaleSlot | int | 0 |
exemptCode | int | -1 |
discretionaryAmt | float | 0.0 |
eTradeOnly | bool | False |
firmQuoteOnly | bool | False |
nbboPriceCap | float | Decimal | 1.7976931348623157e+308 |
optOutSmartRouting | bool | False |
auctionStrategy | int | 0 |
startingPrice | float | Decimal | 1.7976931348623157e+308 |
stockRefPrice | float | Decimal | 1.7976931348623157e+308 |
delta | float | Decimal | 1.7976931348623157e+308 |
stockRangeLower | float | Decimal | 1.7976931348623157e+308 |
stockRangeUpper | float | Decimal | 1.7976931348623157e+308 |
randomizePrice | bool | False |
randomizeSize | bool | False |
volatility | float | Decimal | 1.7976931348623157e+308 |
volatilityType | int | 2147483647 |
deltaNeutralOrderType | str | `` |
deltaNeutralAuxPrice | float | Decimal | 1.7976931348623157e+308 |
deltaNeutralConId | int | 0 |
deltaNeutralSettlingFirm | str | `` |
deltaNeutralClearingAccount | str | `` |
deltaNeutralClearingIntent | str | `` |
deltaNeutralOpenClose | str | `` |
deltaNeutralShortSale | bool | False |
deltaNeutralShortSaleSlot | int | 0 |
deltaNeutralDesignatedLocation | str | `` |
continuousUpdate | bool | False |
referencePriceType | int | 2147483647 |
basisPoints | float | Decimal | 1.7976931348623157e+308 |
basisPointsType | int | 2147483647 |
scaleInitLevelSize | int | 2147483647 |
scaleSubsLevelSize | int | 2147483647 |
scalePriceIncrement | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustValue | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustInterval | int | 2147483647 |
scaleProfitOffset | float | Decimal | 1.7976931348623157e+308 |
scaleAutoReset | bool | False |
scaleInitPosition | int | 2147483647 |
scaleInitFillQty | int | 2147483647 |
scaleRandomPercent | bool | False |
scaleTable | str | `` |
hedgeType | str | `` |
hedgeParam | str | `` |
account | str | `` |
settlingFirm | str | `` |
clearingAccount | str | `` |
clearingIntent | str | `` |
algoStrategy | str | `` |
algoParams | list[TagValue] | factory: list |
smartComboRoutingParams | list[TagValue] | factory: list |
algoId | str | `` |
whatIf | bool | False |
notHeld | bool | False |
solicited | bool | False |
modelCode | str | `` |
orderComboLegs | list[OrderComboLeg] | factory: list |
orderMiscOptions | list[TagValue] | factory: list |
referenceContractId | int | 0 |
peggedChangeAmount | float | 0.0 |
isPeggedChangeAmountDecrease | bool | False |
referenceChangeAmount | float | 0.0 |
referenceExchangeId | str | `` |
adjustedOrderType | str | `` |
triggerPrice | float | Decimal | None | 1.7976931348623157e+308 |
adjustedStopPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedStopLimitPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedTrailingAmount | float | Decimal | 1.7976931348623157e+308 |
adjustableTrailingUnit | int | 0 |
lmtPriceOffset | float | Decimal | 1.7976931348623157e+308 |
conditions | list[OrderCondition] | factory: list |
conditionsCancelOrder | bool | False |
conditionsIgnoreRth | bool | False |
extOperator | str | `` |
softDollarTier | SoftDollarTier | factory: SoftDollarTier |
cashQty | float | Decimal | 1.7976931348623157e+308 |
mifid2DecisionMaker | str | `` |
mifid2DecisionAlgo | str | `` |
mifid2ExecutionTrader | str | `` |
mifid2ExecutionAlgo | str | `` |
dontUseAutoPriceForHedge | bool | False |
isOmsContainer | bool | False |
discretionaryUpToLimitPrice | bool | False |
autoCancelDate | str | `` |
filledQuantity | float | Decimal | 1.7976931348623157e+308 |
refFuturesConId | int | 0 |
autoCancelParent | bool | False |
shareholder | str | `` |
imbalanceOnly | bool | False |
routeMarketableToBbo | bool | False |
parentPermId | int | 0 |
usePriceMgmtAlgo | bool | False |
duration | int | 2147483647 |
postToAts | int | 2147483647 |
advancedErrorOverride | str | `` |
manualOrderTime | str | `` |
minTradeQty | int | 2147483647 |
minCompeteSize | int | 2147483647 |
competeAgainstBestOffset | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtWhole | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtHalf | float | Decimal | 1.7976931348623157e+308 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
StopOrder
StopOrder(action: 'str', totalQuantity: 'float', stopPrice: 'float', **kwargs)
Order for trading contracts.
https://interactivebrokers.github.io/tws-api/available_orders.html
Fields
| Name | Type | Default |
|---|---|---|
orderId | int | 0 |
clientId | int | 0 |
permId | int | 0 |
action | str | `` |
totalQuantity | float | 0.0 |
orderType | str | `` |
lmtPrice | float | Decimal | None | 1.7976931348623157e+308 |
auxPrice | float | Decimal | None | 1.7976931348623157e+308 |
tif | str | `` |
activeStartTime | str | `` |
activeStopTime | str | `` |
ocaGroup | str | `` |
ocaType | int | 0 |
orderRef | str | `` |
transmit | bool | True |
parentId | int | 0 |
blockOrder | bool | False |
sweepToFill | bool | False |
displaySize | int | 0 |
triggerMethod | int | 0 |
outsideRth | bool | False |
hidden | bool | False |
goodAfterTime | str | `` |
goodTillDate | str | `` |
rule80A | str | `` |
allOrNone | bool | False |
minQty | int | 2147483647 |
percentOffset | float | Decimal | 1.7976931348623157e+308 |
overridePercentageConstraints | bool | False |
trailStopPrice | float | Decimal | 1.7976931348623157e+308 |
trailingPercent | float | Decimal | 1.7976931348623157e+308 |
faGroup | str | `` |
faProfile | str | `` |
faMethod | str | `` |
faPercentage | str | `` |
designatedLocation | str | `` |
openClose | str | O |
origin | int | 0 |
shortSaleSlot | int | 0 |
exemptCode | int | -1 |
discretionaryAmt | float | 0.0 |
eTradeOnly | bool | False |
firmQuoteOnly | bool | False |
nbboPriceCap | float | Decimal | 1.7976931348623157e+308 |
optOutSmartRouting | bool | False |
auctionStrategy | int | 0 |
startingPrice | float | Decimal | 1.7976931348623157e+308 |
stockRefPrice | float | Decimal | 1.7976931348623157e+308 |
delta | float | Decimal | 1.7976931348623157e+308 |
stockRangeLower | float | Decimal | 1.7976931348623157e+308 |
stockRangeUpper | float | Decimal | 1.7976931348623157e+308 |
randomizePrice | bool | False |
randomizeSize | bool | False |
volatility | float | Decimal | 1.7976931348623157e+308 |
volatilityType | int | 2147483647 |
deltaNeutralOrderType | str | `` |
deltaNeutralAuxPrice | float | Decimal | 1.7976931348623157e+308 |
deltaNeutralConId | int | 0 |
deltaNeutralSettlingFirm | str | `` |
deltaNeutralClearingAccount | str | `` |
deltaNeutralClearingIntent | str | `` |
deltaNeutralOpenClose | str | `` |
deltaNeutralShortSale | bool | False |
deltaNeutralShortSaleSlot | int | 0 |
deltaNeutralDesignatedLocation | str | `` |
continuousUpdate | bool | False |
referencePriceType | int | 2147483647 |
basisPoints | float | Decimal | 1.7976931348623157e+308 |
basisPointsType | int | 2147483647 |
scaleInitLevelSize | int | 2147483647 |
scaleSubsLevelSize | int | 2147483647 |
scalePriceIncrement | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustValue | float | Decimal | 1.7976931348623157e+308 |
scalePriceAdjustInterval | int | 2147483647 |
scaleProfitOffset | float | Decimal | 1.7976931348623157e+308 |
scaleAutoReset | bool | False |
scaleInitPosition | int | 2147483647 |
scaleInitFillQty | int | 2147483647 |
scaleRandomPercent | bool | False |
scaleTable | str | `` |
hedgeType | str | `` |
hedgeParam | str | `` |
account | str | `` |
settlingFirm | str | `` |
clearingAccount | str | `` |
clearingIntent | str | `` |
algoStrategy | str | `` |
algoParams | list[TagValue] | factory: list |
smartComboRoutingParams | list[TagValue] | factory: list |
algoId | str | `` |
whatIf | bool | False |
notHeld | bool | False |
solicited | bool | False |
modelCode | str | `` |
orderComboLegs | list[OrderComboLeg] | factory: list |
orderMiscOptions | list[TagValue] | factory: list |
referenceContractId | int | 0 |
peggedChangeAmount | float | 0.0 |
isPeggedChangeAmountDecrease | bool | False |
referenceChangeAmount | float | 0.0 |
referenceExchangeId | str | `` |
adjustedOrderType | str | `` |
triggerPrice | float | Decimal | None | 1.7976931348623157e+308 |
adjustedStopPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedStopLimitPrice | float | Decimal | 1.7976931348623157e+308 |
adjustedTrailingAmount | float | Decimal | 1.7976931348623157e+308 |
adjustableTrailingUnit | int | 0 |
lmtPriceOffset | float | Decimal | 1.7976931348623157e+308 |
conditions | list[OrderCondition] | factory: list |
conditionsCancelOrder | bool | False |
conditionsIgnoreRth | bool | False |
extOperator | str | `` |
softDollarTier | SoftDollarTier | factory: SoftDollarTier |
cashQty | float | Decimal | 1.7976931348623157e+308 |
mifid2DecisionMaker | str | `` |
mifid2DecisionAlgo | str | `` |
mifid2ExecutionTrader | str | `` |
mifid2ExecutionAlgo | str | `` |
dontUseAutoPriceForHedge | bool | False |
isOmsContainer | bool | False |
discretionaryUpToLimitPrice | bool | False |
autoCancelDate | str | `` |
filledQuantity | float | Decimal | 1.7976931348623157e+308 |
refFuturesConId | int | 0 |
autoCancelParent | bool | False |
shareholder | str | `` |
imbalanceOnly | bool | False |
routeMarketableToBbo | bool | False |
parentPermId | int | 0 |
usePriceMgmtAlgo | bool | False |
duration | int | 2147483647 |
postToAts | int | 2147483647 |
advancedErrorOverride | str | `` |
manualOrderTime | str | `` |
minTradeQty | int | 2147483647 |
minCompeteSize | int | 2147483647 |
competeAgainstBestOffset | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtWhole | float | Decimal | 1.7976931348623157e+308 |
midOffsetAtHalf | float | Decimal | 1.7976931348623157e+308 |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
TimeCondition
TimeCondition(condType: 'int' = 3, conjunction: 'str' = 'a', isMore: 'bool' = True, time: 'str' = '') -> None
TimeCondition(condType: 'int' = 3, conjunction: 'str' = 'a', isMore: 'bool' = True, time: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
condType | int | 3 |
conjunction | str | a |
isMore | bool | True |
time | str | `` |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
Trade
Trade(contract: 'Contract' = <factory>, order: 'Order' = <factory>, orderStatus: 'OrderStatus' = <factory>, fills: 'list[Fill]' = <factory>, log: 'list[TradeLogEntry]' = <factory>, advancedError: 'str' = '') -> None
Trade keeps track of an order, its status and all its fills.
Events:
statusEvent(trade:.Trade)modifyEvent(trade:.Trade)fillEvent(trade:.Trade, fill:.Fill)commissionReportEvent(trade:.Trade, fill:.Fill, commissionReport:.CommissionReport)filledEvent(trade:.Trade)cancelEvent(trade:.Trade)cancelledEvent(trade:.Trade)
Fields
| Name | Type | Default |
|---|---|---|
contract | Contract | factory: Contract |
order | Order | factory: Order |
orderStatus | OrderStatus | factory: OrderStatus |
fills | list[Fill] | factory: list |
log | list[TradeLogEntry] | factory: list |
advancedError | str | `` |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
filled
filled(self) -> 'float'
Number of shares filled.
isActive
isActive(self) -> 'bool'
True if eligible for execution, false otherwise.
isDone
isDone(self) -> 'bool'
True if completely filled or cancelled, false otherwise.
isWaiting
isWaiting(self) -> 'bool'
True if sent to IBKR but not "Submitted" for live execution yet.
isWorking
isWorking(self) -> 'bool'
True if sent to IBKR but not "Submitted" for live execution yet.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
remaining
remaining(self) -> 'float'
Number of shares remaining to be filled.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.
VolumeCondition
VolumeCondition(condType: 'int' = 6, conjunction: 'str' = 'a', isMore: 'bool' = True, volume: 'int' = 0, conId: 'int' = 0, exch: 'str' = '') -> None
VolumeCondition(condType: 'int' = 6, conjunction: 'str' = 'a', isMore: 'bool' = True, volume: 'int' = 0, conId: 'int' = 0, exch: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
condType | int | 6 |
conjunction | str | a |
isMore | bool | True |
volume | int | 0 |
conId | int | 0 |
exch | str | `` |
dict
dict(obj) -> dict
Return dataclass values as dict.
This is a non-recursive variant of dataclasses.asdict.
nonDefaults
nonDefaults(obj) -> dict[str, typing.Any]
For a dataclass instance get the fields that are different from the
default values and return as dict.
tuple
tuple(obj) -> tuple[typing.Any, ...]
Return dataclass values as tuple.
This is a non-recursive variant of dataclasses.astuple.
update
update(obj, *srcObjs, **kwargs) -> object
Update fields of the given dataclass object from zero or more
dataclass source objects and/or from keyword arguments.