public class MFClient extends MFClientBase
MFClientBase.OrderArgs, MFClientBase.PingTime, MFClientBase.RiskLimit, MFClientBase.RiskMarketPosition, MFClientBase.RiskUsage, MFClientBase.TimeStats_riskLimits, _riskTimestamp, _riskUsages, _tradeLimitDataQueue, _userGroupChains, FEED_ALL, FEED_NULL, MARKET_ALL, SETTL_DATE_CASH, SETTL_DATE_SUM| Constructor and Description |
|---|
MFClient(java.lang.String _username,
java.lang.String _password,
java.lang.String _hostname1,
int _port1)
Create a new client object.
|
MFClient(java.lang.String _username,
java.lang.String _password,
java.lang.String _hostname1,
int _port1,
java.lang.String _hostname2,
int _port2)
Create a new client object (with failover).
|
| Modifier and Type | Method and Description |
|---|---|
APIResult |
cancelAll(int feedID,
java.lang.String cxlID)
Cancel all the orders on a feed.
|
APIResult |
cancelAll(java.lang.String cxlID)
Cancel all the orders, on all feeds.
|
APIResult |
cancelOrder(java.lang.String cxlID,
long orderID)
Cancel a previously placed order by internal 'orderID'.
|
protected APIResult |
cancelOrder(java.lang.String cxlID,
long orderID,
java.lang.String clOrdID)
Cancel a previously placed order by providing both internal 'orderID' and clOrdID.
|
APIResult |
cancelOrder(java.lang.String cxlID,
java.lang.String clOrdID)
Cancel a previously placed order by client order id ('clOrdID').
|
protected MFHandler |
getHandler() |
Pair<APIResult,java.lang.Long> |
modifyOrder(java.lang.String clOrdID,
java.lang.String clNewID,
MFFloat amount,
MFFloat minAmount,
MFFloat price)
Submit modification to an existing order.
|
protected void |
onBatchComplete(int msg,
MFClientBase base) |
protected void |
onConnect(MFClientBase base) |
protected void |
onDateRollover(DateRollover msg,
MFClientBase base) |
protected void |
onDisconnect(MFClientBase base) |
protected void |
onDropCopy(DropCopy msg,
MFClientBase base) |
protected void |
onEventReport(EventReport msg,
MFClientBase base) |
protected void |
onHeartbeat(Heartbeat msg,
MFClientBase base) |
protected void |
onMarketData(MarketView msg,
MFClientBase base) |
protected void |
onOrderCanceled(OrderCanceled msg,
MFClientBase base) |
protected void |
onOrderCancelRejected(OrderCancelRejected msg,
MFClientBase base) |
protected void |
onOrderDone(OrderDone msg,
MFClientBase base) |
protected void |
onOrderReceived(OrderReceived msg,
MFClientBase base) |
protected void |
onOrderRejected(OrderRejected msg,
MFClientBase base) |
protected void |
onOrderSubmitted(OrderSubmitted msg,
MFClientBase base) |
protected void |
onReplayDone(ReplayDone msg,
MFClientBase base) |
protected void |
onStart(MFClientBase base) |
protected void |
onStop(MFClientBase base) |
protected void |
onSubscriptionEvent(SubscriptionEvent msg,
MFClientBase base) |
protected void |
onTradeCapture(TradeCapture msg,
MFClientBase base) |
static MFClient |
open(java.lang.String user,
java.lang.String pass,
java.lang.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.
|
static MFClient |
open(java.lang.String user,
java.lang.String pass,
java.lang.String _hostname1,
int _port1,
java.lang.String _hostname2,
int _port2) |
Pair<APIResult,java.lang.Integer> |
registerMarketComb(int feedID,
int[] marketIds)
Register for a given list of markets on a given feed.
|
APIResult |
requestSnapshot(int feedID,
int marketID)
Request a market data snapshot for the feed and market ID.
|
APIResult |
run(MFHandler _handler)
Run a loop that will continuously dispatch incoming messages to a
_handler implementation.
|
Pair<APIResult,java.lang.Long> |
submitOrder(java.lang.String clOrdID,
int feedID,
int marketID,
Side side,
MFFloat amount,
MFFloat price,
MFFloat stopPrice,
MFFloat maxShowAmt,
MFFloat minAmount,
OrderType ordType,
TimeInForce tif)
Submit an order.
|
Pair<APIResult,java.lang.Long> |
submitOrder(java.lang.String clOrdID,
int feedID,
int marketID,
Side side,
MFFloat amount,
MFFloat price,
MFFloat stopPrice,
MFFloat maxShowAmt,
MFFloat minAmount,
OrderType ordType,
TimeInForce tif,
java.lang.String modelID,
java.util.ArrayList<KeyValue> parameters)
Submit an order.
|
Pair<APIResult,java.lang.Long> |
submitOrder(java.lang.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).
|
Pair<APIResult,java.lang.Long> |
submitOrder(java.lang.String clOrdID,
int feedID,
int marketID,
Side side,
MFFloat amount,
MFFloat price,
OrderType ordType,
TimeInForce tif)
Submit an order.
|
Pair<APIResult,java.lang.Long> |
submitOrder(java.lang.String clOrdID,
int feedID,
int marketID,
Side side,
MFFloat amount,
MFFloat price,
OrderType ordType,
TimeInForce tif,
MFClientBase.OrderArgs args)
Submit an order.
|
APIResult |
subscribeAllMD()
Subscribe to all the market data feeds.
|
APIResult |
subscribeMD(int feedID,
int marketID)
Subscribe to market data updates for a specific feed.
|
APIResult |
subscribeMD(int feedID,
int marketID,
java.lang.String clSubID)
Subscribe to market data updates for a specific feed.
|
APIResult |
subscribeOF(int feedID)
Subscribe to trading for a specific feed.
|
APIResult |
subscribeOF(int feedID,
java.lang.String clSubID)
Subscribe to trading for a specific feed.
|
APIResult |
unregisterMarketComb(int batchDefID)
Unregister for a given list of markets on a given feed using the id
provided in onBatchEvent callback.
|
APIResult |
unsubscribeAll()
Unsubscribe all market data and trading subscriptions.
|
APIResult |
unsubscribeMD(int feedID,
int marketID)
Unsubscribe to market data updates for a specific feed.
|
APIResult |
unsubscribeMD(int feedID,
int marketID,
java.lang.String clSubID)
Unsubscribe to market data updates for a specific feed.
|
APIResult |
unsubscribeOF(int feedID)
Unsubscribe to trading for a specific feed.
|
APIResult |
unsubscribeOF(int feedID,
java.lang.String clSubID)
Unsubscribe to trading for a specific feed.
|
allowClientsToConnect, close, connect, connectOne, enableDebugMetrics, getFeedByID, getFeedByName, getFeeds, getHostname, getLastPingTimes, getMarketByID, getMarketByName, getPort, getRiskLimits, getRiskMarketPositions, getRiskTimestamp, getRiskUsage, getSequenceID, getSignature, getUserGroupChains, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, handle, init, isConnected, isRunning, isStopRequested, join, lockUser, log, log, modifyOrder, onJsonFromServer, onLockResponse, onMassQuoteAck, onNewOrder, onOrderTimeout, onQuoteRequest, onRiskResponse, onTradeCaptureAck, processEvents, replay, resetAdminMembers, run, send, setDebug, setRisk, setRisk, setRisk, setRisk, setRisk, setStickySubscriptions, setStickySubscriptions, setUseHeartbeat, stop, subscribePricing, subscribeTrading, test, unsubscribePricing, unsubscribeTradingpublic MFClient(java.lang.String _username,
java.lang.String _password,
java.lang.String _hostname1,
int _port1)
_username - -- username_password - -- password_hostname1 - -- primary host_port1 - -- primary portpublic MFClient(java.lang.String _username,
java.lang.String _password,
java.lang.String _hostname1,
int _port1,
java.lang.String _hostname2,
int _port2)
_username - -- username_password - -- password_hostname1 - -- primary host_port1 - -- primary port_hostname2 - -- secondary host_port2 - -- secondary portpublic APIResult run(MFHandler _handler)
_handler - to be runpublic static MFClient open(java.lang.String user, java.lang.String pass, java.lang.String host, int port) throws java.io.IOException
user - -- usernamepass - -- passwordhost - -- primary hostport - -- primary portjava.io.IOException - -- if connection failspublic static MFClient open(java.lang.String user, java.lang.String pass, java.lang.String _hostname1, int _port1, java.lang.String _hostname2, int _port2) throws java.io.IOException
user - -- usernamepass - -- password_hostname1 - -- primary host_port1 - -- primary port_hostname2 - -- secondary host_port2 - -- secondary portjava.io.IOException - -- if connection failspublic APIResult subscribeMD(int feedID, int marketID, java.lang.String clSubID)
MFClientBasesubscribeMD in class MFClientBasefeedID - -- feed idmarketID - -- market idclSubID - -- client subscription idpublic APIResult subscribeMD(int feedID, int marketID)
MFClientBasesubscribeMD in class MFClientBasefeedID - -- feed idmarketID - -- market idpublic APIResult subscribeOF(int feedID, java.lang.String clSubID)
MFClientBasesubscribeOF in class MFClientBasefeedID - -- the feed idclSubID - -- the client subscription idpublic APIResult subscribeOF(int feedID)
MFClientBasesubscribeOF in class MFClientBasefeedID - -- feed idpublic APIResult subscribeAllMD()
MFClientBasesubscribeAllMD in class MFClientBasepublic APIResult unsubscribeMD(int feedID, int marketID, java.lang.String clSubID)
MFClientBaseunsubscribeMD in class MFClientBasefeedID - -- feed idmarketID - -- market idclSubID - -- client subscription idpublic APIResult unsubscribeMD(int feedID, int marketID)
MFClientBaseunsubscribeMD in class MFClientBasefeedID - -- the feed idmarketID - -- the market idpublic APIResult unsubscribeOF(int feedID, java.lang.String clSubID)
MFClientBaseunsubscribeOF in class MFClientBasefeedID - -- the feed idclSubID - -- the client subscription idpublic APIResult unsubscribeOF(int feedID)
MFClientBaseunsubscribeOF in class MFClientBasefeedID - -- the feed idpublic APIResult unsubscribeAll()
MFClientBaseunsubscribeAll in class MFClientBasepublic Pair<APIResult,java.lang.Integer> registerMarketComb(int feedID, int[] marketIds)
MFClientBaseregisterMarketComb in class MFClientBasefeedID - -- the feed idmarketIds - -- the list of market idspublic APIResult unregisterMarketComb(int batchDefID)
MFClientBaseunregisterMarketComb in class MFClientBasebatchDefID - -- the batch idpublic APIResult requestSnapshot(int feedID, int marketID)
MFClientBaserequestSnapshot in class MFClientBasefeedID - -- the feed idmarketID - -- the market idpublic Pair<APIResult,java.lang.Long> submitOrder(java.lang.String clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, OrderType ordType, TimeInForce tif)
MFClientBasesubmitOrder in class MFClientBaseclOrdID - -- client order idfeedID - -- feed idmarketID - -- marketIDside - -- buy or sellamount - -- order sizeprice - -- pxordType - -- order typetif - -- time in forcepublic Pair<APIResult,java.lang.Long> submitOrder(java.lang.String clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, MFFloat stopPrice, MFFloat maxShowAmt, OrderType ordType, TimeInForce tif)
MFClientBasesubmitOrder in class MFClientBaseclOrdID - -- client order idfeedID - -- feed idmarketID - -- marketIDside - -- buy or sellamount - -- order sizeprice - -- pxstopPrice - -- stop pxmaxShowAmt - -- max show amountordType - -- order typetif - -- time in forcepublic Pair<APIResult,java.lang.Long> submitOrder(java.lang.String clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, MFFloat stopPrice, MFFloat maxShowAmt, MFFloat minAmount, OrderType ordType, TimeInForce tif)
MFClientBasesubmitOrder in class MFClientBaseclOrdID - -- client order idfeedID - -- feed idmarketID - -- marketIDside - -- buy or sellamount - -- order sizeprice - -- pxstopPrice - -- stop pxmaxShowAmt - -- max show amountminAmount - -- minimum amountordType - -- order typetif - -- time in forcepublic Pair<APIResult,java.lang.Long> submitOrder(java.lang.String clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, OrderType ordType, TimeInForce tif, MFClientBase.OrderArgs args)
MFClientBasesubmitOrder in class MFClientBaseclOrdID - -- client order idfeedID - -- feed idmarketID - -- marketIDside - -- buy or sellamount - -- order sizeprice - -- pxordType - -- order typetif - -- time in forceargs - -- additional order parameterspublic Pair<APIResult,java.lang.Long> submitOrder(java.lang.String clOrdID, int feedID, int marketID, Side side, MFFloat amount, MFFloat price, MFFloat stopPrice, MFFloat maxShowAmt, MFFloat minAmount, OrderType ordType, TimeInForce tif, java.lang.String modelID, java.util.ArrayList<KeyValue> parameters)
MFClientBasesubmitOrder in class MFClientBaseclOrdID - -- client order idfeedID - -- feed idmarketID - -- marketIDside - -- buy or sellamount - -- order sizeprice - -- pxstopPrice - -- stop pxmaxShowAmt - -- max show amountminAmount - -- min amountordType - -- order typetif - -- time in forcemodelID - -- modelparameters - -- additional parameterspublic Pair<APIResult,java.lang.Long> modifyOrder(java.lang.String clOrdID, java.lang.String clNewID, MFFloat amount, MFFloat minAmount, MFFloat price)
MFClientBasemodifyOrder in class MFClientBaseclOrdID - -- the client order id to be modifiedclNewID - -- the new client order idamount - -- the amountminAmount - -- the minimum amountprice - -- pxpublic APIResult cancelOrder(java.lang.String cxlID, java.lang.String clOrdID)
MFClientBasecancelOrder in class MFClientBasecxlID - -- the cancel idclOrdID - -- the client order id to be cancelledpublic APIResult cancelOrder(java.lang.String cxlID, long orderID)
MFClientBasecancelOrder in class MFClientBasecxlID - -- the cancel idorderID - -- the order idprotected APIResult cancelOrder(java.lang.String cxlID, long orderID, java.lang.String clOrdID)
MFClientBasecancelOrder in class MFClientBasepublic APIResult cancelAll(int feedID, java.lang.String cxlID)
MFClientBasecancelAll in class MFClientBasefeedID - -- the feed idcxlID - -- the cancel idpublic APIResult cancelAll(java.lang.String cxlID)
MFClientBasecancelAll in class MFClientBasecxlID - -- the cancel idprotected MFHandler getHandler()
protected void onStart(MFClientBase base)
onStart in class MFClientBaseprotected void onStop(MFClientBase base)
onStop in class MFClientBaseprotected void onDisconnect(MFClientBase base)
onDisconnect in class MFClientBaseprotected void onConnect(MFClientBase base)
onConnect in class MFClientBaseprotected void onHeartbeat(Heartbeat msg, MFClientBase base)
onHeartbeat in class MFClientBaseprotected void onSubscriptionEvent(SubscriptionEvent msg, MFClientBase base)
onSubscriptionEvent in class MFClientBaseprotected void onMarketData(MarketView msg, MFClientBase base)
onMarketData in class MFClientBaseprotected void onEventReport(EventReport msg, MFClientBase base)
onEventReport in class MFClientBaseprotected void onDateRollover(DateRollover msg, MFClientBase base)
onDateRollover in class MFClientBaseprotected void onBatchComplete(int msg,
MFClientBase base)
onBatchComplete in class MFClientBaseprotected void onOrderReceived(OrderReceived msg, MFClientBase base)
onOrderReceived in class MFClientBaseprotected void onOrderRejected(OrderRejected msg, MFClientBase base)
onOrderRejected in class MFClientBaseprotected void onOrderSubmitted(OrderSubmitted msg, MFClientBase base)
onOrderSubmitted in class MFClientBaseprotected void onOrderCanceled(OrderCanceled msg, MFClientBase base)
onOrderCanceled in class MFClientBaseprotected void onOrderCancelRejected(OrderCancelRejected msg, MFClientBase base)
onOrderCancelRejected in class MFClientBaseprotected void onTradeCapture(TradeCapture msg, MFClientBase base)
onTradeCapture in class MFClientBaseprotected void onOrderDone(OrderDone msg, MFClientBase base)
onOrderDone in class MFClientBaseprotected void onDropCopy(DropCopy msg, MFClientBase base)
onDropCopy in class MFClientBaseprotected void onReplayDone(ReplayDone msg, MFClientBase base)
onReplayDone in class MFClientBase