MarketFactory C# API 3.0
MFAdmin Class Reference

An API admin which contains a MFClient for function forwarding. More...

Inheritance diagram for MFAdmin:
MFClient

Classes

class  RiskLimit
 Admin interface: group limit, optionally for a specific feed and market. More...
 
class  RiskMarketPosition
 Admin interface: Use this if interested in market position rather than RiskUsage's net open position. More...
 
class  RiskUsage
 Admin interface: user state. More...
 

Public Member Functions

 MFAdmin (string _username, string _password, string _hostname1, int _port1)
 Create a new admin object. More...
 
 MFAdmin (string _username, string _password, string _hostname1, int _port1, string _hostname2, int _port2)
 Create a new admin object (with failover). More...
 
APIResult allowClientsToConnect ()
 Admin interface: Call this method to allow non-admin API clients to connect. More...
 
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'). More...
 
APIResult cancelOrder (string cxlID, long orderID)
 Cancel a previously placed order by internal 'orderID'. 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...
 
RiskLimit [] getRiskLimits ()
 Admin interface: limits registered by server process. More...
 
RiskMarketPosition [] getRiskMarketPositions ()
 Admin interface: Returns array of derived RiskMarketPositions rather than RiskUsage. More...
 
long getRiskTimestamp ()
 Admin interface: timestamp of last constraint update from server process. More...
 
RiskUsage [] getRiskUsage ()
 Admin interface: full risk usage view held by server process. More...
 
int getSequenceID (int feedID)
 Get the last received sequenceID after successful subscription. More...
 
string getSignature ()
 Get protocol api signature. More...
 
Dictionary< string, string[]> getUserGroupChains ()
 Admin interface: linear list of groups to which each user belongs. 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...
 
APIResult lockUser (string clRequestID, string username, bool locked)
 Admin interface: Lock / unlock user accounts. More...
 
void log (string message)
 Logs a debug message into the Whisperer server _log file. More...
 
void log (string message, LogLevel level)
 
KeyValuePair< APIResult, long > modifyOrder (string clOrdID, string clNewID, MFFloat amount, MFFloat price)
 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. More...
 
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...
 
APIResult requestSnapshot (int feedID, int marketID)
 Request a market data snapshot for the feed and market ID. More...
 
override APIResult run (MFHandler _handler)
 
APIResult run (MFAdminHandler handler)
 Run a loop that will continuously dispatch incoming messages to a _handler implementation. More...
 
void setDebug (bool debug)
 
APIResult setRisk (string clRequestID, RiskLimit[] limits, RiskUsage[] usages, bool isSnapshot)
 Admin interface: publish incremental/snapshot set of limits and usage. More...
 
APIResult setRisk (string clRequestID, RiskLimit[] limits, RiskUsage[] usages, bool isSnapshot, bool doReplace)
 
APIResult setRisk (string clRequestID, params RiskLimit[] limits)
 Admin interface: publish incremental set of limits. More...
 
APIResult setRisk (string clRequestID, params RiskUsage[] usages)
 Admin interface: publish incremental set of risk usage. More...
 
APIResult setRisk (string clRequestID, bool doReplace, params RiskUsage[] usages)
 
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...
 
KeyValuePair< APIResult, long > submitOrder (string clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, OrderType ordType, TimeInForce tif)
 Submit an order. More...
 
KeyValuePair< APIResult, long > submitOrder (string clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, MFFloat stopPrice, MFFloat maxShowAmt, OrderType ordType, TimeInForce tif)
 Submit an order without minAmount (kept for backward compatibility). More...
 
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)
 
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...
 
APIResult subscribeAllMD ()
 Subscribe to all the market data feeds. More...
 
APIResult subscribeMD (int feedID, int marketID, String clSubID)
 Subscribe to market data updates for a specific feed. More...
 
APIResult subscribeMD (int feedID, int marketID)
 Subscribe to market data updates for a specific feed. More...
 
APIResult subscribeOF (int feedID, String clSubID)
 Subscribe to trading for a specific feed. More...
 
APIResult subscribeOF (int feedID)
 Subscribe to trading for a specific feed. More...
 
void test (APITest test)
 Internal testing function. More...
 
APIResult unregisterMarketComb (int batchDefID)
 Unregister for a given list of markets on a given feed using id. More...
 
APIResult unsubscribeAll ()
 Unsubscribe all market data and trading subscriptions. More...
 
APIResult unsubscribeMD (int feedID, int marketID, String clSubID)
 Unsubscribe to market data updates for a specific feed. More...
 
APIResult unsubscribeMD (int feedID, int marketID)
 Unsubscribe to market data updates for a specific feed. More...
 
APIResult unsubscribeOF (int feedID, String clSubID)
 Unsubscribe to trading for a specific feed. More...
 
