|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lmax.api.internal.order.AbstractOrderSpecification
com.lmax.api.order.MarketOrderSpecification
public class MarketOrderSpecification
Market Order Request.
Constructor Summary | |
---|---|
MarketOrderSpecification(long instrumentId,
FixedPointNumber quantity,
TimeInForce timeInForce)
Construct a market order request with no stops. |
|
MarketOrderSpecification(long instrumentId,
FixedPointNumber quantity,
TimeInForce timeInForce,
FixedPointNumber stopLossPriceOffset,
FixedPointNumber stopProfitPriceOffset)
Construct a market order request. |
|
MarketOrderSpecification(long instrumentId,
java.lang.String instructionId,
FixedPointNumber quantity,
TimeInForce timeInForce)
Construct a market order request with no stops. |
|
MarketOrderSpecification(long instrumentId,
java.lang.String instructionId,
FixedPointNumber quantity,
TimeInForce timeInForce,
FixedPointNumber stopLossPriceOffset,
FixedPointNumber stopProfitPriceOffset)
Construct a market order request. |
Method Summary | |
---|---|
protected FixedPointNumber |
getPrice()
|
void |
setTimeInForce(TimeInForce timeInForce)
The time in force policy for the market order. |
java.lang.String |
toString()
A readable String representation of the MarketOrderSpecification. |
Methods inherited from class com.lmax.api.internal.order.AbstractOrderSpecification |
---|
getUri, setInstructionId, setInstrumentId, setQuantity, setStopLossPriceOffset, setStopProfitPriceOffset, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MarketOrderSpecification(long instrumentId, java.lang.String instructionId, FixedPointNumber quantity, TimeInForce timeInForce, FixedPointNumber stopLossPriceOffset, FixedPointNumber stopProfitPriceOffset)
instrumentId
- The id of the instrument for the order book to place the order onto.instructionId
- The user-defined correlation idquantity
- The quantity to trade. A signed value, where the sign indicates the side of the
market that order is placed. Positive implies a buy order, where as negative is a selltimeInForce
- The time in force policy for the market order. This can be "Fill or Kill" or
"Immediate or Cancel". An IllegalArgumentException will be thrown if an invalid time in force policy is used.stopLossPriceOffset
- Use null if you do not want to specify a stop.stopProfitPriceOffset
- Use null if you do not want to specify a stop.public MarketOrderSpecification(long instrumentId, FixedPointNumber quantity, TimeInForce timeInForce, FixedPointNumber stopLossPriceOffset, FixedPointNumber stopProfitPriceOffset)
instrumentId
- The id of the instrument for the order book to place the order onto.quantity
- The quantity to trade. A signed value, where the sign indicates the side of the
market that order is placed. Positive implies a buy order, where as negative is a selltimeInForce
- The time in force policy for the market order. This can be "Fill or Kill" or
"Immediate or Cancel". An IllegalArgumentException will be thrown if an invalid time in force policy is used.stopLossPriceOffset
- Use null if you do not want to specify a stop.stopProfitPriceOffset
- Use null if you do not want to specify a stop.public MarketOrderSpecification(long instrumentId, FixedPointNumber quantity, TimeInForce timeInForce)
instrumentId
- The id of the instrument for the order book to place the order onto.quantity
- The quantity to trade. A signed value, where the sign indicates the side of the
market that order is placed. Positive implies a buy order, where as negative is a selltimeInForce
- The time in force policy for the market order. This can be "Fill or Kill" or
"Immediate or Cancel". An IllegalArgumentException will be thrown if an invalid time in force policy is used.public MarketOrderSpecification(long instrumentId, java.lang.String instructionId, FixedPointNumber quantity, TimeInForce timeInForce)
instrumentId
- The id of the instrument for the order book to place the order onto.instructionId
- The user-defined correlation idquantity
- The quantity to trade. A signed value, where the sign indicates the side of the
market that order is placed. Positive implies a buy order, where as negative is a selltimeInForce
- The time in force policy for the market order. This can be "Fill or Kill" or
"Immediate or Cancel". An IllegalArgumentException will be thrown if an invalid time in force policy is used.Method Detail |
---|
public void setTimeInForce(TimeInForce timeInForce)
setTimeInForce
in interface OrderSpecification
setTimeInForce
in class com.lmax.api.internal.order.AbstractOrderSpecification
timeInForce
- An IllegalArgumentException will be thrown if an invalid time in force policy is used.protected FixedPointNumber getPrice()
getPrice
in class com.lmax.api.internal.order.AbstractOrderSpecification
public java.lang.String toString()
toString
in class com.lmax.api.internal.order.AbstractOrderSpecification
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |