MFClient  1.3.0
 All Classes Functions Variables Enumerations
Public Member Functions | Friends | List of all members
MFTradingSession Class Reference

A session with MarketFactory for trading with all the venues for which a user has access. More...

#include <MFTradingSession.h>

Inheritance diagram for MFTradingSession:

Public Member Functions

void logon ()
 Sends a logon message with the supplied username and password. Should only be called in the event loop by the handler. More...
 
void logout ()
 Initiates logout. This should be called so a clean and dirty (one where the socket closes w/o a logout) can be easily differentiated. Should only be called in the event loop by the handler. More...
 
void logoutResponse ()
 The response to a logout from the server. This should be called if a logout is received so that the client can indicate a clean logout. Should only be called in the event loop by the handler. More...
 
void marketDefinitionRequest ()
 A request to receive the definitions of each market. More...
 
uint64_t getSendingTime () const
 Retrieve the sending time of the current frame. More...
 
void tradingRequest (MFProto::VenueID venueID, mftrading::SubscriptionRequestType::Value subType, MFProto::SeqNum nextExpSeqNum)
 A request to subscribe or unsubscribe to/from a particular venue (as specified by the venueID parameter) in order to trade or stop trading. A message of type mftrading::TradingSessionStatusRequest will be sent.

Parameters
venueIDMFProto::VenueID
subTypemftrading::SubscriptionRequestType::Value - Subscribe or Unsubscribe
nextExpSeqNumMFProto::SeqNum
More...
 
void newOrderSingle ()
 Submit an order. The order submitted will be the mftrading::NewOrderSingle object that was returned as a reference from the last call to MFTradingSession::createNewOrderSingle() More...
 
mftrading::NewOrderSingle & createNewOrderSingle (MFProto::VenueID venueID, MFProto::SecurityID securityID, const char *clOrdId, mftrading::Side::Value side, mftrading::OrdType::Value ordType, mftrading::TimeInForce::Value timeInForce, const char **strategyParamName=NULL, mftrading::StrategyParameterType::Value *strategyParamType=NULL, const char **strategyParamValue=NULL, int nStrategyParams=0)
 Allocate mftrading::NewOrderSingle object and populate it with the supplied parameters.

Parameters
venueIDMFProto::VenueID
securityIDMFProto::SecurityID
clOrdIdClient order id. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
sidemftrading::Side::Value
ordTypemftrading::OrdType::Value
timeInForcemftrading::TimeInForce::Value
strategyParamNameArray of mftrading::NewOrderSingle::StrategyParametersGrp StrategyParamName entries. Each StrategyParamName entry is a string up to 32 characters long. Default is NULL
strategyParamTypeArray of mftrading::StrategyParameterType::Value entries. Default is NULL
strategyParamValueArray of mftrading::NewOrderSingle::StrategyParametersGrp StrategyParamValue entries. Each StrategyParamValue entry is a string up to 32 characters long. Default is NULL
nStrategyParamsNumber of mftrading::NewOrderSingle::StrategyParametersGrp entries. Default is 0
More...
 
void orderCancelReplaceRequest ()
 Submit modification to an existing order using the mftrading::OrderCancelReplaceRequest reference returned by the last call to createOrderCancelReplaceRequest(). More...
 
mftrading::OrderCancelReplaceRequest & createOrderCancelReplaceRequest (MFProto::VenueID venueID, MFProto::SecurityID securityID, const char *clOrdID, const char *origOrdID, MFProto::OrderID orderID, mftrading::Side::Value side, mftrading::OrdType::Value ordType, mftrading::TimeInForce::Value timeInForce)
 Allocate mftrading::OrderCancelReplaceRequest object and populate it with the supplied parameters.

Parameters
venueIDMFProto::VenueID
securityIDMFProto::SecurityID
clOrdIDUnique identifier for Order as assigned by the buy-side. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
origOrdIDClOrdID of the order to modify. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
orderIDMFProto::OrderID
sidemftrading::Side::Value
ordTypemftrading::OrdType::Value
timeInForcemftrading::TimeInForce::Value
More...
 
void orderCancelRequest ()
 Submit cancel request for an existing order using the object created by the previous call to createOrderCancelRequest(). More...
 
mftrading::OrderCancelRequest & createOrderCancelRequest (MFProto::VenueID venueID, MFProto::SecurityID securityID, const char *clOrdID, const char *origClOrdID, MFProto::OrderID orderID)
 Allocate mftrading::OrderCancelRequest object and populate it with the supplied parameters.

Parameters
venueIDMFProto::VenueID
securityIDMFProto::SecurityID
clOrdIDUnique identifier for Order as assigned by the buy-side. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
origClOrdIDClOrdID of the order to cancel. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
orderIDMFProto::OrderID
More...
 

Friends

class MFClient
 

Detailed Description

A session with MarketFactory for trading with all the venues for which a user has access.

