Skip to main content

SimpleOrderSendParameters

Package: velox.api.layer1.data

Type: Class

Inheritance: java.lang.Object รขโ€ โ€™ velox.api.layer1.data.SingleOrderSendParameters รขโ€ โ€™ SimpleOrderSendParameters

All Implemented Interfaces: MultiAccountAware, OrderSendParameters

Descriptionโ€‹

Simple order. (market, stop, limit or stop-limit)

Nested Classesโ€‹

SimpleOrderSendParameters.PriceFormatterโ€‹

Deprecated.

Fieldsโ€‹

limitPriceโ€‹

public final double limitPrice

Limit price for limit and stop-limit orders, NaN for market orders

stopPriceโ€‹

public final double stopPrice

Stop price for stop and stop-limit orders, NaN for market and limit orders

takeProfitOffsetโ€‹

public final int takeProfitOffset

Offset for take profit order (for brackets). 0 if not needed. If additionalTakeProfitTiers contains any tiers, this defines the first tier (size will be whatever remains after the additionalTakeProfitTiers).

additionalTakeProfitTiersโ€‹

public final List<BracketTier> additionalTakeProfitTiers

If not empty - describes take profit tiers of the bracket after the first (which is described by takeProfitOffset).

stopLossOffsetโ€‹

public final int stopLossOffset

Offset for stop loss order (for brackets). 0 if not needed. If additionalStopLossTiers contains any tiers, this defines the first tier (size will be whatever remains after the additionalStopLossTiers).

stopLossTrailingStepโ€‹

public final int stopLossTrailingStep

Stop loss trailing step. 0 for non-trailing stop loss.

additionalStopLossTiersโ€‹

public final List<BracketTier> additionalStopLossTiers

If not empty - describes stop loss tiers of the bracket after the first (which is described by stopLossOffset).

takeProfitClientIdโ€‹

public final String takeProfitClientId

Client id for take profit order, similar too SingleOrderSendParameters.clientId

stopLossClientIdโ€‹

public final String stopLossClientId

Client id for stop loss order, similar too SingleOrderSendParameters.clientId

trailingStepโ€‹

public final int trailingStep

Trailing step for this order, if it's a stop order. 0 for non-trailing orders

doNotIncreaseโ€‹

public final boolean doNotIncrease

Do 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 reversingPositionHint

Indicates 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 closingPositionHint

Indicates 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.

sizeMultiplierโ€‹

@Deprecated
public double sizeMultiplier

Deprecated.

Was added by mistake. Please don't use it. Kept for compatibility to avoid introducing new API version.

Constructorsโ€‹

SimpleOrderSendParametersโ€‹

@Deprecated
public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, double limitPrice, double stopPrice)

Deprecated.

Don't use this directly - use SimpleOrderSendParametersBuilder instead.

SimpleOrderSendParametersโ€‹

@Deprecated
public SimpleOrderSendParameters(String alias, boolean isBuy, int size, OrderDuration duration, int trailingStep, double limitPrice, double stopPrice)

Deprecated.

Don't use this directly - use SimpleOrderSendParametersBuilder instead.

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 - use SimpleOrderSendParametersBuilder instead.

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 - use SimpleOrderSendParametersBuilder instead.

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 - use SimpleOrderSendParametersBuilder instead.

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

Methodsโ€‹

toBuilderโ€‹

public AbstractSimpleOrderSendParametersBuilder<SimpleOrderSendParametersBuilder> toBuilder()

toStringโ€‹

public String toString()

Overrides: toString in class SingleOrderSendParameters

representationโ€‹

@Deprecated
public String representation(SimpleOrderSendParameters.PriceFormatter formatter, double sizeMultiplier)

Deprecated. Use OrderRepresentationHelper.textRepresentation(velox.api.layer1.data.SimpleOrderSendParameters, velox.api.layer1.common.helper.OrderRepresentationHelper.PriceFormatter, double) instead.

Parameters:

  • formatter - function converting price to string
  • sizeMultiplier - size multiplier for order size to be displayed

Returns: string representation of the order