Package velox.api.layer1.data
Class StatusInfo
java.lang.Object
velox.api.layer1.data.StatusInfo
- All Implemented Interfaces:
MultiAccountAware
Instrument status information (PnL, number of open orders, position, etc)
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringAccount id to identify which account this execution info belongs to.final doubleif position != 0, then it contains average price at which position was openedfinal Stringinstrument currency or nullfinal StringAlias of the instrument this information relates tofinal booleanIf true, this is a duplicate of an already existing order.final intpositionfinal doublerealized (closed) PnLfinal doubleunrealized (open) PnLfinal intnumber of shares bought/sold during the dayfinal intnumber of working buy orders, shouldn't be negative, but won't cause crashfinal intnumber of working sell orders, shouldn't be negative, but won't cause crash -
Constructor Summary
ConstructorsConstructorDescriptionStatusInfo(String instrumentAlias, double unrealizedPnl, double realizedPnl, String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells) Deprecated.StatusInfo(String instrumentAlias, double unrealizedPnl, double realizedPnl, String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells, boolean isDuplicate) Deprecated.UseStatusInfoBuilderinstead -
Method Summary
-
Field Details
-
instrumentAlias
Alias of the instrument this information relates to -
unrealizedPnl
public final double unrealizedPnlunrealized (open) PnL -
realizedPnl
public final double realizedPnlrealized (closed) PnL -
currency
instrument currency or null -
position
public final int positionposition -
averagePrice
public final double averagePriceif position != 0, then it contains average price at which position was opened -
volume
public final int volumenumber of shares bought/sold during the day -
workingBuys
public final int workingBuysnumber of working buy orders, shouldn't be negative, but won't cause crash -
workingSells
public final int workingSellsnumber of working sell orders, shouldn't be negative, but won't cause crash -
isDuplicate
public final boolean isDuplicateIf 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
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.
-
-
Constructor Details
-
StatusInfo
@Deprecated public StatusInfo(String instrumentAlias, double unrealizedPnl, double realizedPnl, String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells) Deprecated.UseStatusInfoBuilderinstead -
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.UseStatusInfoBuilderinstead
-
-
Method Details
-
toBuilder
-
getTradingAccountId
- Specified by:
getTradingAccountIdin interfaceMultiAccountAware
-
toString
-
StatusInfoBuilderinstead