Member Function Documentation

mftrading::NewOrderSingle & MFTradingSession::createNewOrderSingle ( MFProto::VenueID  venueID,
MFProto::SecurityID  securityID,
const char *  clOrdId,
mftrading::Side::Value  side,
mftrading::OrdType::Value  ordType,
mftrading::TimeInForce::Value  timeInForce,
const char **  strategyParamName = NULL,
mftrading::StrategyParameterType::Value *  strategyParamType = NULL,
const char **  strategyParamValue = NULL,
int  nStrategyParams = 0 
)

Allocate mftrading::NewOrderSingle object and populate it with the supplied parameters.

Parameters
venueIDMFProto::VenueID
securityIDMFProto::SecurityID
clOrdIdClient order id. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
sidemftrading::Side::Value
ordTypemftrading::OrdType::Value
timeInForcemftrading::TimeInForce::Value
strategyParamNameArray of mftrading::NewOrderSingle::StrategyParametersGrp StrategyParamName entries. Each StrategyParamName entry is a string up to 32 characters long. Default is NULL
strategyParamTypeArray of mftrading::StrategyParameterType::Value entries. Default is NULL
strategyParamValueArray of mftrading::NewOrderSingle::StrategyParametersGrp StrategyParamValue entries. Each StrategyParamValue entry is a string up to 32 characters long. Default is NULL
nStrategyParamsNumber of mftrading::NewOrderSingle::StrategyParametersGrp entries. Default is 0

mftrading::OrderCancelReplaceRequest & MFTradingSession::createOrderCancelReplaceRequest ( MFProto::VenueID  venueID,
MFProto::SecurityID  securityID,
const char *  clOrdID,
const char *  origOrdID,
MFProto::OrderID  orderID,
mftrading::Side::Value  side,
mftrading::OrdType::Value  ordType,
mftrading::TimeInForce::Value  timeInForce 
)

Allocate mftrading::OrderCancelReplaceRequest object and populate it with the supplied parameters.

Parameters
venueIDMFProto::VenueID
securityIDMFProto::SecurityID
clOrdIDUnique identifier for Order as assigned by the buy-side. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
origOrdIDClOrdID of the order to modify. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
orderIDMFProto::OrderID
sidemftrading::Side::Value
ordTypemftrading::OrdType::Value
timeInForcemftrading::TimeInForce::Value

mftrading::OrderCancelRequest & MFTradingSession::createOrderCancelRequest ( MFProto::VenueID  venueID,
MFProto::SecurityID  securityID,
const char *  clOrdID,
const char *  origClOrdID,
MFProto::OrderID  orderID 
)

Allocate mftrading::OrderCancelRequest object and populate it with the supplied parameters.

Parameters
venueIDMFProto::VenueID
securityIDMFProto::SecurityID
clOrdIDUnique identifier for Order as assigned by the buy-side. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
origClOrdIDClOrdID of the order to cancel. A string up to 32 characters long which is null-terminated unless the length is 32 (in which case, no null-termination necessary).
orderIDMFProto::OrderID

uint64_t MFTradingSession::getSendingTime ( ) const
inline

Retrieve the sending time of the current frame.

void MFTradingSession::logon ( )

Sends a logon message with the supplied username and password. Should only be called in the event loop by the handler.

void MFTradingSession::logout ( )

Initiates logout. This should be called so a clean and dirty (one where the socket closes w/o a logout) can be easily differentiated. Should only be called in the event loop by the handler.

void MFTradingSession::logoutResponse ( )

The response to a logout from the server. This should be called if a logout is received so that the client can indicate a clean logout. Should only be called in the event loop by the handler.

void MFTradingSession::marketDefinitionRequest ( )

A request to receive the definitions of each market.

void MFTradingSession::newOrderSingle ( )

Submit an order. The order submitted will be the mftrading::NewOrderSingle object that was returned as a reference from the last call to MFTradingSession::createNewOrderSingle()

void MFTradingSession::orderCancelReplaceRequest ( )

Submit modification to an existing order using the mftrading::OrderCancelReplaceRequest reference returned by the last call to createOrderCancelReplaceRequest().

void MFTradingSession::orderCancelRequest ( )

Submit cancel request for an existing order using the object created by the previous call to createOrderCancelRequest().

void MFTradingSession::tradingRequest ( MFProto::VenueID  venueID,
mftrading::SubscriptionRequestType::Value  subType,
MFProto::SeqNum  nextExpSeqNum 
)

A request to subscribe or unsubscribe to/from a particular venue (as specified by the venueID parameter) in order to trade or stop trading. A message of type mftrading::TradingSessionStatusRequest will be sent.

Parameters
venueIDMFProto::VenueID
subTypemftrading::SubscriptionRequestType::Value - Subscribe or Unsubscribe
nextExpSeqNumMFProto::SeqNum


The documentation for this class was generated from the following files: