MarketFactory 3.14.0 C# API
MFClient Class Reference
Inheritance diagram for MFClient:
MFBaseClient

Public Member Functions

 MFClient (string _username, string _password, string _hostname1, int _port1)
 
 MFClient (string _username, string _password, string _hostname1, int _port1, string _hostname2, int _port2)
 
new APIResult cancelAll (int feedID, String cxlID)
 Cancel all the orders on a feed. More...
 
new APIResult cancelAll (String cxlID)
 Cancel all the orders, on all feeds. More...
 
new APIResult cancelOrder (String cxlID, String clOrdID)
 Cancel a previously placed order by client order id ('clOrdID'). Return false if the order cannot be found locally, i.e., if the 'clOrdID' does not correspond to any previously placed order on this client interface. More...
 
new APIResult cancelOrder (String cxlID, long orderID)
 Cancel a previously placed order by internal 'orderID'. Return false if the internal 'orderID' could not be provided. More...
 
new APIResult cancelOrder (String cxlID, long orderID, String clOrdID)
 Cancel a previously placed order by providing both internal 'orderID' and clOrdID. APIResult.INVALID_ORDERID if the internal 'orderID' could not be provided. More...
 
APIResult close ()
 Close the connection. More...
 
APIResult connect ()
 Connect to the first available server with user credentials. More...
 
APIFeed getFeedByID (int id)
 After a successful connection is established, you may access the server's list of _feeds, markets. More...
 
APIFeed getFeedByName (string name)
 After a successful connection is established, you may access the server's list of _feeds, markets. More...
 
APIFeed [] getFeeds ()
 After a successful connection is established, you may access the server's list of _feeds, markets. More...
 
string getHostname ()
 Returns the primary/secondary server hostname (whichever one is being used). More...
 
Queue< PingTime > getLastPingTimes ()
 
APIMarket getMarketByID (APIFeed feed, int marketID)
 After a successful connection is established, you may access the server's list of _feeds, markets. More...
 
APIMarket getMarketByName (APIFeed feed, string name)
 After a successful connection is established, you may access the server's list of _feeds, markets. More...
 
int getPort ()
 Returns the primary/secondary server port (whichever one is being used). More...
 
int getSequenceID (int feedID)
 Get the last received sequenceID after successful subscription. More...
 
string getSignature ()
 Get protocol api signature. More...
 
bool isConnected ()
 Return true if the _channel is _connected. More...
 
bool isRunning ()
 Returns true if the client is currently dispatching events (i.e., you called run()). More...
 
bool isStopRequested ()
 
APIResult join ()
 Block until the client has exited the dispatch loop. More...
 
void log (string message)
 Logs a debug message into the Whisperer server _log file. More...
 
void log (string message, LogLevel level)
 
new KeyValuePair< APIResult, long > modifyOrder (string clOrdID, string clNewID, MFFloat amount, MFFloat price, OrderParameters parameters=null)
 Submit modification to an existing order. More...
 
APIResult processEvents (MFHandler handler)
 Process all pending events in the reactor, and return as soon as reads/writes have been flushed.This can be used to integrate our API within a GUI toolkit's event processing loop without having to create a secondary thread. More...
 
new KeyValuePair< APIResult, int > registerMarketComb (int feedID, int[] marketIds)
 Register for a given list of markets on a given feed. More...
 
APIResult replay (int feedID, int fromSequenceID, int toSequenceID)
 Request replay of order flow events in the range [fromSequenceID, toSequenceID=-1]. More...
 
new APIResult requestSnapshot (int feedID, int marketID)
 Request a market data snapshot for the feed and market ID. (Note that after connecting you should get a snapshot automatically, so this should be used rarely.) More...
 
APIResult run (MFHandler handler)
 Run a loop that will continuously dispatch incoming messages to a _handler implementation. This method returns some time after a request to stop is made using stop(), or if an error occurs (e.g. the connection is broken). A zero return value indicates a normal exit via a stop request. More...
 
