|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lmax.api.order.ClosingOrderSpecification
public class ClosingOrderSpecification
Closing Order Specification. Allows you to place an order which closes out a given quantity, either against an instrument position, or against a specific order.
Constructor Summary | |
---|---|
ClosingOrderSpecification(java.lang.String instructionId,
long instrumentId,
FixedPointNumber quantity)
Construct a ClosingOrderSpecification. |
|
ClosingOrderSpecification(java.lang.String instructionId,
long instrumentId,
java.lang.String originalInstructionId,
FixedPointNumber quantity)
Construct a ClosingOrderSpecification. |
Method Summary | |
---|---|
java.lang.String |
getUri()
The close position uri. |
void |
setInstructionId(java.lang.String instructionId)
Set the user correlation ID for this closing order. |
void |
setInstrumentId(long instrumentId)
Set the instrument for the position to place the closing order against. |
void |
setOriginalInstructionId(java.lang.String originalInstructionId)
Setting an originalInstructionId on the specification means this closing order will close some or all of an existing open order with the given originalInstructionId. |
void |
setQuantity(FixedPointNumber quantity)
Set the quantity of the close specification to the specified value. |
java.lang.String |
toString()
A readable String representation of the ClosingOrderSpecification. |
void |
writeTo(com.lmax.api.internal.xml.StructuredWriter writer)
Internal: Output this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClosingOrderSpecification(java.lang.String instructionId, long instrumentId, FixedPointNumber quantity)
instructionId
- The user-defined correlation idinstrumentId
- The id of the instrument for the order book to close position onquantity
- The quantity to close. 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 sellpublic ClosingOrderSpecification(java.lang.String instructionId, long instrumentId, java.lang.String originalInstructionId, FixedPointNumber quantity)
instructionId
- The user-defined correlation idinstrumentId
- The id of the instrument for the order book to close position onoriginalInstructionId
- the instruction ID of the original order to closequantity
- The quantity to close. 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 sellMethod Detail |
---|
public void setInstrumentId(long instrumentId)
instrumentId
- The instrument id for the order.public void setQuantity(FixedPointNumber quantity)
quantity
- New quantity for the close position specification.public void setInstructionId(java.lang.String instructionId)
instructionId
- the user-specified correlation IDpublic void setOriginalInstructionId(java.lang.String originalInstructionId)
originalInstructionId
- the instruction ID of the original order to closepublic java.lang.String getUri()
getUri
in interface com.lmax.api.internal.Request
public void writeTo(com.lmax.api.internal.xml.StructuredWriter writer)
writeTo
in interface com.lmax.api.internal.Request
writer
- The destination for the content of this requestpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |