Package velox.api.layer1.data
Class OrderInfo
java.lang.Object
velox.api.layer1.data.OrderInfo
- All Implemented Interfaces:
Serializable,MultiAccountAware
- Direct Known Subclasses:
OrderInfoUpdate
Cumulative information about the order
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringAccount id to identify which account this order info belongs to.final doublefinal Stringfinal booleanfinal OrderDurationfinal Stringfinal booleanFor orders that a user initially places as market (MKT) orders but that are later replaced by the trading platform with limit orders at a remote limit price (as a form of protection against market volatility).final intfinal Stringfinal booleanIndicates that this exact order info was already reported to upper layers before, but is being sent to the strategy again because trading data was invalidated.final booleanfinal booleanOrder can be duplicated in case of crosstrading or alias dublicationfinal booleanfinal doublefinal longfinal Stringfinal OrderStatusfinal doublefinal booleanfinal OrderTypefinal int -
Constructor Summary
ConstructorsConstructorDescriptionOrderInfo(String instrumentAlias, String orderId, boolean isBuy, OrderType type, String clientId, boolean doNotIncrease, int filled, int unfilled, double averageFillPrice, OrderDuration duration, OrderStatus status, double limitPrice, double stopPrice, boolean stopTriggered, long modificationUtcTime) Deprecated.OrderInfo(String instrumentAlias, String orderId, boolean isBuy, OrderType type, String clientId, boolean doNotIncrease, int filled, int unfilled, double averageFillPrice, OrderDuration duration, OrderStatus status, double limitPrice, double stopPrice, boolean stopTriggered, long modificationUtcTime, boolean isSimulated) Deprecated.OrderInfo(String instrumentAlias, String orderId, boolean isBuy, OrderType type, String clientId, boolean doNotIncrease, int filled, int unfilled, double averageFillPrice, OrderDuration duration, OrderStatus status, double limitPrice, double stopPrice, boolean stopTriggered, long modificationUtcTime, boolean isSimulated, boolean isDuplicate) Deprecated. -
Method Summary
-
Field Details
-
instrumentAlias
-
orderId
-
isBuy
public final boolean isBuy -
type
-
clientId
-
exchangeId
-
doNotIncrease
public final boolean doNotIncrease -
filled
public final int filled -
unfilled
public final int unfilled -
averageFillPrice
public final double averageFillPrice -
duration
-
status
-
limitPrice
public final double limitPrice -
stopPrice
public final double stopPrice -
stopTriggered
public final boolean stopTriggered -
modificationUtcTime
public final long modificationUtcTime -
isSimulated
public final boolean isSimulated -
isDuplicate
public final boolean isDuplicateOrder can be duplicated in case of crosstrading or alias dublication -
isBuffered
public final boolean isBufferedIndicates that this exact order info was already reported to upper layers before, but is being sent to the strategy again because trading data was invalidated.
For example, if the selected account changes, all order infos from the previous account will be reported as disconnected, and the full order info history for the new account may be replayed. So all such orders will be marked with "isBuffered=true"
Bookmap uses this flag to filter out order infos that were already reported to upper layers. Therefore, for Data Editors and other Injectable strategies, the value of this flag must remain sane for the order info received by the strategy, and the corresponding order info sent back (modified or not) from the strategy to Bookmap. Otherwise, Bookmap's filtering logic may break.
If the strategy modifies an incoming order info, it should preserve the exact value of this flag, unless it is intentionally creating a new order info to report to Bookmap. In that case, the flag must be set to false.
A strategy must never change this flag from false to true for incoming order, and must never set it to true for new data produced by the strategy.- See Also:
-
accountId
Account id to identify which account this order 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 in the same data provider. -
fakeMarketOrder
public final boolean fakeMarketOrderFor orders that a user initially places as market (MKT) orders but that are later replaced by the trading platform with limit orders at a remote limit price (as a form of protection against market volatility). Orders marked with this flag are displayed on the chart as limit orders until they are fully executed, and as market orders once execution is complete (the intermediate update showing the remote price will be hidden).
-
-
Constructor Details
-
OrderInfo
@Deprecated public OrderInfo(String instrumentAlias, String orderId, boolean isBuy, OrderType type, String clientId, boolean doNotIncrease, int filled, int unfilled, double averageFillPrice, OrderDuration duration, OrderStatus status, double limitPrice, double stopPrice, boolean stopTriggered, long modificationUtcTime) Deprecated.UseOrderInfoBuilderinstead -
OrderInfo
@Deprecated public OrderInfo(String instrumentAlias, String orderId, boolean isBuy, OrderType type, String clientId, boolean doNotIncrease, int filled, int unfilled, double averageFillPrice, OrderDuration duration, OrderStatus status, double limitPrice, double stopPrice, boolean stopTriggered, long modificationUtcTime, boolean isSimulated) Deprecated.UseOrderInfoBuilderinstead -
OrderInfo
@Deprecated public OrderInfo(String instrumentAlias, String orderId, boolean isBuy, OrderType type, String clientId, boolean doNotIncrease, int filled, int unfilled, double averageFillPrice, OrderDuration duration, OrderStatus status, double limitPrice, double stopPrice, boolean stopTriggered, long modificationUtcTime, boolean isSimulated, boolean isDuplicate) Deprecated.UseOrderInfoBuilderinstead
-
-
Method Details
-
getTradingAccountId
- Specified by:
getTradingAccountIdin interfaceMultiAccountAware
-