void setDebug (bool debug)
 
void setStickySubscriptions (bool sticky)
 Enable/Disable sticky subscriptions. More...
 
void setStickySubscriptions (bool sticky, bool clearSubscriptionsOnStop)
 
void setUseHeartbeat (bool use)
 
APIResult stop ()
 Request to stop the event dispatch loop, does not disconnect the client from the server. More...
 
new KeyValuePair< APIResult, long > submitOrder (string clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, OrderType ordType, TimeInForce tif)
 
new KeyValuePair< APIResult, long > submitOrder (string clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, MFFloat stopPrice, MFFloat maxShowAmt, OrderType ordType, TimeInForce tif)
 
new KeyValuePair< APIResult, long > submitOrder (string clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, MFFloat stopPrice, MFFloat maxShowAmt, MFFloat minFillAmt, OrderType ordType, TimeInForce tif, List< KeyValuePair< string, string >> parameters)
 
new KeyValuePair< APIResult, long > submitOrder (string clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, MFFloat stopPrice, MFFloat maxShowAmt, MFFloat minFillAmt, OrderType ordType, TimeInForce tif, OrderParameters parameters=null)
 Submits the order. Use an OrderParametersBuilder to construct a reusable OrderParameters object. Offers better performance if the you want to reuse the same order parameters for multiple submitOrder calls. More...
 
new APIResult subscribeAllMD ()
 
new APIResult subscribeMD (int feedID, int marketID, string clSubID)
 
new APIResult subscribeMD (int feedID, int marketID)
 
new APIResult subscribeOF (int feedID, String clSubID)
 
new APIResult subscribeOF (int feedID)
 
void test (APITest test)
 Internal testing function. More...
 
new APIResult unregisterMarketComb (int batchDefID)
 Unregister for a given list of markets on a given feed using id.

Returns
APIResult.OK if the unregistration request has been sent.
More...
 
APIResult unsubscribeAll ()
 Unsubscribe all market data and trading subscriptions. More...
 
new APIResult unsubscribeMD (int feedID, int marketID, String clSubID)
 
new APIResult unsubscribeMD (int feedID, int marketID)
 
new APIResult unsubscribeOF (int feedID, String clSubID)
 
new APIResult unsubscribeOF (int feedID)
 

Static Public Member Functions

static MFClient open (string user, string pass, string host, int port)
 A convenience method which creates a new client object, attempts to connect to Whisperer, and cleans up and throws an exception if we could not connect. More...
 
static MFClient open (string user, string pass, string _hostname1, int _port1, string _hostname2, int _port2)
 A convenience method which creates a new client object, attempts to connect to Whisperer, and cleans up and throws an exception if we could not connect. More...
 

Protected Member Functions

APIResult cancelAll (int feedID, string cxlID)
 Cancel all the orders on a feed. More...
 
APIResult cancelAll (string cxlID)
 Cancel all the orders, on all feeds. More...
 
APIResult cancelOrder (string cxlID, string clOrdID)
 Cancel a previously placed order by client order id ('clOrdID'). Return false if the order cannot be found locally, i.e., if the 'clOrdID' does not correspond to any previously placed order on this client interface. More...
 
APIResult cancelOrder (string cxlID, long orderID)
 Cancel a previously placed order by internal 'orderID'. Return false if the internal 'orderID' could not be provided. More...
 
APIResult cancelOrder (string cxlID, long orderID, string clOrdID)
 Cancel a previously placed order by providing both internal 'orderID' and clOrdID. APIResult.INVALID_ORDERID if the internal 'orderID' could not be provided. More...
 
virtual APIResult connectOne (String host, int port)
 
override void onBatchComplete (int msg)
 
override void onConnect ()
 
override void onDateRollover (DateRollover msg)
 
override void onDisconnect ()
 
override void onDropCopy (DropCopy msg)
 
