public final class MFTradingSessionToCoreTradingSessionAdapter extends java.lang.Object implements MFTradingSession
| Constructor and Description |
|---|
MFTradingSessionToCoreTradingSessionAdapter(CoreTradingSession delegate) |
| Modifier and Type | Method and Description |
|---|---|
NewOrderSingle |
createNewOrderSingle(long venueId,
long securityId,
byte[] clOrdId,
mftrading.Side side,
mftrading.OrdType ordType,
mftrading.TimeInForce timeInForce) |
NewOrderSingle |
createNewOrderSingle(long venueId,
long securityId,
java.lang.String clOrdId,
mftrading.Side side,
mftrading.OrdType ordType,
mftrading.TimeInForce timeInForce)
Returns an instance of the
NewOrderSingle. |
OrderCancelReplaceRequest |
createOrderCancelReplaceRequest(long venueID,
long securityID,
byte[] clOrdID,
byte[] origOrdID,
long orderID,
mftrading.Side side,
mftrading.OrdType ordType,
mftrading.TimeInForce timeInForce) |
OrderCancelReplaceRequest |
createOrderCancelReplaceRequest(long venueID,
long securityID,
java.lang.String clOrdID,
java.lang.String origOrdID,
long orderID,
mftrading.Side side,
mftrading.OrdType ordType,
mftrading.TimeInForce timeInForce)
Returns an instance of the
OrderCancelReplaceRequest. |
OrderCancelRequest |
createOrderCancelRequest(long venueID,
long securityID,
byte[] clOrdID,
byte[] origOrdID,
long orderID)
Returns an instance of the
OrderCancelRequest. |
OrderCancelRequest |
createOrderCancelRequest(long venueID,
long securityID,
java.lang.String clOrdID,
java.lang.String origOrdID,
long orderID)
Returns an instance of the
OrderCancelRequest. |
int |
getPort()
The port used for this session.
|
long |
getSendingTime()
Retrieves the MF server sending time (nanoseconds since epoch) of the current message frame.
|
java.lang.String |
getUsername()
The username used for this session.
|
boolean |
isLoggedOn() |
void |
logon()
Sends a logon message with the supplied username and password.
|
void |
logout()
Initiates logout.
|
void |
logoutResponse()
The response to a logout from the server.
|
void |
marketDefinitionRequest()
A request to receive the definitions of each market.
|
void |
newOrderSingle(NewOrderSingle order)
Submit an order.
|
void |
orderCancelReplaceRequest(OrderCancelReplaceRequest request)
Submit modification to an existing order.
|
void |
orderCancelRequest(OrderCancelRequest request)
Cancel a previously placed order by client order id ('clOrdID')
and orderID.
|
void |
securityDefinitionRequest(long venueID)
Requests information about the securities supported on this venue.
|
java.lang.String |
toString() |
void |
tradingRequest(long venueID,
mftrading.SubscriptionRequestType subType,
long nextExpectedMsgSeqNum)
A request to subscribe or unsubscribe to/from a
particular venue (as specified by the venueID parameter)
in order to trade or stop trading.
|
public MFTradingSessionToCoreTradingSessionAdapter(CoreTradingSession delegate)
public java.lang.String getUsername()
MFSessiongetUsername in interface MFSessionpublic int getPort()
MFSessionpublic void marketDefinitionRequest()
throws MFException
MFTradingSessionmarketDefinitionRequest in interface MFTradingSessionMFException - If there is an error when attempting to
send this message.public void securityDefinitionRequest(long venueID)
throws MFException
MFTradingSessionsecurityDefinitionRequest in interface MFTradingSessionMFException - If there is an error when attempting to
send this message.public void tradingRequest(long venueID,
mftrading.SubscriptionRequestType subType,
long nextExpectedMsgSeqNum)
throws MFException
MFTradingSessiontradingRequest in interface MFTradingSessionMFException - If there is an error when attempting to
send this message.public void newOrderSingle(NewOrderSingle order) throws MFException
MFTradingSessionnewOrderSingle in interface MFTradingSessionMFException - If there is an error when attempting to send this message.public NewOrderSingle createNewOrderSingle(long venueId, long securityId, java.lang.String clOrdId, mftrading.Side side, mftrading.OrdType ordType, mftrading.TimeInForce timeInForce)
MFTradingSessionNewOrderSingle.
Assume you cannot reuse this object. Use it once, submit
it using the MFTradingSession.newOrderSingle(NewOrderSingle) method. If you have a new
NewOrderSingle to place, get a new Encoder.createNewOrderSingle in interface MFTradingSessionpublic NewOrderSingle createNewOrderSingle(long venueId, long securityId, byte[] clOrdId, mftrading.Side side, mftrading.OrdType ordType, mftrading.TimeInForce timeInForce)
createNewOrderSingle in interface MFTradingSessionpublic void orderCancelReplaceRequest(OrderCancelReplaceRequest request) throws MFException
MFTradingSessionorderCancelReplaceRequest in interface MFTradingSessionrequest - the orderCancelReplaceRequestMFException - If there is an error when attempting to send this message.public OrderCancelReplaceRequest createOrderCancelReplaceRequest(long venueID, long securityID, java.lang.String clOrdID, java.lang.String origOrdID, long orderID, mftrading.Side side, mftrading.OrdType ordType, mftrading.TimeInForce timeInForce)
MFTradingSessionOrderCancelReplaceRequest. Assume you cannot reuse this object.
Use it once, submit it using
the MFTradingSession.orderCancelReplaceRequest(com.marketfactory.mfclient.api.core.trading.OrderCancelReplaceRequest) method. If you have
a new order to cancel/replace, get a new Encoder.createOrderCancelReplaceRequest in interface MFTradingSessionpublic OrderCancelReplaceRequest createOrderCancelReplaceRequest(long venueID, long securityID, byte[] clOrdID, byte[] origOrdID, long orderID, mftrading.Side side, mftrading.OrdType ordType, mftrading.TimeInForce timeInForce)
createOrderCancelReplaceRequest in interface MFTradingSessionpublic void orderCancelRequest(OrderCancelRequest request) throws MFException
MFTradingSessionorderCancelRequest in interface MFTradingSessionrequest - the cancel requestMFException - If there is an error when attempting to
send this message.public OrderCancelRequest createOrderCancelRequest(long venueID, long securityID, java.lang.String clOrdID, java.lang.String origOrdID, long orderID)
MFTradingSessionOrderCancelRequest. Assume you cannot reuse this object.
Use it once, submit it using
the MFTradingSession.orderCancelRequest(com.marketfactory.mfclient.api.core.trading.OrderCancelRequest) method. If you have
a new order to cancel, get a new Encoder.createOrderCancelRequest in interface MFTradingSessionvenueID - id of the venuesecurityID - id of the securityclOrdID - new clOrdID for this cancel requestorigOrdID - origOrdID of the order to cancelorderID - orderID of the order to cancelpublic OrderCancelRequest createOrderCancelRequest(long venueID, long securityID, byte[] clOrdID, byte[] origOrdID, long orderID)
MFTradingSessionOrderCancelRequest. Assume you cannot reuse this object.
Use it once, submit it using
the MFTradingSession.orderCancelRequest(com.marketfactory.mfclient.api.core.trading.OrderCancelRequest) method. If you have
a new order to cancel, get a new Encoder.createOrderCancelRequest in interface MFTradingSessionvenueID - id of the venuesecurityID - id of the securityclOrdID - new clOrdID for this cancel requestorigOrdID - origOrdID of the order to cancelorderID - orderID of the order to cancelpublic void logon()
throws MFException
MFSessionlogon in interface MFSessionMFException - If there is an error when attempting to
send this message.public void logout()
throws MFException
MFSessionlogout in interface MFSessionMFException - If there is an error when attempting to
send this message.public void logoutResponse()
throws MFException
MFSessionlogoutResponse in interface MFSessionMFException - If there is an error when attempting to
send this message.public boolean isLoggedOn()
isLoggedOn in interface MFSessionpublic java.lang.String toString()
toString in class java.lang.Objectpublic long getSendingTime()
MFSessiongetSendingTime in interface MFSession