Package velox.api.layer1.data
Class SimpleOrderSendParameters
java.lang.Object
velox.api.layer1.data.SingleOrderSendParameters
velox.api.layer1.data.SimpleOrderSendParameters
- All Implemented Interfaces:
MultiAccountAware,OrderSendParameters
Simple order. (market, stop, limit or stop-limit)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<BracketTier> If not empty - describes stop loss tiers of the bracket after the first (which is described bystopLossOffset).final List<BracketTier> If not empty - describes take profit tiers of the bracket after the first (which is described bytakeProfitOffset).final booleanIndicates that intention is to close position.final booleanDo non increase flag - if set it should not be possible to increase order size.final doubleLimit price for limit and stop-limit orders, NaN for market ordersfinal booleanIndicates that intention is to reverse position.doubleDeprecated.final StringClient id for stop loss order, similar tooSingleOrderSendParameters.clientIdfinal IntegerFor providers where stop loss order is anOrderType.STP_LMT, this defines limit offset of such order.final intOffset for stop loss order (for brackets).final intStop loss trailing step.final doubleStop price for stop and stop-limit orders, NaN for market and limit ordersfinal StringClient id for take profit order, similar tooSingleOrderSendParameters.clientIdfinal intOffset for take profit order (for brackets).final intTrailing step for this order, if it's a stop order.Fields inherited from class velox.api.layer1.data.SingleOrderSendParameters
accountId, alias, clientId, duration, isBuy, orderEntryType, size -
Constructor Summary
ConstructorsConstructorDescriptionSimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, double sizeMultiplier) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, double sizeMultiplier) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, Integer stopLossLimitOffset) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, int trailingStep, double limitPrice, double stopPrice) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, int trailingStep, double limitPrice, double stopPrice, double sizeMultiplier) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, String clientId, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, String clientId, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, boolean reversingPositionHint, boolean closingPositionHint) Deprecated.SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, String clientId, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, double sizeMultiplier) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionrepresentation(SimpleOrderSendParameters.PriceFormatter formatter, double sizeMultiplier) Deprecated.toString()Methods inherited from class velox.api.layer1.data.SingleOrderSendParameters
getTradingAccountId
-
Field Details
-
limitPrice
public final double limitPriceLimit price for limit and stop-limit orders, NaN for market orders -
stopPrice
public final double stopPriceStop price for stop and stop-limit orders, NaN for market and limit orders -
takeProfitOffset
public final int takeProfitOffsetOffset for take profit order (for brackets). 0 if not needed. IfadditionalTakeProfitTierscontains any tiers, this defines the first tier (size will be whatever remains after theadditionalTakeProfitTiers). -
additionalTakeProfitTiers
If not empty - describes take profit tiers of the bracket after the first (which is described bytakeProfitOffset). -
stopLossOffset
public final int stopLossOffsetOffset for stop loss order (for brackets). 0 if not needed. IfadditionalStopLossTierscontains any tiers, this defines the first tier (size will be whatever remains after theadditionalStopLossTiers). -
stopLossTrailingStep
public final int stopLossTrailingStepStop loss trailing step. 0 for non-trailing stop loss. -
additionalStopLossTiers
If not empty - describes stop loss tiers of the bracket after the first (which is described bystopLossOffset). -
takeProfitClientId
Client id for take profit order, similar tooSingleOrderSendParameters.clientId -
stopLossClientId
Client id for stop loss order, similar tooSingleOrderSendParameters.clientId -
trailingStep
public final int trailingStepTrailing step for this order, if it's a stop order. 0 for non-trailing orders -
doNotIncrease
public final boolean doNotIncreaseDo non increase flag - if set it should not be possible to increase order size. Handled inside Bookmap L1 stack, no need to worry about it when writing L0 provider. -
reversingPositionHint
public final boolean reversingPositionHintIndicates that intention is to reverse position. Some platforms might provide you a better way to do it, in which case you can use that instead. Provider is not required to support this. -
closingPositionHint
public final boolean closingPositionHintIndicates that intention is to close position. Some platforms might provide you a better way to do it, in which case you can use that instead. Provider is not required to support this. -
stopLossLimitOffset
For providers where stop loss order is anOrderType.STP_LMT, this defines limit offset of such order. Ignored otherwise. -
sizeMultiplier
Deprecated.Was added by mistake. Please don't use it. Kept for compatibility to avoid introducing new API version.
-
-
Constructor Details
-
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice) Deprecated.Don't use this directly - useSimpleOrderSendParametersBuilderinstead. -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, int trailingStep, double limitPrice, double stopPrice) Deprecated.Don't use this directly - useSimpleOrderSendParametersBuilderinstead. -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease) Deprecated.Don't use this directly - useSimpleOrderSendParametersBuilderinstead. -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, Integer stopLossLimitOffset) Deprecated.Don't use this directly - useSimpleOrderSendParametersBuilderinstead. -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, String clientId, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, boolean reversingPositionHint, boolean closingPositionHint) Deprecated.Don't use this directly - useSimpleOrderSendParametersBuilderinstead. -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, String clientId, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease) Deprecated.Don't use this directly - useSimpleOrderSendParametersBuilderinstead. -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, double sizeMultiplier) Deprecated.sizeMultiplier parameter was added to API due to a mistake, please use a version without it -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, int trailingStep, double limitPrice, double stopPrice, double sizeMultiplier) Deprecated.sizeMultiplier parameter was added to API due to a mistake, please use a version without it -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, double sizeMultiplier) Deprecated.sizeMultiplier parameter was added to API due to a mistake, please use a version without it -
SimpleOrderSendParameters
@Deprecated public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, String clientId, double limitPrice, double stopPrice, int takeProfitOffset, int stopLossOffset, int stopLossTrailingStep, int trailingStep, boolean doNotIncrease, double sizeMultiplier) Deprecated.sizeMultiplier parameter was added to API due to a mistake, please use a version without it
-
-
Method Details
-
toBuilder
- Overrides:
toBuilderin classSingleOrderSendParameters
-
toString
- Overrides:
toStringin classSingleOrderSendParameters
-
representation
@Deprecated public String representation(SimpleOrderSendParameters.PriceFormatter formatter, double sizeMultiplier) Deprecated.- Parameters:
formatter- function converting price to stringsizeMultiplier- size multiplier for order size to be displayed- Returns:
- string representation of the order
-
OrderRepresentationHelper.textRepresentation(velox.api.layer1.data.SimpleOrderSendParameters, velox.api.layer1.common.helper.OrderRepresentationHelper.PriceFormatter, double)instead.