override void onEventReport (EventReport msg)
 
override void onHeartbeat (Heartbeat msg)
 
virtual void onJsonFromServer (JsonFromServer msg)
 
virtual void onLockResponse (LockResponse lockResponse)
 
override void onMarketData (MarketView msg)
 
virtual void onMassQuoteAck (MassQuoteAck msg)
 
virtual void onNewOrder (NewOrder msg)
 
override void onOrderCanceled (OrderCanceled msg)
 
override void onOrderCancelRejected (OrderCancelRejected msg)
 
override void onOrderDone (OrderDone msg)
 
override void onOrderReceived (OrderReceived msg)
 
override void onOrderRejected (OrderRejected msg)
 
override void onOrderSubmitted (OrderSubmitted msg)
 
virtual void onOrderTimeout (OrderTimeout msg)
 
virtual void onQuoteRequest (QuoteRequest msg)
 
override void onReplayDone (ReplayDone msg)
 
virtual void onRiskResponse (RiskResponse riskResponse)
 
override void onStart ()
 
override void onStop ()
 
override void onSubscriptionEvent (SubscriptionEvent msg)
 
override void onTradeCapture (TradeCapture msg)
 
virtual void onTradeCaptureAck (TradeCaptureAck msg)
 
APIResult run (MFBaseHandler _handler, bool loop)
 
APIResult send (IMessage msg)
 
APIResult subscribe (APIType apiType, int feedID, int marketID, String clSubID)
 
APIResult subscribeMD (int feedID, int marketID, String clSubID)
 Subscribe to market data updates for a specific feed. onSubscriptionEvent() will be called to notify that the flow of updates is ready. If the subscription is valid, onMarketData() will be called later on. The client subscription ID allows one-to-one message matching. More...
 
APIResult unsubscribe (APIType apiType, int feedID, int marketID, String clSubID)
 

Protected Attributes

string _hostname1
 
string _hostname2
 
Logger _log = Logger.getLogger("com.marketfactory.api")
 
string _password
 
int _port1
 
int _port2
 
string _username
 

Constructor & Destructor Documentation

◆ MFClient() [1/2]

MFClient ( string  _username,
string  _password,
string  _hostname1,
int  _port1 
)

◆ MFClient() [2/2]

MFClient ( string  _username,
string  _password,
string  _hostname1,
int  _port1,
string  _hostname2,
int  _port2 
)

Member Function Documentation

◆ run() [1/2]

APIResult run ( MFHandler  handler)

Run a loop that will continuously dispatch incoming messages to a _handler implementation. This method returns some time after a request to stop is made using stop(), or if an error occurs (e.g. the connection is broken). A zero return value indicates a normal exit via a stop request.

If the connection is broken and the client succesfully fails over to a secondary server, this dispatcher does not return; onDisconnect() and onConnect() are invoked to let the handler know that this occurred. If the reconnection attempt is not successful, the dispatcher will return an error code.

Every call to run() must be preceded by a successful connect() – this call is made for you, but only once, when a client is obtained via open().

Note: this should not be invoked by _handler. /summary>

◆ processEvents()

APIResult processEvents ( MFHandler  handler)

Process all pending events in the reactor, and return as soon as reads/writes have been flushed.This can be used to integrate our API within a GUI toolkit's event processing loop without having to create a secondary thread.

◆ subscribeMD() [1/3]

new APIResult subscribeMD ( int  feedID,
int  marketID,
string  clSubID 
)

◆ subscribeMD() [2/3]

new APIResult subscribeMD ( int  feedID,
int  marketID 
)

◆ subscribeOF() [1/2]

new APIResult subscribeOF ( int  feedID,
String  clSubID 
)

◆ subscribeOF() [2/2]

new APIResult subscribeOF ( int  feedID)

◆ subscribeAllMD()

new APIResult subscribeAllMD ( )

◆ unsubscribeMD() [1/2]

