ib_async.objects
Generated from the installed ib_async 2.1.0 package. Signatures and defaults are version-specific.
Object hierarchy.
Public constants
| Name | Value |
|---|---|
EPOCH | datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc) |
UNSET_DOUBLE | 1.7976931348623157e+308 |
UNSET_INTEGER | 2147483647 |
AccountValue
AccountValue(account: ForwardRef('str'), tag: ForwardRef('str'), value: ForwardRef('str'), currency: ForwardRef('str'), modelCode: ForwardRef('str'))
AccountValue(account, tag, value, currency, modelCode)
BarData
BarData(date: 'date_ | datetime' = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), open: 'float' = 0.0, high: 'float' = 0.0, low: 'float' = 0.0, close: 'float' = 0.0, volume: 'float' = 0, average: 'float' = 0.0, barCount: 'int' = 0) -> None
BarData(date: 'date_ | datetime' = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), open: 'float' = 0.0, high: 'float' = 0.0, low: 'float' = 0.0, close: 'float' = 0.0, volume: 'float' = 0, average: 'float' = 0.0, barCount: 'int' = 0)
Fields
| Name | Type | Default |
|---|---|---|
date | date_ | datetime | datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc) |
open | float | 0.0 |
high | float | 0.0 |
low | float | 0.0 |
close | float | 0.0 |
volume | float | 0 |
average | float | 0.0 |
barCount | 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.
BarDataList
BarDataList(*args)
List of .BarData that also stores all request parameters.
Events:
updateEvent(bars:.BarDataList, hasNewBar: bool)
CommissionReport
CommissionReport(execId: 'str' = '', commission: 'float' = 0.0, currency: 'str' = '', realizedPNL: 'float' = 0.0, yield_: 'float' = 0.0, yieldRedemptionDate: 'int' = 0) -> None
CommissionReport(execId: 'str' = '', commission: 'float' = 0.0, currency: 'str' = '', realizedPNL: 'float' = 0.0, yield_: 'float' = 0.0, yieldRedemptionDate: 'int' = 0)
Fields
| Name | Type | Default |
|---|---|---|
execId | str | `` |
commission | float | 0.0 |
currency | str | `` |
realizedPNL | float | 0.0 |
yield_ | float | 0.0 |
yieldRedemptionDate | 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.
ConnectionStats
ConnectionStats(startTime: 'float', duration: 'float', numBytesRecv: 'int', numBytesSent: 'int', numMsgRecv: 'int', numMsgSent: 'int') -> None
ConnectionStats(startTime: 'float', duration: 'float', numBytesRecv: 'int', numBytesSent: 'int', numMsgRecv: 'int', numMsgSent: 'int')
Fields
| Name | Type | Default |
|---|---|---|
startTime | float | required |
duration | float | required |
numBytesRecv | int | required |
numBytesSent | int | required |
numMsgRecv | int | required |
numMsgSent | int | required |
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.
DOMLevel
DOMLevel(price: ForwardRef('float'), size: ForwardRef('float'), marketMaker: ForwardRef('str'))
DOMLevel(price, size, marketMaker)
DepthMktDataDescription
DepthMktDataDescription(exchange: 'str' = '', secType: 'str' = '', listingExch: 'str' = '', serviceDataType: 'str' = '', aggGroup: 'int' = 2147483647) -> None
DepthMktDataDescription(exchange: 'str' = '', secType: 'str' = '', listingExch: 'str' = '', serviceDataType: 'str' = '', aggGroup: 'int' = 2147483647)
Fields
| Name | Type | Default |
|---|---|---|
exchange | str | `` |
secType | str | `` |
listingExch | str | `` |
serviceDataType | str | `` |
aggGroup | int | 2147483647 |
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.
Dividends
Dividends(past12Months: 'float | None', next12Months: 'float | None', nextDate: 'date_ | None', nextAmount: 'float | None') -> None
Dividends(past12Months: 'float | None', next12Months: 'float | None', nextDate: 'date_ | None', nextAmount: 'float | None')
Fields
| Name | Type | Default |
|---|---|---|
past12Months | float | None | required |
next12Months | float | None | required |
nextDate | date_ | None | required |
nextAmount | float | None | required |
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.
DynamicObject
DynamicObject(**kwargs)
No library docstring is provided; consult the signature, type fields, and operational guides.
EfpData
EfpData(basisPoints: 'float', formattedBasisPoints: 'str', impliedFuture: 'float', holdDays: 'int', futureLastTradeDate: 'str', dividendImpact: 'float', dividendsToLastTradeDate: 'float') -> None
Exchange for Physical (EFP) futures data.
EFP allows trading a position in a single stock for a position in the corresponding single stock future.
Fields
| Name | Type | Default |
|---|---|---|
basisPoints | float | required |
formattedBasisPoints | str | required |
impliedFuture | float | required |
holdDays | int | required |
futureLastTradeDate | str | required |
dividendImpact | float | required |
dividendsToLastTradeDate | float | required |
Execution
Execution(execId: 'str' = '', time: 'datetime' = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), acctNumber: 'str' = '', exchange: 'str' = '', side: 'str' = '', shares: 'float' = 0.0, price: 'float' = 0.0, permId: 'int' = 0, clientId: 'int' = 0, orderId: 'int' = 0, liquidation: 'int' = 0, cumQty: 'float' = 0.0, avgPrice: 'float' = 0.0, orderRef: 'str' = '', evRule: 'str' = '', evMultiplier: 'float' = 0.0, modelCode: 'str' = '', lastLiquidity: 'int' = 0, pendingPriceRevision: 'bool' = False) -> None
Execution(execId: 'str' = '', time: 'datetime' = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), acctNumber: 'str' = '', exchange: 'str' = '', side: 'str' = '', shares: 'float' = 0.0, price: 'float' = 0.0, permId: 'int' = 0, clientId: 'int' = 0, orderId: 'int' = 0, liquidation: 'int' = 0, cumQty: 'float' = 0.0, avgPrice: 'float' = 0.0, orderRef: 'str' = '', evRule: 'str' = '', evMultiplier: 'float' = 0.0, modelCode: 'str' = '', lastLiquidity: 'int' = 0, pendingPriceRevision: 'bool' = False)
Fields
| Name | Type | Default |
|---|---|---|
execId | str | `` |
time | datetime | datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc) |
acctNumber | str | `` |
exchange | str | `` |
side | str | `` |
shares | float | 0.0 |
price | float | 0.0 |
permId | int | 0 |
clientId | int | 0 |
orderId | int | 0 |
liquidation | int | 0 |
cumQty | float | 0.0 |
avgPrice | float | 0.0 |
orderRef | str | `` |
evRule | str | `` |
evMultiplier | float | 0.0 |
modelCode | str | `` |
lastLiquidity | int | 0 |
pendingPriceRevision | bool | False |
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.
ExecutionFilter
ExecutionFilter(clientId: 'int' = 0, acctCode: 'str' = '', time: 'str' = '', symbol: 'str' = '', secType: 'str' = '', exchange: 'str' = '', side: 'str' = '') -> None
ExecutionFilter(clientId: 'int' = 0, acctCode: 'str' = '', time: 'str' = '', symbol: 'str' = '', secType: 'str' = '', exchange: 'str' = '', side: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
clientId | int | 0 |
acctCode | str | `` |
time | str | `` |
symbol | str | `` |
secType | str | `` |
exchange | str | `` |
side | 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.
FamilyCode
FamilyCode(accountID: 'str', familyCodeStr: 'str') -> None
FamilyCode(accountID: 'str', familyCodeStr: 'str')
Fields
| Name | Type | Default |
|---|---|---|
accountID | str | required |
familyCodeStr | str | required |
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.
Fill
Fill(contract: ForwardRef('Contract'), execution: ForwardRef('Execution'), commissionReport: ForwardRef('CommissionReport'), time: ForwardRef('datetime'))
Fill(contract, execution, commissionReport, time)
FundamentalRatios
FundamentalRatios(**kwargs)
HistogramData
HistogramData(price: 'float' = 0.0, count: 'int' = 0) -> None
HistogramData(price: 'float' = 0.0, count: 'int' = 0)
Fields
| Name | Type | Default |
|---|---|---|
price | float | 0.0 |
count | 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.
HistoricalNews
HistoricalNews(time: 'datetime', providerCode: 'str', articleId: 'str', headline: 'str') -> None
HistoricalNews(time: 'datetime', providerCode: 'str', articleId: 'str', headline: 'str')
Fields
| Name | Type | Default |
|---|---|---|
time | datetime | required |
providerCode | str | required |
articleId | str | required |
headline | str | required |
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.
HistoricalSchedule
HistoricalSchedule(startDateTime: 'str' = '', endDateTime: 'str' = '', timeZone: 'str' = '', sessions: 'list[HistoricalSession]' = <factory>) -> None
HistoricalSchedule(startDateTime: 'str' = '', endDateTime: 'str' = '', timeZone: 'str' = '', sessions: 'list[HistoricalSession]' = <factory>)
Fields
| Name | Type | Default |
|---|---|---|
startDateTime | str | `` |
endDateTime | str | `` |
timeZone | str | `` |
sessions | list[HistoricalSession] | factory: list |
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.
HistoricalSession
HistoricalSession(startDateTime: 'str' = '', endDateTime: 'str' = '', refDate: 'str' = '') -> None
HistoricalSession(startDateTime: 'str' = '', endDateTime: 'str' = '', refDate: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
startDateTime | str | `` |
endDateTime | str | `` |
refDate | 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.
HistoricalTick
HistoricalTick(time: ForwardRef('datetime'), price: ForwardRef('float'), size: ForwardRef('float'))
HistoricalTick(time, price, size)
HistoricalTickBidAsk
HistoricalTickBidAsk(time: ForwardRef('datetime'), tickAttribBidAsk: ForwardRef('TickAttribBidAsk'), priceBid: ForwardRef('float'), priceAsk: ForwardRef('float'), sizeBid: ForwardRef('float'), sizeAsk: ForwardRef('float'))
HistoricalTickBidAsk(time, tickAttribBidAsk, priceBid, priceAsk, sizeBid, sizeAsk)
HistoricalTickLast
HistoricalTickLast(time: ForwardRef('datetime'), tickAttribLast: ForwardRef('TickAttribLast'), price: ForwardRef('float'), size: ForwardRef('float'), exchange: ForwardRef('str'), specialConditions: ForwardRef('str'))
HistoricalTickLast(time, tickAttribLast, price, size, exchange, specialConditions)
IBDefaults
IBDefaults(emptyPrice: 'Any' = -1, emptySize: 'Any' = 0, unset: 'Any' = nan, timezone: 'tzinfo' = datetime.timezone.utc) -> None
A simple way to provide default values when populating API data.
Fields
| Name | Type | Default |
|---|---|---|
emptyPrice | Any | -1 |
emptySize | Any | 0 |
unset | Any | nan |
timezone | tzinfo | datetime.timezone.utc |
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.
MktDepthData
MktDepthData(time: ForwardRef('datetime'), position: ForwardRef('int'), marketMaker: ForwardRef('str'), operation: ForwardRef('int'), side: ForwardRef('int'), price: ForwardRef('float'), size: ForwardRef('float'))
MktDepthData(time, position, marketMaker, operation, side, price, size)
NewsArticle
NewsArticle(articleType: 'int', articleText: 'str') -> None
NewsArticle(articleType: 'int', articleText: 'str')
Fields
| Name | Type | Default |
|---|---|---|
articleType | int | required |
articleText | str | required |
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.
NewsBulletin
NewsBulletin(msgId: 'int', msgType: 'int', message: 'str', origExchange: 'str') -> None
NewsBulletin(msgId: 'int', msgType: 'int', message: 'str', origExchange: 'str')
Fields
| Name | Type | Default |
|---|---|---|
msgId | int | required |
msgType | int | required |
message | str | required |
origExchange | str | required |
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.
NewsProvider
NewsProvider(code: 'str' = '', name: 'str' = '') -> None
NewsProvider(code: 'str' = '', name: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
code | str | `` |
name | 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.
NewsTick
NewsTick(timeStamp: 'int', providerCode: 'str', articleId: 'str', headline: 'str', extraData: 'str') -> None
NewsTick(timeStamp: 'int', providerCode: 'str', articleId: 'str', headline: 'str', extraData: 'str')
Fields
| Name | Type | Default |
|---|---|---|
timeStamp | int | required |
providerCode | str | required |
articleId | str | required |
headline | str | required |
extraData | str | required |
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.
OptionChain
OptionChain(exchange: 'str', underlyingConId: 'int', tradingClass: 'str', multiplier: 'str', expirations: 'list[str]', strikes: 'list[float]') -> None
OptionChain(exchange: 'str', underlyingConId: 'int', tradingClass: 'str', multiplier: 'str', expirations: 'list[str]', strikes: 'list[float]')
Fields
| Name | Type | Default |
|---|---|---|
exchange | str | required |
underlyingConId | int | required |
tradingClass | str | required |
multiplier | str | required |
expirations | list[str] | required |
strikes | list[float] | required |
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.
OptionComputation
OptionComputation(tickAttrib: 'int', impliedVol: 'float | None' = None, delta: 'float | None' = None, optPrice: 'float | None' = None, pvDividend: 'float | None' = None, gamma: 'float | None' = None, vega: 'float | None' = None, theta: 'float | None' = None, undPrice: 'float | None' = None) -> None
OptionComputation(tickAttrib: 'int', impliedVol: 'float | None' = None, delta: 'float | None' = None, optPrice: 'float | None' = None, pvDividend: 'float | None' = None, gamma: 'float | None' = None, vega: 'float | None' = None, theta: 'float | None' = None, undPrice: 'float | None' = None)
Fields
| Name | Type | Default |
|---|---|---|
tickAttrib | int | required |
impliedVol | float | None | None |
delta | float | None | None |
optPrice | float | None | None |
pvDividend | float | None | None |
gamma | float | None | None |
vega | float | None | None |
theta | float | None | None |
undPrice | float | None | None |
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.
PnL
PnL(account: 'str' = '', modelCode: 'str' = '', dailyPnL: 'float' = nan, unrealizedPnL: 'float' = nan, realizedPnL: 'float' = nan) -> None
PnL(account: 'str' = '', modelCode: 'str' = '', dailyPnL: 'float' = nan, unrealizedPnL: 'float' = nan, realizedPnL: 'float' = nan)
Fields
| Name | Type | Default |
|---|---|---|
account | str | `` |
modelCode | str | `` |
dailyPnL | float | nan |
unrealizedPnL | float | nan |
realizedPnL | float | nan |
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.
PnLSingle
PnLSingle(account: 'str' = '', modelCode: 'str' = '', conId: 'int' = 0, dailyPnL: 'float' = nan, unrealizedPnL: 'float' = nan, realizedPnL: 'float' = nan, position: 'int' = 0, value: 'float' = nan) -> None
PnLSingle(account: 'str' = '', modelCode: 'str' = '', conId: 'int' = 0, dailyPnL: 'float' = nan, unrealizedPnL: 'float' = nan, realizedPnL: 'float' = nan, position: 'int' = 0, value: 'float' = nan)
Fields
| Name | Type | Default |
|---|---|---|
account | str | `` |
modelCode | str | `` |
conId | int | 0 |
dailyPnL | float | nan |
unrealizedPnL | float | nan |
realizedPnL | float | nan |
position | int | 0 |
value | float | nan |
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.
PortfolioItem
PortfolioItem(contract: ForwardRef('Contract'), position: ForwardRef('float'), marketPrice: ForwardRef('float'), marketValue: ForwardRef('float'), averageCost: ForwardRef('float'), unrealizedPNL: ForwardRef('float'), realizedPNL: ForwardRef('float'), account: ForwardRef('str'))
PortfolioItem(contract, position, marketPrice, marketValue, averageCost, unrealizedPNL, realizedPNL, account)
Position
Position(account: ForwardRef('str'), contract: ForwardRef('Contract'), position: ForwardRef('float'), avgCost: ForwardRef('float'))
Position(account, contract, position, avgCost)
PriceIncrement
PriceIncrement(lowEdge: ForwardRef('float'), increment: ForwardRef('float'))
PriceIncrement(lowEdge, increment)
RealTimeBar
RealTimeBar(time: 'datetime' = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), endTime: 'int' = -1, open_: 'float' = 0.0, high: 'float' = 0.0, low: 'float' = 0.0, close: 'float' = 0.0, volume: 'float' = 0.0, wap: 'float' = 0.0, count: 'int' = 0) -> None
RealTimeBar(time: 'datetime' = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), endTime: 'int' = -1, open_: 'float' = 0.0, high: 'float' = 0.0, low: 'float' = 0.0, close: 'float' = 0.0, volume: 'float' = 0.0, wap: 'float' = 0.0, count: 'int' = 0)
Fields
| Name | Type | Default |
|---|---|---|
time | datetime | datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc) |
endTime | int | -1 |
open_ | float | 0.0 |
high | float | 0.0 |
low | float | 0.0 |
close | float | 0.0 |
volume | float | 0.0 |
wap | float | 0.0 |
count | 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.
RealTimeBarList
RealTimeBarList(*args)
List of .RealTimeBar that also stores all request parameters.
Events:
updateEvent(bars:.RealTimeBarList, hasNewBar: bool)
ScanDataList
ScanDataList(*args)
List of .ScanData that also stores all request parameters.
Events:
updateEvent(.ScanDataList)
ScannerSubscription
ScannerSubscription(numberOfRows: 'int' = -1, instrument: 'str' = '', locationCode: 'str' = '', scanCode: 'str' = '', abovePrice: 'float' = 1.7976931348623157e+308, belowPrice: 'float' = 1.7976931348623157e+308, aboveVolume: 'int' = 2147483647, marketCapAbove: 'float' = 1.7976931348623157e+308, marketCapBelow: 'float' = 1.7976931348623157e+308, moodyRatingAbove: 'str' = '', moodyRatingBelow: 'str' = '', spRatingAbove: 'str' = '', spRatingBelow: 'str' = '', maturityDateAbove: 'str' = '', maturityDateBelow: 'str' = '', couponRateAbove: 'float' = 1.7976931348623157e+308, couponRateBelow: 'float' = 1.7976931348623157e+308, excludeConvertible: 'bool' = False, averageOptionVolumeAbove: 'int' = 2147483647, scannerSettingPairs: 'str' = '', stockTypeFilter: 'str' = '') -> None
ScannerSubscription(numberOfRows: 'int' = -1, instrument: 'str' = '', locationCode: 'str' = '', scanCode: 'str' = '', abovePrice: 'float' = 1.7976931348623157e+308, belowPrice: 'float' = 1.7976931348623157e+308, aboveVolume: 'int' = 2147483647, marketCapAbove: 'float' = 1.7976931348623157e+308, marketCapBelow: 'float' = 1.7976931348623157e+308, moodyRatingAbove: 'str' = '', moodyRatingBelow: 'str' = '', spRatingAbove: 'str' = '', spRatingBelow: 'str' = '', maturityDateAbove: 'str' = '', maturityDateBelow: 'str' = '', couponRateAbove: 'float' = 1.7976931348623157e+308, couponRateBelow: 'float' = 1.7976931348623157e+308, excludeConvertible: 'bool' = False, averageOptionVolumeAbove: 'int' = 2147483647, scannerSettingPairs: 'str' = '', stockTypeFilter: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
numberOfRows | int | -1 |
instrument | str | `` |
locationCode | str | `` |
scanCode | str | `` |
abovePrice | float | 1.7976931348623157e+308 |
belowPrice | float | 1.7976931348623157e+308 |
aboveVolume | int | 2147483647 |
marketCapAbove | float | 1.7976931348623157e+308 |
marketCapBelow | float | 1.7976931348623157e+308 |
moodyRatingAbove | str | `` |
moodyRatingBelow | str | `` |
spRatingAbove | str | `` |
spRatingBelow | str | `` |
maturityDateAbove | str | `` |
maturityDateBelow | str | `` |
couponRateAbove | float | 1.7976931348623157e+308 |
couponRateBelow | float | 1.7976931348623157e+308 |
excludeConvertible | bool | False |
averageOptionVolumeAbove | int | 2147483647 |
scannerSettingPairs | str | `` |
stockTypeFilter | 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.
SmartComponent
SmartComponent(bitNumber: 'int', exchange: 'str', exchangeLetter: 'str') -> None
SmartComponent(bitNumber: 'int', exchange: 'str', exchangeLetter: 'str')
Fields
| Name | Type | Default |
|---|---|---|
bitNumber | int | required |
exchange | str | required |
exchangeLetter | str | required |
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.
SoftDollarTier
SoftDollarTier(name: 'str' = '', val: 'str' = '', displayName: 'str' = '') -> None
SoftDollarTier(name: 'str' = '', val: 'str' = '', displayName: 'str' = '')
Fields
| Name | Type | Default |
|---|---|---|
name | str | `` |
val | str | `` |
displayName | 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.
TickAttrib
TickAttrib(canAutoExecute: 'bool' = False, pastLimit: 'bool' = False, preOpen: 'bool' = False) -> None
TickAttrib(canAutoExecute: 'bool' = False, pastLimit: 'bool' = False, preOpen: 'bool' = False)
Fields
| Name | Type | Default |
|---|---|---|
canAutoExecute | bool | False |
pastLimit | bool | False |
preOpen | bool | False |
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.
TickAttribBidAsk
TickAttribBidAsk(bidPastLow: 'bool' = False, askPastHigh: 'bool' = False) -> None
TickAttribBidAsk(bidPastLow: 'bool' = False, askPastHigh: 'bool' = False)
Fields
| Name | Type | Default |
|---|---|---|
bidPastLow | bool | False |
askPastHigh | bool | False |
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.
TickAttribLast
TickAttribLast(pastLimit: 'bool' = False, unreported: 'bool' = False) -> None
TickAttribLast(pastLimit: 'bool' = False, unreported: 'bool' = False)
Fields
| Name | Type | Default |
|---|---|---|
pastLimit | bool | False |
unreported | bool | False |
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.
TickByTickAllLast
TickByTickAllLast(tickType: ForwardRef('int'), time: ForwardRef('datetime'), price: ForwardRef('float'), size: ForwardRef('float'), tickAttribLast: ForwardRef('TickAttribLast'), exchange: ForwardRef('str'), specialConditions: ForwardRef('str'))
TickByTickAllLast(tickType, time, price, size, tickAttribLast, exchange, specialConditions)
TickByTickBidAsk
TickByTickBidAsk(time: ForwardRef('datetime'), bidPrice: ForwardRef('float'), askPrice: ForwardRef('float'), bidSize: ForwardRef('float'), askSize: ForwardRef('float'), tickAttribBidAsk: ForwardRef('TickAttribBidAsk'))
TickByTickBidAsk(time, bidPrice, askPrice, bidSize, askSize, tickAttribBidAsk)
TickByTickMidPoint
TickByTickMidPoint(time: ForwardRef('datetime'), midPoint: ForwardRef('float'))
TickByTickMidPoint(time, midPoint)
TickData
TickData(time: ForwardRef('datetime'), tickType: ForwardRef('int'), price: ForwardRef('float'), size: ForwardRef('float'))
TickData(time, tickType, price, size)
TradeLogEntry
TradeLogEntry(time: 'datetime', status: 'str' = '', message: 'str' = '', errorCode: 'int' = 0) -> None
TradeLogEntry(time: 'datetime', status: 'str' = '', message: 'str' = '', errorCode: 'int' = 0)
Fields
| Name | Type | Default |
|---|---|---|
time | datetime | required |
status | str | `` |
message | str | `` |
errorCode | 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.
WshEventData
WshEventData(conId: 'int' = 2147483647, filter: 'str' = '', fillWatchlist: 'bool' = False, fillPortfolio: 'bool' = False, fillCompetitors: 'bool' = False, startDate: 'str' = '', endDate: 'str' = '', totalLimit: 'int' = 2147483647) -> None
WshEventData(conId: 'int' = 2147483647, filter: 'str' = '', fillWatchlist: 'bool' = False, fillPortfolio: 'bool' = False, fillCompetitors: 'bool' = False, startDate: 'str' = '', endDate: 'str' = '', totalLimit: 'int' = 2147483647)
Fields
| Name | Type | Default |
|---|---|---|
conId | int | 2147483647 |
filter | str | `` |
fillWatchlist | bool | False |
fillPortfolio | bool | False |
fillCompetitors | bool | False |
startDate | str | `` |
endDate | str | `` |
totalLimit | int | 2147483647 |
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.