Package velox.api.layer1.data
Class StatusInfo
java.lang.Object
velox.api.layer1.data.StatusInfo
public class StatusInfo
extends java.lang.Object
Instrument status information (PnL, number of open orders, position, etc)
-
Field Summary
Fields Modifier and Type Field Description double
averagePrice
if position != 0, then it contains average price at which position was openedjava.lang.String
currency
instrument currency or nulljava.lang.String
instrumentAlias
Alias of the instrument this information relates toboolean
isDuplicate
If true, this is a duplicate of an already existing order.int
position
positiondouble
realizedPnl
realized (closed) PnLdouble
unrealizedPnl
unrealized (open) PnLint
volume
number of shares bought/sold during the dayint
workingBuys
number of working buy ordersint
workingSells
number of working sell orders -
Constructor Summary
Constructors Constructor Description StatusInfo(java.lang.String instrumentAlias, double unrealizedPnl, double realizedPnl, java.lang.String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells)
StatusInfo(java.lang.String instrumentAlias, double unrealizedPnl, double realizedPnl, java.lang.String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells, boolean isDuplicate)
-
Method Summary
Modifier and Type Method Description StatusInfoBuilder
toBuilder()
java.lang.String
toString()
-
Field Details
-
instrumentAlias
public final java.lang.String instrumentAliasAlias of the instrument this information relates to -
unrealizedPnl
public final double unrealizedPnlunrealized (open) PnL -
realizedPnl
public final double realizedPnlrealized (closed) PnL -
currency
public final java.lang.String currencyinstrument 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 -
workingSells
public final int workingSellsnumber of working sell orders -
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)
-
-
Constructor Details
-
StatusInfo
public StatusInfo(java.lang.String instrumentAlias, double unrealizedPnl, double realizedPnl, java.lang.String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells) -
StatusInfo
public StatusInfo(java.lang.String instrumentAlias, double unrealizedPnl, double realizedPnl, java.lang.String currency, int position, double averagePrice, int volume, int workingBuys, int workingSells, boolean isDuplicate)
-
-
Method Details