APIResult unsubscribeOF (int feedID)
 Unsubscribe to trading for a specific feed. More...
 

Static Public Member Functions

static new MFAdmin 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 new MFAdmin 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...
 

Static Public Attributes

static readonly int FEED_ALL = -1
 
static readonly int FEED_NULL = 0
 Pair with marketID to reference individual currencies. More...
 
static readonly int MARKET_ALL = -1
 
static readonly long SETTL_DATE_CASH = (long)(-2 * (1e9 * 86400))
 
static readonly long SETTL_DATE_SUM = (long)(-1 * (1e9 * 86400))
 

Protected Member Functions

override APIResult connectOne (String host, int port)
 
APIResult send (IMessage msg)
 

Protected Attributes

string _hostname1
 
string _hostname2
 
Logger _log = Logger.getLogger("com.marketfactory.api")
 
string _password
 
int _port1
 
int _port2
 
RiskLimit [] _riskLimits = new RiskLimit[0]
 
long _riskTimestamp
 
RiskUsage [] _riskUsages = new RiskUsage[0]
 
List< TradeLimitDataMessage > _tradeLimitDataQueue
 
Dictionary< String, String[]> _userGroupChains = new Dictionary<String, String[]>()
 
string _username
 

Detailed Description

An API admin which contains a MFClient for function forwarding.

Constructor & Destructor Documentation

◆ MFAdmin() [1/2]

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

Create a new admin object.

A new client still needs to be connected (see connect()).

◆ MFAdmin() [2/2]

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

Create a new admin object (with failover).

A new client still needs to be connected (see connect()).

Member Function Documentation

◆ connectOne()

override APIResult connectOne ( String  host,
int  port 
)
protectedvirtual

Reimplemented from MFClient.

◆ run() [1/2]

override APIResult run ( MFHandler  _handler)
virtual

Reimplemented from MFClient.

◆ run() [2/2]

APIResult run ( MFAdminHandler  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.

◆ open() [1/2]

static new MFAdmin 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 new MFAdmin 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;

◆ allowClientsToConnect()

APIResult allowClientsToConnect ( )

Admin interface: Call this method to allow non-admin API clients to connect.

An MFAdmin must remain connected and have called this method for monitored clients to function.

◆ lockUser()

APIResult lockUser ( string  clRequestID,
string  username,
bool  locked 
)

Admin interface: Lock / unlock user accounts.

This is a more granular, subordinate, version of allowClientsToConnect().

◆ setRisk() [1/5]

APIResult setRisk ( string  clRequestID,
RiskLimit []  limits,
RiskUsage []  usages,
bool  isSnapshot 
)

Admin interface: publish incremental/snapshot set of limits and usage.

A full snapshot must be sent prior to allowClientsToConnect() so NOP calculations are not stale.

◆ setRisk() [2/5]

APIResult setRisk ( string  clRequestID,
RiskLimit []  limits,
RiskUsage []  usages,
bool  isSnapshot,
bool  doReplace 
)

◆ setRisk() [3/5]

APIResult setRisk ( string  clRequestID,
params RiskLimit []  limits 
)

Admin interface: publish incremental set of limits.

Group limits may be selectively updated, deferring to previous values/defaults if desired. If a group is subject to multiple limits, the most restrictive limit will always be preferred.

◆ setRisk() [4/5]

APIResult setRisk ( string  clRequestID,
params RiskUsage []  usages 
)

Admin interface: publish incremental set of risk usage.

User state may be selectively updated based on current activity. Users only have a single state, to which the server will incorporate unacknowledged/pending orders.

◆ setRisk() [5/5]

APIResult setRisk ( string  clRequestID,
bool  doReplace,
params RiskUsage []  usages 
)

◆ getRiskLimits()

RiskLimit [] getRiskLimits ( )

Admin interface: limits registered by server process.

May include server defaults and other limits not explicitly initialized from an admin instance.

◆ getRiskUsage()

RiskUsage [] getRiskUsage ( )

Admin interface: full risk usage view held by server process.

Will reflect the last set of usages received by the server, incorporating unacknowledged/pending orders. Will only include groups that have been modified by admin or trade activity.

◆ getRiskMarketPositions()

RiskMarketPosition [] getRiskMarketPositions ( )

Admin interface: Returns array of derived RiskMarketPositions rather than RiskUsage.

The results are abridged to show current position without being broken down by date.

◆ getRiskTimestamp()

long getRiskTimestamp ( )

Admin interface: timestamp of last constraint update from server process.

◆ getUserGroupChains()

Dictionary<string, string[]> getUserGroupChains ( )

Admin interface: linear list of groups to which each user belongs.

(each entry is a direct child of the next group in the list.) Ex: <ApiUser1: [ApiUser1, Client1, Root] GuiUser1: [GuiUser1, Client1, Root]>

◆ 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.

◆ 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.

◆ processEvents()

APIResult processEvents ( MFHandler  _handler)
inherited

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.

◆ 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() [1/2]

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

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.

◆ subscribeMD() [2/2]

APIResult subscribeMD ( int  feedID,
int  marketID 
)
inherited

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.

◆ subscribeOF() [1/2]

APIResult subscribeOF ( int  feedID,
String  clSubID 
)
inherited

Subscribe to trading for a specific feed.

onSubscriptionEvent() will be called to notify that the order gateway is ready. If the subscription is valid, it will be possible to submit and cancel orders and receive trading events.

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

◆ subscribeOF() [2/2]

APIResult subscribeOF ( int  feedID)
inherited

Subscribe to trading for a specific feed.

onSubscriptionEvent() will be called to notify that the order gateway is ready. If the subscription is valid, it will be possible to submit and cancel orders and receive trading events.

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

◆ subscribeAllMD()

APIResult subscribeAllMD ( )
inherited

Subscribe to all the market data feeds.

This is intended as a test utility; ideally you control which feeds and markets you connect to.

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

◆ unsubscribeMD() [1/2]

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

Unsubscribe to market data updates for a specific feed.

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

◆ unsubscribeMD() [2/2]

APIResult unsubscribeMD ( int  feedID,
int  marketID 
)
inherited

Unsubscribe to market data updates for a specific feed.

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

◆ unsubscribeOF() [1/2]

APIResult unsubscribeOF ( int  feedID,
String  clSubID 
)
inherited

Unsubscribe to trading for a specific feed.

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

◆ unsubscribeOF() [2/2]

APIResult unsubscribeOF ( int  feedID)
inherited

Unsubscribe to trading for a specific feed.

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

◆ 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.

◆ registerMarketComb()

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

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()

APIResult unregisterMarketComb ( int  batchDefID)
inherited

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

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

◆ requestSnapshot()

APIResult requestSnapshot ( int  feedID,
int  marketID 
)
inherited

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]

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

