StatusInfo
Package: velox.api.layer1.data
Type: Class
Inheritance: java.lang.Object รขโ โ velox.api.layer1.data.StatusInfo
All Implemented Interfaces: MultiAccountAware
Descriptionโ
Instrument status information (PnL, number of open orders, position, etc)
Fieldsโ
instrumentAliasโ
public final String instrumentAlias
Alias of the instrument this information relates to
unrealizedPnlโ
public final double unrealizedPnl
unrealized (open) PnL
realizedPnlโ
public final double realizedPnl
realized (closed) PnL
currencyโ
public final String currency
instrument currency or null
positionโ
public final int position
position
averagePriceโ
public final double averagePrice
if position != 0, then it contains average price at which position was opened
volumeโ
public final int volume
number of shares bought/sold during the day
workingBuysโ
public final int workingBuys
number of working buy orders, shouldn't be negative, but won't cause crash
workingSellsโ
public final int workingSells
number of working sell orders, shouldn't be negative, but won't cause crash
isDuplicateโ
public final boolean isDuplicate
If true, this is a duplicate of an already existing order. Such order is expected to appear with false in this field somewhere else, so it won't be displayed in account info (to avoid seeing same order twice)
accountIdโ
public final String accountId
Account id to identify which account this execution info belongs to. Null if there is no multi-account support (only single account is supported by the data provider). Should not mix nulls and specific account infos in the same data provider.
Constructorsโ
StatusInfoโ
@Deprecated
public StatusInfo(String instrumentAlias, double unrealizedPnl, double realizedPnl, String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells)
Deprecated: Use StatusInfoBuilder instead
StatusInfoโ
@Deprecated
public StatusInfo(String instrumentAlias, double unrealizedPnl, double realizedPnl, String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells, boolean isDuplicate)
Deprecated: Use StatusInfoBuilder instead
Methodsโ
toBuilderโ
public StatusInfoBuilder toBuilder()
getTradingAccountIdโ
public String getTradingAccountId()
Specified by: getTradingAccountId in interface MultiAccountAware
toStringโ
public String toString()
Overrides: toString in class Object