new APIResult unsubscribeMD ( int  feedID,
int  marketID,
String  clSubID 
)

◆ unsubscribeMD() [2/2]

new APIResult unsubscribeMD ( int  feedID,
int  marketID 
)

◆ unsubscribeOF() [1/2]

new APIResult unsubscribeOF ( int  feedID,
String  clSubID 
)

◆ unsubscribeOF() [2/2]

new APIResult unsubscribeOF ( int  feedID)

◆ registerMarketComb()

new KeyValuePair<APIResult, int> registerMarketComb ( int  feedID,
int []  marketIds 
)

Register for a given list of markets on a given feed.

Returns
KeyValuePair The first member is APIResult.OK if the comb has been registered. The second member is a unique id to identify the market combination.

◆ unregisterMarketComb()

new APIResult unregisterMarketComb ( int  batchDefID)

Unregister for a given list of markets on a given feed using id.

Returns
APIResult.OK if the unregistration request has been sent.

◆ requestSnapshot()

new APIResult requestSnapshot ( int  feedID,
int  marketID 
)

Request a market data snapshot for the feed and market ID. (Note that after connecting you should get a snapshot automatically, so this should be used rarely.)

Returns
0 if the snapshot request has been sent, -1 on error.

◆ submitOrder() [1/4]

new KeyValuePair<APIResult, long> submitOrder ( string  clOrdID,
int  feedID,
int  marketID,
Side  side,
MFFloat  amount,
MFFloat  price,
OrderType  ordType,
TimeInForce  tif 
)

◆ submitOrder() [2/4]

new KeyValuePair<APIResult, long> submitOrder ( string  clOrdID,
int  feedID,
int  marketID,
Side  side,
MFFloat  amount,
MFFloat  price,
MFFloat  stopPrice,
MFFloat  maxShowAmt,
OrderType  ordType,
TimeInForce  tif 
)

◆ submitOrder() [3/4]

new KeyValuePair<APIResult, long> submitOrder ( string  clOrdID,
int  feedID,
int  marketID,
Side  side,
MFFloat  amount,
MFFloat  price,
MFFloat  stopPrice,
MFFloat  maxShowAmt,
MFFloat  minFillAmt,
OrderType  ordType,
TimeInForce  tif,
List< KeyValuePair< string, string >>  parameters 
)

◆ submitOrder() [4/4]

new KeyValuePair<APIResult, long> submitOrder ( string  clOrdID,
int  feedID,
int  marketID,
Side  side,
MFFloat  amount,
MFFloat  price,
MFFloat  stopPrice,
MFFloat  maxShowAmt,
MFFloat  minFillAmt,
OrderType  ordType,
TimeInForce  tif,
OrderParameters  parameters = null 
)

Submits the order. Use an OrderParametersBuilder to construct a reusable OrderParameters object. Offers better performance if the you want to reuse the same order parameters for multiple submitOrder calls.

◆ modifyOrder()

new KeyValuePair<APIResult, long> modifyOrder ( string  clOrdID,
string  clNewID,
MFFloat  amount,
MFFloat  price,
OrderParameters  parameters = null 
)

Submit modification to an existing order.

return KeyValuePair The first member is APIResult.OK if the order has been sent. The second member is the orderID.

◆ cancelOrder() [1/6]

new APIResult cancelOrder ( String  cxlID,
String  clOrdID 
)

Cancel a previously placed order by client order id ('clOrdID'). Return false if the order cannot be found locally, i.e., if the 'clOrdID' does not correspond to any previously placed order on this client interface.

◆ cancelOrder() [2/6]

new APIResult cancelOrder ( String  cxlID,
long  orderID 
)

Cancel a previously placed order by internal 'orderID'. Return false if the internal 'orderID' could not be provided.

◆ cancelOrder() [3/6]

new APIResult cancelOrder ( String  cxlID,
long  orderID,
String  clOrdID 
)