Submit an order.

Returns
-1 if the order could not be placed because it is redundant.

◆ submitOrder() [2/4]

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

Submit an order without minAmount (kept for backward compatibility).

Returns
-1 if the order could not be placed because it is redundant.

◆ submitOrder() [3/4]

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 
)
inherited

◆ submitOrder() [4/4]

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 
)
inherited

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.

Returns
APIResult describing the success or failure; and the orderid or 0 if the action failed.
Parameters
clOrdIDclient order identifier.
feedIDFeed identifier.
marketIDmarket identifier.
sideside
amountamount
priceprice
stopPricestop price
maxShowAmtmax show amount
minFillAmtminimum fill amount
ordTypeorder type
tiftime in force
parametersoptional OrderParameters

◆ modifyOrder()

KeyValuePair<APIResult,long> modifyOrder ( string  clOrdID,
string  clNewID,
MFFloat  amount,
MFFloat  price 
)
inherited

Submit modification to an existing order.

Returns
Pair The first member is APIResult.OK if the order has been sent. The second member is the orderID.

◆ cancelOrder() [1/2]

APIResult cancelOrder ( string  cxlID,
string  clOrdID 
)
inherited

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/2]

APIResult cancelOrder ( string  cxlID,
long  orderID 
)
inherited

Cancel a previously placed order by internal 'orderID'.

Return false if the internal 'orderID' could not be provided.

◆ cancelAll() [1/2]

APIResult cancelAll ( int  feedID,
string  cxlID 
)
inherited

Cancel all the orders on a feed.

◆ cancelAll() [2/2]

APIResult cancelAll ( string  cxlID)
inherited

Cancel all the orders, on all _feeds.

◆ 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

◆ _userGroupChains

Dictionary<String, String[]> _userGroupChains = new Dictionary<String, String[]>()
protected

◆ _riskLimits

RiskLimit [] _riskLimits = new RiskLimit[0]
protected

◆ _riskUsages

RiskUsage [] _riskUsages = new RiskUsage[0]
protected

◆ _riskTimestamp

long _riskTimestamp
protected

◆ _tradeLimitDataQueue

List<TradeLimitDataMessage> _tradeLimitDataQueue
protected
Initial value:
=
new List<TradeLimitDataMessage>()

◆ FEED_NULL

readonly int FEED_NULL = 0
static

Pair with marketID to reference individual currencies.

◆ FEED_ALL

readonly int FEED_ALL = -1
static

◆ MARKET_ALL

readonly int MARKET_ALL = -1
static

◆ SETTL_DATE_SUM

readonly long SETTL_DATE_SUM = (long)(-1 * (1e9 * 86400))
static

◆ SETTL_DATE_CASH

readonly long SETTL_DATE_CASH = (long)(-2 * (1e9 * 86400))
static

◆ _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.