Cancel a previously placed order by providing both internal 'orderID' and clOrdID. APIResult.INVALID_ORDERID if the internal 'orderID' could not be provided.

◆ cancelAll() [1/4]

new APIResult cancelAll ( int  feedID,
String  cxlID 
)

Cancel all the orders on a feed.

◆ cancelAll() [2/4]

new APIResult cancelAll ( String  cxlID)

Cancel all the orders, on all feeds.

◆ onStart()

override void onStart ( )
protectedvirtual

Reimplemented from MFBaseClient.

◆ onStop()

override void onStop ( )
protectedvirtual

Reimplemented from MFBaseClient.

◆ onDisconnect()

override void onDisconnect ( )
protectedvirtual

Reimplemented from MFBaseClient.

◆ onConnect()

override void onConnect ( )
protectedvirtual

Reimplemented from MFBaseClient.

◆ onHeartbeat()

override void onHeartbeat ( Heartbeat  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onSubscriptionEvent()

override void onSubscriptionEvent ( SubscriptionEvent  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onMarketData()

override void onMarketData ( MarketView  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onEventReport()

override void onEventReport ( EventReport  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onDateRollover()

override void onDateRollover ( DateRollover  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onBatchComplete()

override void onBatchComplete ( int  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onOrderReceived()

override void onOrderReceived ( OrderReceived  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onOrderRejected()

override void onOrderRejected ( OrderRejected  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onOrderSubmitted()

override void onOrderSubmitted ( OrderSubmitted  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onOrderCanceled()

override void onOrderCanceled ( OrderCanceled  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onOrderCancelRejected()

override void onOrderCancelRejected ( OrderCancelRejected  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onTradeCapture()

override void onTradeCapture ( TradeCapture  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onOrderDone()

override void onOrderDone ( OrderDone  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onDropCopy()

override void onDropCopy ( DropCopy  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ onReplayDone()

override void onReplayDone ( ReplayDone  msg)
protectedvirtual

Reimplemented from MFBaseClient.

◆ open() [1/2]

static MFClient open ( string  user,
string  pass,
string  host,
int  port 
)
static

A convenience method which creates a new client object, attempts to connect to Whisperer, and cleans up and throws an exception if we could not connect.

Otherwise the new client object is returned;

◆ open() [2/2]

static MFClient open ( string  user,
string  pass,
string  _hostname1,
int  _port1,
string  _hostname2,
int  _port2 
)
static

A convenience method which creates a new client object, attempts to connect to Whisperer, and cleans up and throws an exception if we could not connect.

Otherwise the new client object is returned;

◆ setUseHeartbeat()

void setUseHeartbeat ( bool  use)
inherited

◆ setDebug()

void setDebug ( bool  debug)
inherited

◆ setStickySubscriptions() [1/2]

void setStickySubscriptions ( bool  sticky)
inherited

Enable/Disable sticky subscriptions.

Set clearSubscriptionsOnStop=false if subscriptions should persist on disconnect/stop/start.

◆ setStickySubscriptions() [2/2]

void setStickySubscriptions ( bool  sticky,
bool  clearSubscriptionsOnStop 
)
inherited

◆ isConnected()

bool isConnected ( )
inherited

Return true if the _channel is _connected.

◆ connect()

APIResult connect ( )
inherited

Connect to the first available server with user credentials.

Returns 0 if the connection attempt succeeded; returns a negative number if on failure.

Note: this should not be invoked by _handler.

◆ connectOne()

virtual APIResult connectOne ( String  host,
int  port 
)
protectedvirtualinherited

Reimplemented in MFAdmin.

◆ close()

APIResult close ( )
inherited

Close the connection.

(This can only be called this when you're not dispatching.)

Note: this should not be invoked by _handler.

◆ isRunning()

bool isRunning ( )
inherited

Returns true if the client is currently dispatching events (i.e., you called run()).

◆ stop()

APIResult stop ( )
inherited

Request to stop the event dispatch loop, does not disconnect the client from the server.

◆ isStopRequested()

bool isStopRequested ( )
inherited

◆ join()

APIResult join ( )
inherited

Block until the client has exited the dispatch loop.

Note: this should not be invoked by _handler.

◆ run() [2/2]

APIResult run ( MFBaseHandler  _handler,
bool  loop 
)
protectedinherited

_log.info("Attempting reconnect...");

◆ send()

APIResult send ( IMessage  msg)
protectedinherited

◆ getSignature()

string getSignature ( )
inherited

Get protocol api signature.

◆ getSequenceID()

int getSequenceID ( int  feedID)
inherited

Get the last received sequenceID after successful subscription.

Returns -2 if not subscribed. Returns -1 if there are no OF messages for the client on the feed.

◆ getFeeds()

APIFeed [] getFeeds ( )
inherited

After a successful connection is established, you may access the server's list of _feeds, markets.

If you have not yet _connected to the server this will return empty.

◆ getFeedByName()

APIFeed getFeedByName ( string  name)
inherited

After a successful connection is established, you may access the server's list of _feeds, markets.

This method will return a pointer to the feed of a given name if it exists and NULL if it does not. (this class maintains ownership to the object so do not delete it).

Returns
a pointer to the Feed of the given name or NULL if it does not exist.

◆ getFeedByID()

APIFeed getFeedByID ( int  id)
inherited

After a successful connection is established, you may access the server's list of _feeds, markets.

This method will return a pointer to the feed of a given id if it exists and NULL if it does not. (this class maintains ownership to the object so do not delete it).

Returns
a pointer to the Feed of the given id or NULL if it does not exist.

◆ getMarketByName()

APIMarket getMarketByName ( APIFeed  feed,
string  name 
)
inherited

After a successful connection is established, you may access the server's list of _feeds, markets.

This method will return a pointer to the market with a given name within the specified feed if such market exists or NULL if there is no market with the same name.

Returns
a pointer to the Market with the given name within the given feed or NULL if it does not exist.

◆ getMarketByID()

APIMarket getMarketByID ( APIFeed  feed,
int  marketID 
)
inherited

After a successful connection is established, you may access the server's list of _feeds, markets.

This method will return a pointer to the market with a given id within the specified feed if such market exists or NULL if there is no market with the same id.

Returns
a pointer to the Market with the given market id within the given feed or NULL if it does not exist.

◆ getHostname()

string getHostname ( )
inherited

Returns the primary/secondary server hostname (whichever one is being used).

Does not indicate whether a connection is in progress or successfully established.

◆ getPort()

int getPort ( )
inherited

Returns the primary/secondary server port (whichever one is being used).

Does not indicate whether a connection is in progress or successfully established.

◆ getLastPingTimes()

Queue<PingTime> getLastPingTimes ( )
inherited

◆ replay()

APIResult replay ( int  feedID,
int  fromSequenceID,
int  toSequenceID 
)
inherited

Request replay of order flow events in the range [fromSequenceID, toSequenceID=-1].

Only open-ended requests are accepted by the server.

Returns
0 if the replay request has been sent, -1 on error.

◆ subscribeMD() [3/3]

APIResult subscribeMD ( int  feedID,
int  marketID,
String  clSubID 
)
protectedinherited

Subscribe to market data updates for a specific feed. onSubscriptionEvent() will be called to notify that the flow of updates is ready. If the subscription is valid, onMarketData() will be called later on. The client subscription ID allows one-to-one message matching.

Returns
APIResult.OK if the subscription request has been sent, APIResult.SOCKERR_WRITING on error.

summary> Subscribe to market data updates for a specific feed. onSubscriptionEvent() will be called to notify that the flow of updates is ready. If the subscription is valid, onMarketData() will be called later on.

Returns
APIResult.OK if the subscription request has been sent, APIResult.SOCKERR_WRITING on error.

◆ subscribe()

APIResult subscribe ( APIType  apiType,
int  feedID,
int  marketID,
String  clSubID 
)
protectedinherited

◆ unsubscribe()

APIResult unsubscribe ( APIType  apiType,
int  feedID,
int  marketID,
String  clSubID 
)
protectedinherited

◆ unsubscribeAll()

APIResult unsubscribeAll ( )
inherited

Unsubscribe all market data and trading subscriptions.

Call this if you want to stop receiving callbacks but don't want to disconnect.

Returns
APIResult.OK if the unsubscription request has been sent, APIResult.SOCKERR_WRITING on error.

◆ cancelOrder() [4/6]

APIResult cancelOrder ( string  cxlID,
string  clOrdID 
)
protectedinherited

Cancel a previously placed order by client order id ('clOrdID'). Return false if the order cannot be found locally, i.e., if the 'clOrdID' does not correspond to any previously placed order on this client interface.

◆ cancelOrder() [5/6]

APIResult cancelOrder ( string  cxlID,
long  orderID 
)
protectedinherited

Cancel a previously placed order by internal 'orderID'. Return false if the internal 'orderID' could not be provided.

◆ cancelOrder() [6/6]

APIResult cancelOrder ( string  cxlID,
long  orderID,
string  clOrdID 
)
protectedinherited

Cancel a previously placed order by providing both internal 'orderID' and clOrdID. APIResult.INVALID_ORDERID if the internal 'orderID' could not be provided.

◆ cancelAll() [3/4]

APIResult cancelAll ( int  feedID,
string  cxlID 
)
protectedinherited

Cancel all the orders on a feed.

◆ cancelAll() [4/4]

APIResult cancelAll ( string  cxlID)
protectedinherited

Cancel all the orders, on all feeds.

◆ onLockResponse()

virtual void onLockResponse ( LockResponse  lockResponse)
protectedvirtualinherited

Reimplemented in MFAdmin.

◆ onRiskResponse()

virtual void onRiskResponse ( RiskResponse  riskResponse)
protectedvirtualinherited

Reimplemented in MFAdmin.

◆ onQuoteRequest()

virtual void onQuoteRequest ( QuoteRequest  msg)
protectedvirtualinherited

Reimplemented in MFMarketMaker.

◆ onMassQuoteAck()

virtual void onMassQuoteAck ( MassQuoteAck  msg)
protectedvirtualinherited

Reimplemented in MFMarketMaker.

◆ onNewOrder()

virtual void onNewOrder ( NewOrder  msg)
protectedvirtualinherited

Reimplemented in MFMarketMaker.

◆ onOrderTimeout()

virtual void onOrderTimeout ( OrderTimeout  msg)
protectedvirtualinherited

Reimplemented in MFMarketMaker.

◆ onTradeCaptureAck()

virtual void onTradeCaptureAck ( TradeCaptureAck  msg)
protectedvirtualinherited

Reimplemented in MFMarketMaker.

◆ onJsonFromServer()

virtual void onJsonFromServer ( JsonFromServer  msg)
protectedvirtualinherited

◆ log() [1/2]

void log ( string  message)
inherited

Logs a debug message into the Whisperer server _log file.

(We use this for inserting markers for automated testing and debugging.)

◆ log() [2/2]

void log ( string  message,
LogLevel  level 
)
inherited

◆ test()

void test ( APITest  test)
inherited

Internal testing function.

Do not use this.

Member Data Documentation

◆ _username

string _username
protectedinherited

◆ _password

string _password
protectedinherited

◆ _hostname1

string _hostname1
protectedinherited

◆ _port1

int _port1
protectedinherited

◆ _hostname2

string _hostname2
protectedinherited

◆ _port2

int _port2
protectedinherited

◆ _log

Logger _log = Logger.getLogger("com.marketfactory.api")
protectedinherited
Confidential. Copyright © 2011 MarketFactory, Inc.