2018
API - Quick Start Guide
API - QUICK START GUIDE
FUNDAMENTAL INTERACTIONS ON 3.15.2018
FUNDAMENTAL INTERACTIONS INC. | 127 26th St. Suite 903 New York, NY 10001
TABLE OF CONTENTS
Overview
3
Neutron Trading Appliance Modules
3
Overview
3
Architecture
3
Data Types
4
Base Class
4
Transactional Messages
4
Subscription Messages
4
Library Download
4
Symbology
4
Equities
5
Suffix
5
Options
6
Futures
6
Foreign Exchange
6
API sample usage explanation
6
Log In Request
6
In C++:
6
In C#:
6
In Java:
7
Data Marshal
7
In C++:
7
In C#:
7
In Java:
7
Data Unmarshal
7
In C++:
8
In C#:
9
In Java:
11
Message Processing
13
Market Data NBBO and Book Data
13
In C++:
13
In C#:
13
In Java:
14
NANO EXCHANGE | API - QUICK START GUIDE
Order and Trade Updates
14
In C++:
14
In C#:
15
In Java:
15
Order Actions
16
In C++:
16
In C#:
17
In Java:
17
FIN Native Messages
17
Logon
18
Market Data
19
BBODATA
19
LastSaleData
22
SimpleLastSaleData
22
History Market data
23
Order Actions
24
OrderData
26
Trade Updates
27
TradeData
27
Cancel/Replace Orders
28
Examples of API Message Flow
28
Order Types
29
Multileg Orders
31
Example of Order Entry for Multileg
31
Example of Order Cancel for Multileg
31
Example of Order Replace for Multileg
32
P&L Transaction Data
32
Management of Pre-trade Risk Controls
33
Risk Management Fields Description
33
Risk Management Notification of Rejects
34
Unlisted Securities Trade Negotiation
35
Order Action/Order Update
35
Directed Order Message
36
Automatic Cancel Functionality
39
RODM Executes the Order
40
NANO EXCHANGE | API - QUICK START GUIDE
OVERVIEW
Fundamental Interactions delivers a comprehensive trading infrastructure appliance.
The Trading Appliance offers flexible deployment and it can be installed in any data center, co-located, and as a service
bureau. Easy to integrate with a flexible API (C++, JAVA, C# ) for order management & market data, and FIX for order
routing. It offers an easy administration console for gray box monitoring of trading activity and the system processes.
The Neutron Trading Appliance includes the following components.
Market Data Ticker Plant
Order Management
FIX Engine
Pre-trade Risk Controls
Order Crossing
Algorithmic Engine
NEUTRON TRADING APPLIANCE MODULES
The FIN trading appliance is a portable, high performance trading system that can be quickly deployed in any data center as
a stand-alone solution. It offers a core set of ultra-low latency business functions, including a market data ticker plant and
advanced order routing components. The product is widely deployed across the US as an infrastructure backend for
brokers, proprietary trading firms and hedge funds for equities, options futures trading, and FX.
OVERVIEW
Fundamental Interactions Neutron (FIN) offers native message API to its customers for fast and easy integration. Clients can
choose between C++, C# and Java API for ultra-low latency connections and market data.
Client applications, which can be desktop or black box based, will communicate with Neutron servers using different types
of messages. These messages are made available through the API layer.
FIN native API messages are backward and forward compatible. New messages and new fields can be added to the API but
existing messages and fields will never change so users of previous API versions will not be affected when new versions are
released. If a user wants to access to new messages or fields, they can simply download a new library.
Most of Neutron native messages and related fields are self-explanatory. They will not be listed here. Questions can be
directed to FI support email: support@fundamentalinteractions.com
The following is a condensed version of the FIN Native API document.
ARCHITECTURE
FIN native message API is composed of logical messages. These messages are used to pass information between FIN
servers and the client application via TCP. Each message is represented as a data structure. FIN API provides utility to
marshal those messages into binary streams for network transmission, or to un-marshal data from the binary streams
received.
FIN servers always run in redundant mode. For each module in FIN, there is always a backup module running in standby
mode beside primary module.
NANO EXCHANGE | API - QUICK START GUIDE
Upon setup, the client will receive a primary logon address and a secondary logon address along with login credentials. As
an operating practice, the client should always try to connect to primary address first, and attempt the secondary address if
not successful, using round robin between the two addresses until successful login is accomplished.
DATA TYPES
The hierarchy of FIN native messages is illustrated in the following diagram
ExternalMsg
(Abstract)
ExternalTranMsg
ExternalDataMsg
(Abstract)
(Abstract)
GlobalMsgSubscribe
GlobalMsgOrderAction
GlobalMsgLogon
GlobalMsgNBBOUpdate
GlobalMsgBookUpdate
GlobalMsgOrderUpdate
BASE CLASS
The base class is ExternalMsg, from which all other classes are derived. From there, messages are divided into two
categories, transactional messages (ExternalTranMsg) and subscription messages (ExternalDataMsg).
TRANSACTIONAL MESSAGES
Transactional messages generally have a one to one relationship. The client sends out one request and expects one
response. In the example of order entry, the client sends out an order entry request and will receive an order entry
response. The response will carry success or failure information.
SUBSCRIPTION MESSAGES
Subscription messages allow subscription to continuous message updates, such as NBBO, book, orders/trades, etc. The
client can use GlobalMsgSubscribe to send out requests for subscription and will then receive continuous updates for
corresponding messages. If the client wishes discontinue updates, a GlobalMsgUnsubscribe message can be sent and the
corresponding updates will stop.
LIBRARY DOWNLOAD
The message libraries are available at ftp.virtualcrossingengine.com, user anonymous@virtualcrossingengine.com, you
need to have a sftp capable client application such as filezilla to access the ftp site.
SYMBOLOGY
NANO EXCHANGE | API - QUICK START GUIDE
EQUITIES
For equity, FIN uses CMS symbology format and there is a space between root symbol and suffix. For example, for security
ZZZ, in security field, the client sets:
ZZZ
For security ZZZ Preferred A, in the security field, the client sets:
ZZZ PRA
SUFFIX
Security
CMS Suffix
BATS Suffix
Categorization
Preferred
PR
-
Preferred Class “
”*
PRA
-A
Preferred Class “B”*
PRB
-B
Class “
”*
A
.A
Class “B”*
B
.B
Preferred when distributed
PRWD
-$
When distributed
WD
$
Warrants
WS
+
Warrants Class “
”*
WSA
+A
Warrants Class “B”*
WSB
+B
Called
CL
*
Class “
” Called*
ACL
.A*
Preferred called
PRCL
-*
Preferred “
” called*
PRACL
-A*
Preferred “
” when issued*
PRAWI
-A#
Emerging Company Marketplace
EC
!
Partial Paid
PP
@
Convertible
CV
%
Convertible called
CVCL
%*
Class Convertible
ACV
.A%
Preferred (class A) Convertible
PRACV
-A%
Preferred (class A) when Distributed
PRAWD
-A$
Rights
RT
^
Units
U
=
When issued
WI
#
Rights when issued
RTWI
^#
Preferred when issued
PRWI
-#
NANO EXCHANGE | API - QUICK START GUIDE
Class "A" when issued*
AWI
.A#
Warrrant when issued
WSWI
+#
TEST symbol
TEST
~
OPTIONS
For options, FIN uses explicit option symbology. For example, the ZZZ October 22nd 2010 call option for strike price of $220,
the client sets the following in the security field:
ZZZ 20101022C 220.000
Notice that there are always three decimal points in the strike price. If strike price is 220.5, it is be formatted as 220.500
FUTURES
For Futures and options on futures we use the Exchange Symbol with MaturityMonthYear, Strike Price and PutOrCall clearly
identifying the full parameters of the contract.
FOREIGN EXCHANGE
FX symobology is the ISO standard, like “EUR/USD”, “GBP/USD”
Canada Exchanges
Symbol:COUNTRYCODE
Example like RIM:CA for Canada’s RIM.
If you don’t specify anything country code, default is US, which is what we currently have.
API SAMPLE USAGE EXPLANATION
Starting with a simple example, assume the client wants to connect to FIN to subscribe for the NBBO, book feed and then
to send out an order. For this example the TCP network details will be skipped in order to focus on the message API.
LOG IN REQUEST
After the TCP socket connection is established a logon request must be sent. First, for the creation of the logon message:
IN C++:
msggen::GlobalMsgLogon logon;
logon.init();
logon.header.firm = firm;
logon.data.userId = userid;
logon.data.version = msggen::Const_msggen::BuildTag;
logon.data.heartbeatInterval = 60;
IN C#:
NANO EXCHANGE | API - QUICK START GUIDE
GlobalMsgLogon logon = new GlobalMsgLogon();
logon.init();
logon.header.firm = firm;
logon.data.userId = userid;
logon.data.version = Const_msggen.BuildTag;
logon.data.heartbeatInterval = 60;
IN JAVA:
msggen.GlobalMsgLogon logon = new msggen.GlobalMsgLogon();
logon.init();
logon.header.firm = firm;
logon.data.userId = userid;
logon.data.version = msggen.Const_msggen.BuildTag;
logon.data.heartbeatInterval = 60;
DATA MARSHAL
Next, the message must be composed into the binary stream for transmission.
IN C++:
This function is called:
static int msggen::ExternalMsgFactory::compose (msggen::ExternalMsg *msg, char* buffer, int startPos);
Outbound messages from the client to the server are generally small, but client should make sure the buffer passed has
enough room for the binary stream output - benchmark to a minimum of 30k.
IN C#:
int msggen.ExternalMsgFactory.compose (msggen.ExternalMsg msg, byte[] buffer, int startPos);
Outbound messages from the client to the server are generally small, but client should make sure the buffer passed has
enough room for the binary stream output - benchmark to a minimum of 30k.
IN JAVA:
public static int msggen.MSGGENFactory.compose (msggen.ExternalMsg msg, msggen.BByteBuffer buffer);
BByteBuffer automatically increases its buffer if there is not enough room.
Then, the client can get the byte[] array from buffer through its buffer field and the length by its getLimit()
member function after the flip() member function is called.
DATA UNMARSHAL
NANO EXCHANGE | API - QUICK START GUIDE
After the client application sends a logon message to the server, FIN validates the logon and returns the logon response. In
the client application, there is generally a loop to decompose the messages that it receives from the socket, examples are
listed below.
The message size from the FIN server to the client varies dramatically depending on what is subscribed for. For example,
one GlobalMsgBookUpdate message may contain a few thousand BookData records. Therefore FIN recommends minimum
receiving buffer size as 2M.
IN C++:
Here is sample program’s loop:
short receiveMsg (std::vector<msggen::ExternalMsg*> &list)
{
int length = 0;
int outEndPos;
int output = recv (sock, readBuffer+ currentReadPos+bytesRemainRead, BUFSIZE, 0);
if (output < 0)
return -1;
bool continueProcessing = true;
bytesRemainRead += output;
try
{
while (continueProcessing)
{
int msgLen = msggen::ExternalMsgFactory::getMsgLen (readBuffer, currentReadPos,
bytesRemainRead);
if (msgLen <= 0 || msgLen > bytesRemainRead)
{
if (currentReadPos > 0 && bytesRemainRead > 0)
{
memmove (readBuffer, readBuffer+currentReadPos, bytesRemainRead);
}
currentReadPos = 0;
return 0;
}
msggen::ExternalMsg* result = msggen::ExternalMsgFactory::decompose (readBuffer,
currentReadPos, outEndPos);
if (result != NULL)
list.push_back(result);
NANO EXCHANGE | API - QUICK START GUIDE
currentReadPos = outEndPos;
bytesRemainRead -= msgLen;
}
}
catch (msggen::MsgException e)
{
std::cerr <<"exception "<<e.getError() << std::endl;
return -1;
}
return 0;
}
Overriding the global object allocator:
In the C++ library we have the following function:
a function ExternalMsg* ExternalMsgFactory:: decomposeMsg (ClientAllocator *allocator,char* buffer, int
startPos, int &endPos) throw(MsgException);
A client should override allocatMessage function to return the cached instances.
If the client pass NULL for ClientAllocator in ExternalMsgFactory::decomposeMessage or allocateMessage return NULL,
then FIN library will create its own instance and return it.
Where a client can pass a pointer to an ClientAllocator object.
Below is the base Client Allocator:
class ClientAllocator
{
public:
ClientAllocator(){}
virtual ~ClientAllocator(){}
virtual ExternalMsg* allocatMessage (GlobalMsgType msgType)
{
return NULL;
}
};
IN C#:
NANO EXCHANGE | API - QUICK START GUIDE
Here is sample program’s loop:
{
int length = 0;
int outEndPos;
int output = s.Receive (readBuffer,currentReadPos,MAX_BUFFER_SIZE-currentReadPos,0);
if (output <= 0)
return -1;
totalBytes += output;
currentReadPos += output;
while (currentReadPos - currentDecompPos > 5)
{
ExternalMsg.getInt(out length, readBuffer, currentDecompPos + 1);
if (length == 0)
throw new MsgException(MsgException.MSG_ERROR_SOCKET_STX, "NO Length");
if (currentReadPos - currentDecompPos < length)
break;
B ExternalMsg msg = msggen.ExternalMsgFactory.decompose(readBuffer, currentDecompPos, out
outEndPos);
currentDecompPos = outEndPos;
if (msg != null)
list.Add(msg);
}
if (currentDecompPos == currentReadPos)
{
currentDecompPos = currentReadPos = 0;
}
else
{
if (currentDecompPos > readBuffer.Length / 2)
NANO EXCHANGE | API - QUICK START GUIDE
{
Array.Copy(readBuffer, currentDecompPos, readBuffer, 0, currentReadPos - currentDecompPos);
currentReadPos -= currentDecompPos;
currentDecompPos = 0;
}
if (length + currentReadPos - currentDecompPos > readBuffer.Length)
{
byte[] oldBuf = readBuffer;
readBuffer = new byte[length + currentReadPos - currentDecompPos];
Array.Copy(oldBuf, currentDecompPos, readBuffer, 0, currentReadPos - currentDecompPos);
currentReadPos -= currentDecompPos;
currentDecompPos = 0;
}
}
return 0;
}
}
IN JAVA:
Here is sample program’s loop:
public short ReceiveMsg (ArrayList<ExternalMsg> list) throws MsgException
{
int length = 0;
int output;
try
{
readBuffer.clear();
output = s.read (readBuffer);
readBuffer.flip();
NANO EXCHANGE | API - QUICK START GUIDE
}
catch (Exception e)
{
output = -1;
}
if (output <= 0)
return -1;
totalBytes += output;
readBuffer.get(myReadBuffer.buffer, myReadBuffer.getLimit(), output);
myReadBuffer.setLimit(myReadBuffer.getLimit()+output);
while (myReadBuffer.remaining() > 5)
{
length = MSGGENFactory.getLen(myReadBuffer.buffer, myReadBuffer.position());
int finalPos = length + myReadBuffer.position();
if (length == 0)
throw new MsgException(MsgException.MSG_ERROR_SOCKET_STX, "NO Length");
if (myReadBuffer.remaining() < length)
break;
ExternalMsg msg = MSGGENFactory.decompose(myReadBuffer);
if (msg != null)
list.add(msg);
myReadBuffer.position(finalPos);
}
if (myReadBuffer.remaining() == 0)
{
myReadBuffer.clear();
myReadBuffer.setLimit(0);
}
return 0;
NANO EXCHANGE | API - QUICK START GUIDE
}
Once the application receives the list of ExternalMsg, each corresponding message is processed (by calling ExternalMsg’s
member function getMessageType()).
MESSAGE PROCESSING
MARKET DATA NBBO AND BOOK DATA
After login, the client is ready to send in Subscription for NBBO, BookData. Since the intention is to send out orders, the
client subscribes for OrderUpdate and TradeUpdate for order status.
To subscribe for NBBO and BookUpdate:
IN C++:
msggen::GlobalMsgSubscribe subMsg;
subMsg.init();
msggen::SubscriptionData *subData = new msggen::SubscriptionData();
subData->init();
subData->msgType = msggen::GlobalMsgTypeNBBOUpdate;
subData->security = symbolList[i];
subMsg.data.push_back(subData);
subData = new msggen::SubscriptionData();
subData->init();
subData->msgType = msggen::GlobalMsgTypeBookUpdate;
msggen::BaseMsg::setFlag (subData->bookflags, msggen::GlobalBookDestinationALL);
subData->security = symbolList[i];
subMsg.data.push_back(subData);
IN C#:
GlobalMsgSubscribe subMsg = new GlobalMsgSubscribe();
subMsg.init();
SubscriptionData subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.NBBOUpdate;
subData.security = (string)symbolList[i];
subMsg.data.Add(subData);
subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.BookUpdate;
NANO EXCHANGE | API - QUICK START GUIDE
BaseMsg.setFlag (ref subData.bookflags, (int)GlobalBookDestination.ALL);
subData.security = (string)symbolList[i];
subMsg.data.Add(subData);
IN JAVA:
GlobalMsgSubscribe subMsg = new GlobalMsgSubscribe();
subMsg.init();
SubscriptionData subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.NBBOUpdate;
subData.security = symbolList.get(i);
subMsg.data.add(subData);
subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.BookUpdate;
subData.bookflags = BaseMsg.setFlag (subData.bookflags, (int)GlobalBookDestination.ALL);
subData.security = symbolList.get(i);
subMsg.data.add(subData);
For NBBO subscription, the client will get continuous messages using GlobalMsgNBBOUpdate, for book subscription, the
client will get continuous messages using GlobalMsgBookUpdate.
ORDER AND TRADE UPDATES
To subscribe for Order/Trade updates:
IN C++:
msggen::GlobalMsgSubscribe subMsg;
subMsg.init();
msggen::SubscriptionData *subData = new msggen::SubscriptionData();
subData->init();
subData->msgType = msggen::GlobalMsgTypeOrderUpdate;
subData->security = msggen::Const_msggen::GlobalWildCard;
subData->firm = logonResp->data.userData.firm;
subData->trader = logonResp->data.userData.trader;
subData->fromTime = 1; //all orders
subMsg.data.push_back(subData);
subData = new msggen::SubscriptionData();
NANO EXCHANGE | API - QUICK START GUIDE
subData->init();
subData->msgType = msggen::GlobalMsgTypeTradeUpdate;
subData->security = msggen::Const_msggen::GlobalWildCard;
subData->firm = logonResp->data.userData.firm;
subData->trader = logonResp->data.userData.trader;
subData->fromTime = 1; //all trades
subMsg.data.push_back(subData);
IN C#:
GlobalMsgSubscribe subMsg = new GlobalMsgSubscribe();
subMsg.init();
SubscriptionData subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.OrderUpdate;
subData.security = Const_msggen.GlobalWildCard;
subData.firm = logonResp.data.userData.firm;
subData.trader = logonResp.data.userData.trader;
subData.fromTime = 1; //all orders
subMsg.data.Add(subData);
subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.TradeUpdate;
subData.security = Const_msggen.GlobalWildCard;
subData.firm = logonResp.data.userData.firm;
subData.trader = logonResp.data.userData.trader;
subData.fromTime = 1; //all trades
subMsg.data.Add(subData);
IN JAVA:
GlobalMsgSubscribe subMsg = new GlobalMsgSubscribe();
subMsg.init();
SubscriptionData subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.OrderUpdate;
subData.security = Const_msggen.GlobalWildCard;
subData.firm = logonResp.data.userData.firm;
NANO EXCHANGE | API - QUICK START GUIDE
subData.trader = logonResp.data.userData.trader;
subData.fromTime = 1; //all orders
subMsg.data.add(subData);
subData = new SubscriptionData();
subData.init();
subData.msgType = GlobalMsgType.TradeUpdate;
subData.security = Const_msggen.GlobalWildCard;
subData.firm = logonResp.data.userData.firm;
subData.trader = logonResp.data.userData.trader;
subData.fromTime = 1; //all trades
subMsg.data.add(subData);
Please note that the field trader comes from the logon response message. The above subscription gives all parent/child
orders updates. Parent orders represent the order view from the client side perspective. Every time the client sends in a
valid order entry, FIN will create one parent order. The child order represents the order view from the perspective of FIN’s
internal activities. For certain order types such as the smart router and algo order, FIN may create many child orders
corresponding to the parent order. If the client wishes to receive parent orders only, the SubscriptionData’s member field
rootOnly option can be set to ‘Y’.
The client will receive GlobalMsgOrderUpdate for OrderSubscription and GlobalMsgTradeUpdate for TradeSubscription
ORDER ACTIONS
Next, to send out an order:
IN C++:
msggen::GlobalMsgOrderAction *actionMsg = new msggen::GlobalMsgOrderAction;
actionMsg->init();
actionMsg->header.dest = msggen::GlobalDestinationSTAGE;
actionMsg->data.actionType = msggen::GlobalOrderActionEntry;
actionMsg->data.side = bors;
actionMsg->data.quantity = qty;
actionMsg->data.security = symbol;
actionMsg->data.price = price;
if (price == 0)
actionMsg->data.orderType = msggen::GlobalOrderTypeMarket;
actionMsg->data.category = dest;
actionMsg->data.tif = tif;
NANO EXCHANGE | API - QUICK START GUIDE
IN C#:
GlobalMsgOrderAction actionMsg = new GlobalMsgOrderAction();
actionMsg.init();
actionMsg.header.dest = GlobalDestination.STAGE;
actionMsg.data.actionType = GlobalOrderAction.Entry;
actionMsg.data.side = bors;
actionMsg.data.quantity = qty;
actionMsg.data.security = symbol;
actionMsg.data.price = price;
if (price == 0)
actionMsg.data.orderType = GlobalOrderType.Market;
actionMsg.data.category = dest;
actionMsg.data.tif = tif;
IN JAVA:
GlobalMsgOrderAction actionMsg = new GlobalMsgOrderAction();
actionMsg.init();
actionMsg.header.dest = GlobalDestination.STAGE;
actionMsg.data.actionType = GlobalOrderAction.Entry;
actionMsg.data.side = bors;
actionMsg.data.quantity = qty;
actionMsg.data.security = symbol;
actionMsg.data.price = price;
if (price == 0)
actionMsg.data.orderType = GlobalOrderType.Market;
actionMsg.data.category = dest;
actionMsg.data.tif = tif;
Once the FIN server receives the order entry, the client receives order updates from the subscription regarding the order.
For any trade that occurs, the client receives corresponding trade updates.
Please compile the sample program with corresponding library, and connect to FIN server for quote/order information.
FIN NATIVE MESSAGES
FIN native API messages are backward and forward compatible. New messages and new fields can be added to the API but
existing messages and fields will never change so users of previous API versions are not be affected by new changes. If a
user wants to access to new messages or fields, they can simply download a new library.
NANO EXCHANGE | API - QUICK START GUIDE
The following are some commonly used messages. This is intended to be a brief introductory document, therefore (even
for those commonly used messages) only some basic fields and functionality will be listed here.
BaseMsg: provides utility functions for field validation
boolean isFieldValid()
This class contains utility functions such as BaseMsg.isFieldValid, which can be used to check whether a field contains any
valid value before using it
ExternalMsg: base class for all messages, abstract
getMessageType (); //returns the message type (GlobalMsgType) of the underlying message,
ExternalTranMsg: base class for all transaction messages, abstract
All ExternalTranMsg has a field header of GlobalMsgTranHeader, containing the following fields:
public int tranId;
public GlobalResult tranResponse;
public String errorDetails;
The client should always receive a response to the request. If the transaction request is successful, tranResponse will be
GlobalResult.SUCCESS, otherwise, tranResponse will be GlobalResult.FAILURE and errorDetails is likely to contain some
level of explanation for the failure. This field should always be checked first before processing transaction response.
If tranId is set to a certain value, the response message will also carry that value. It helps to match the original request.
ExternalDataMsg: is a base class for all transaction messages, abstract
All ExternalDataMsg have a field header of GlobalMsgDataHeader, containing the following fields:
public int subId;
subId carries the subId value in SubscriptionData when the corresponding subscription is set to message. This will help to
match up the original subscription.
LOGON
GlobalMsgLogon extends ExternalTranMsg
Logon msg is the first msg required to send to the server once a connection is established. At minimum, the firm and user
id in the logon request (see example) should be provided.
Additionally a few parameters can be set in Logon data
HeartbeatInterval, in seconds, set this field if you want server to send you heartbeat.
AggregateTime, in milliseconds, set this field if you want server to send you an update NBBO and book feed for
that time period instead of each tick update. Maximum is 10 seconds.
NANO EXCHANGE | API - QUICK START GUIDE
ThresholdLevel, num of Level 2 data that you want to receive, only apply to BookUpdate subscription.
GlobalMsgSubscribe extends ExternalTranMsg
GlobalMsgUnsubscribe extends ExternalTranMsg
MARKET DATA
Both GlobalMsgSubscribe and GlobalMsgUnsubscribe contain a list of SubscriptionData objects. Each SubscriptionData
contain a subscription (or unsubscription) request.
To subscribe, use the GlobalMsgSubscribe.
To unsubscribe, use GlobalMsgUnsubscribe and pass the same parameters that are set in GlobalMsgSubscribe.
GlobalMsgNBBOUpdate extends ExternalDataMsg
It contains NBBOData information; here are some of NBBOData fields
Field
Req’d
Type
Security
Y
String
BidPrice
Y
Double
BidSize
Y
Int
AskPrice
Y
Double
AskSize
Y
Int
Status
Y
GlobalQuoteStatus
SeqNum
Y
Int
ExchangeTime
Y
Int
RegSHOInd
Y
Char
Field status indicates the status of Quote. If everything is normal, it will have Normal status. If quote is closed, it will have
closed status.
To subscribe, set SubscriptionData.msgType = GlobalMsgType.NBBOUpdate, and security field to corresponding symbol.
GlobalMsgBookUpdate extends ExternalDataMsg
It contains a list of BBOData, here are some of BBOData fields
BBODATA
Field
Req’d
Type
Side
Y
Char
NANO EXCHANGE | API - QUICK START GUIDE
Security
Y
String
Booksource
Y
Globalbookdestination
MarketMaker
Y
String
Price
Y
Double
Status
Y
Globalbookstatus
Keystr
Y
String
ID
Y
Long
Bookqty
Y
Int
Seqnum
Y
Long
ExchangeTime
Y
Int
Field Status - Field status indicates the meaning of the message.
Add - indicates that a new entry has been created. Update indicates an update to an existing entry. Remove indicates that
the entry no longer exists.
Complete indicates the completion of the initial snapshot transmission. The data itself does not carry any book entry.
RemoveAll indicates failure of certain book feed, client should remove book entries for that corresponding feed (as
indicated in bookSource field). Also, both keyStr and id field can be used as key to search for previous entry. Both are
guaranteed to be unique within symbol subscription.
To subscribe - set SubscriptionData.msgType = GlobalMsgType.BookUpdate, and security field to corresponding symbol.
You can subscribe for all servers’ available book feeds by setting ALL flag in SubscriptionData.bookFlag field,
BaseMsg.setFlag (ref subData.bookflags, (int)GlobalBookDestination.ALL);
Or you can specify individual feeds
BaseMsg.setFlag (ref subData.bookflags, (int)(GlobalBookDestination.BBO|
GlobalBookDestination.INET|
GlobalBookDestination.NYSE));
GlobalMsgLastSaleUpdate extends ExternalDataMsg
GlobalMsgSimpleLastSaleUpdate extends ExternalDataMsg
Both GlobalMsgLastSaleUpdate and GlobalMsgSimpleLastSaleUpdate carry LastSale information. The difference is if the
last sale is simple enough, such as there is no new high/low/open/closing, GlobalMsgSimpleLastSaleUpdate is used.
Otherwise, GlobalMsgLastSaleUpdate will be used.
Indictor and additional Indicators are sale conditions for the trades. They are corresponding SIP/SIAC value. lastExchange
field indicate which exchange the trade happened.
Here is exchange code
NANO EXCHANGE | API - QUICK START GUIDE
switch (v)
{
case 'A':
return AMEX_String;
case 'B':
return BOSX_String;
case 'W':
return CBOE_String;
case 'C':
return CINN_String;
case 'D':
return FNRA_String;
case 'M':
return MWSE_String;
case 'N':
return NYSE_String;
case 'X':
return PHLX_String;
case 'P':
return ARCA_String;
case 'I':
return ISEX_String;
case 'T':
return NASD_String;
case 'Z':
return BATS_String;
case 'Y':
return BATY_String;
case 'J':
return EDGA_String;
case 'K':
return EDGX_String;
}
GlobalMsgLastSale status update
NANO EXCHANGE | API - QUICK START GUIDE
If there is cancel/correction, it will be in GlobalMsgLastSale with the following status: Normal, Cancel, Restate, Prior Trade,
Prior Cancel, and Prior Restate.
Definitions:
PriorTrade/PriorCancel/PriorRestate is either a missed reported
Trade/cancel/correct that happens on a prior day (priorDate and priorTime fields indicate when refereed trade
happens)
Cancel/Restate is on a cancel/correct on today’s trade (priorTime field indicate when referred trade happens)
SubscriptionCompleteUpdate message
When a client subscribes to the wildcard, and it is used with OrderUpdate and TradeUpdate subscription, it is used to
inform you that you have received all of the cache data.
To subscribe, set SubscriptionData.msgType = GlobalMsgType.LastSaleUpdate, and security field to corresponding symbol.
First message that arrives should be GlobalMsgLastSaleUpdate as it carries as much info as possible, then depending on
data contents, you may receive either SimpleLastSaleUpdate or LastSaleUpdate.
LASTSALEDATA
Field
Req’d
Type
Security
Y
String
Price
Y
double
Quantity
Y
Int
Status
Y
Enum, Open,Cancel,Correct
TradeThroughExempt
N
Char
SaleDays
N
GlobalQuoteStatus
SeqNum
Y
Int
ExchangeTime
Y
Int
TotalVolume
Y
Long (64 bits)
HighPrice
N
Double
LowPrice
N
Double
OpenPrice
N
Double
PrevClosePrice
Y
Double
ClosingPrice
N
Double,
ExchangeTime
Y
Int
LastExchange
Y
Char
SIMPLELASTSALEDATA
NANO EXCHANGE | API - QUICK START GUIDE
Field
Req’d
Type
Security
Y
String
Price
Y
Double
Quantity
Y
Int
Status
Y
Enum, Open,Cancel,Correct
TradeThroughExempt
N
Char
SaleDays
N
GlobalQuoteStatus
SeqNum
Y
Int
ExchangeTime
Y
Int
TotalVolume
Y
Long (64 bits)
ExchangeTime
Y
Int
LastExchange
Y
Char
HISTORY MARKET DATA
GlobalMsgLastSaleMinuteQuery extends ExternalTranMsg
Use this message to query for last sale minute summary for the security. You must provide security field in data sub
structure. If you want to query previous day’s data set date field in format of “MM/DD/YY”. You can use
beginTime/endTime field to set the filter for your result.
BeginTime/endTime specifies milliseconds since midnight.
o For example, if you only want data after 9:30AM, set beginTime to 93000000.
o If successful, result carries a list of LastSaleMinuteSummaryData.
For each record, it carries info such as high/low/number of trades/total share in that minute.
Field exchangeStartTime indicates the milliseconds since. Its format is HHMMSS000, indicating number milliseconds since
midnight. If the data is for minute of 12:15, exchangeStartTime will have value 121500000.
GlobalMsgNBBOMinuteQuery extends ExternalTranMsg
Use this message to query for NBBO minute summary for the security. You must provide security field in data sub
structure. If you want to query previous day’s data set date field in format of “MM/DD/YY”. You can use
beginTime/endTime field to set the filter for your result.
BeginTime/endTime specifies milliseconds since midnight.
o For example, if you only want data after 9:30AM, set beginTime to 93000000.
o If successful, result carries a list of LastSaleMinuteSummaryData.
For each record, it carries info such as high/low price and size of bid and ask in that minute.
Field exchangeStartTime indicate the millisecond since midnight. Its format is HHMMSS000, indicating number milliseconds
since midnight.
If the data is for minute of 12:15, exchangeStartTime will have value 121500000.
NANO EXCHANGE | API - QUICK START GUIDE
GlobalMsgLastNBBOSecondQuery extends ExternalTranMsg
User this message to query for NBBO/Lastsale second snapshot
You must provide security and date field in data sub structure. The date field is an integer field; its expected format is
YYMMDD.
For example, if you want to search for info in Nov 3rd, 2010, date field should be set to 101103.
You can use beginTime/endTime field to set the filter for your result.
BeginTime/endTime specifies milliseconds since midnight.
o For example, if you only want data after 9:30:01AM, set beginTime to 93000100.
You can use data.filter field to selectively retrieve the second (0-59, inclusive) data that you interested, such as “0,5,10,30”
means you want to retrieve 0th,5th, 10th and 30th second data only.
If successful, result carries a list of LastNBBOSecondData.
For each record, it carries info such as bid/ask/lastPrice/cumQty of that second. cumQty is the total trade qty since
opening. Field exchangeStartTime indicate the millisecond since midnight. Its format is HHMMSS000, indicating number
milliseconds since midnight. If the data is for minute of 12:15, exchangeStartTime will have value 121500000.
Request example of a Last Minute Query
msgType=LastSaleMinuteQuery|tranId=10|lifeTime=30|security=AA|data=0|
Response example of a Last Minute Query
msgType=LastSaleMinuteQuery|firm=ROOT|dest=NYSEALS|tranId=10|globalID=2276|lifeTime=30|flags=4|type=
DefClient|tranResponse=SUCCESS|security=AA|data=350|data[0]=[security=AA|exchangeStartTime=70000000|hi
ghPrice=9.75|lowPrice=9.75|volume=1200|numOfTrades=3|lastPrice=9.75|amount=11700.075||]data[1]=[securi
ty=AA|exchangeStartTime=70500000|highPrice=9.78|lowPrice=9.78|volume=100|numOfTrades=1|lastPrice=9.7
8|amount=978.0|]data[2]=[security=AA|exchan0|geStartTime=70900000|highPrice=9.79|lowPrice=9.79|volume
=200|numOfTrades=1|lastPrice=9.79|amount=1958.0|]data[3]=[security=AA|exchangeStartTime=71000000|high
Pri9|ce=9.79|lowPrice=9.79|volume=1000|numOfTrades=1|lastPrice=9.79|amount=9790.0|]data[4]=[security=A
A|exchangeStartTime=71200000|highPrice=9.75|lowPrice=9.75|volume=400|numOfTrades=1|lastPrice=9.75|am
ount=3900.0|]data[5]=[security=AA|exchangeStartTime=74300000|highPrice=9.76|lowPrice=9.76|volume=100|n
umOfTrades=1|lastPrice=9.76|amount=976.0|]data[6]=[security=AA|exchangeStartTime=74800000|highPrice=9.
76|lowPrice=9.76|volume=3500|numOfTrades=1|lastPrice=9.76|amount=34160.0|]data[7]=[security=AA|exchan
geStartTime=74900000|highPrice=9.76|lowPrice=9.76|volume=16400|numOfTrades=14|lastPrice=9.76|amount=
160064.0|]data[8]=[security=AA|exchangeStartTime=75400000|highPrice=9.78|lowPrice=9.78|volume=500|num
OfTrades=2|lastPrice=9.78|amount=4890.0|]data[9]=[security=AA|exchangeStartTime=75600000|highPrice=9.77
|l:
ORDER ACTIONS
GlobalMsgOrderAction extends ExternalTranMsg
NANO EXCHANGE | API - QUICK START GUIDE
ActionType, required, enum, GlobalOrderAction.Entry for new order entry request, GlobalOrderAction.Cancel for order
cancel, GlobalOrderAction.Replace for order correction.
Side, required, char, ‘B’ for buy order, ‘S’ for sell order.
ShortSaleFlag, optional, enum, GlobalShortSaleFlag.ShortSale for short sale, GlobalShortSaleFlag.ShortSaleExempt
for short sale exempt. If it is a shortsale order, you must specify the corresponding flag
Security, required, string, symbol for the instrument
InstrumentType, optional, enum, default is GlobalInstrumentType.Equity,
o For options order, set it to enum GlobalInstrumentType.Option
o For Futures order, set it to enum GlobalinstrumentType.Future
o For FX order, set it to enum GlobalinstrumentType.FX
Quantity, required,int, order quantity
Price, required, double, for entry/replace, price of order. If it is market order, set to 0.
Instruction, optional, string, this is to specify how you want to order routed out.
Marking order based upon position
If no position enforcement is to be used then API to set the following flag when sending out the order, and it will mark with
shortsale flag based on the position.
Msg.data.orderFlags2 = BaseMsg.setFlag(msg.data.orderFlags2, Const_msggen.GlobalOrderFlag2MarkShort);
Instrument Type example:
There is a field instrumentType in OrderData, which need to be set for corresponding instrument type. If not set, default
assumes it is Equities.
enum GlobalInstrumentType
{
Equities,
Options,
Futures,
FX,
};
For directed order use “SSD:” instruction set. For example, send order to INET, set instruction field to “SSD:INET”, send
order to ARCA, set instruction field to “SSD: RC
”, etc͙
If no instruction is specified, the order will be staged within FIN, and will be routed out through FIN’s smart router when
there is eligible quote.
OrderType, optional, enum
o If it is market order, set to GlobalOrderType.Market
Tif, optional, enum
o Default is GlobalTimeInForce.Day
NANO EXCHANGE | API - QUICK START GUIDE
o Additional value: IOC, Gtx, Gtt. If value is Gtt, set tifValue field the corresponding expiration time.
ExpireTime is express in milliseconds since UTC Jan 1st, 0:0:0, 1970 (similar to UNIX’s UTC time, except in
milliseconds)
ClientRef1, optional, string
o You can set a reference number for you to track your own order. It will be sent back to you in
OrderUpdate/TradeUpdate
Use this message to send order entry/cancel/replace to server.
GlobalOrderUpdate extends ExternalDataMsg
OrderUpdate contains a list of OrderData
OrderData carries information that user sends in, such as security, side, quantity, trader, userid, etc.
Category, enum, order category, such as INET/ RC
/NYSE, etc͙
Refno, string, the order reference number, uniquely assigned by FIN backend.
RootRef, string, the order reference number of root order. For parent order, rootRef is same as refno.
OrderStatus, enum, status of order, such as Pending, Open, PendingCancel, Canceled, Rejected, Executed, etc͙
LiveQty, int, the quantity that is still live.
ExecQty, int, the quantity that is executed so far.
RejectQty,int, that quantity that is not executed when order is closed.
ClientRef1, string, if customer set the clientRef1 field when sending new order, the corresponding value is passed
back here.
ORDERDATA
Field
Req’d
Type
Firm
Y
String
Security
Y
String
Category
Y
Enum, INET/ RC /B TS/ST GE,etc͙
OrderStatus
N
Enum, Open/Pending/PendingCancel,etc͙
Price
Y
Double
Quantity
Y
Int
Side
Y
Char
StopPrice
N
Double
PegType
N
Enum, Primary/Reverse/Mid,etc͙
OrderCapacity
N
Enum, Principal/ gency,etc͙
Tif
N
Enum, D Y/GTX/IOC,etc͙
Refno
Y
String
LiveQty
Y
Int
RejectQty
Y
Int
ExecQty
Y
Int
NANO EXCHANGE | API - QUICK START GUIDE
ExecQty
Y
Int
DisplayQty
Y
Int
ExecDollarAmount
Y
Double
Text
N
String
ClientRef1
N
String
Trader
Y
String
TRADE UPDATES
Subscription to Trade is very similar to Order, except you request for GlobalMsgType.TradeUpdate instead.
TradeStatus, enum, normally it is GlobalTradeStatus.
Canceled for broken trade or GlobalTradeStatus.Replaced for corrected trade.
In order to track the information the ClientRef1, string. If customer set the clientRef1 field when sending new
order, the corresponding value is passed back here.
GlobalTradeUpdate extends ExternalDataMsg
TradeUpdate contains a list of TradeData.
Category, enum, order category, such as INET/ RC
/NYSE, etc͙
Refno, string, unique identifier assigned by FIN server
OrderRef, string, corresponding order reference number, through this field, you can find corresponding order that
trade is generated from.
RootRef, string, corresponding parent order’s reference number.
ExecQty, int, the number of shares executed.
ExecPrice, double, the price of execution.
TradeStatus, enum, normally it is GlobalTradeStatus.Normal, but it can be GlobalTradeStatus.Canceled for broken trade, or
GlobalTradeStatus.Replaced for corrected trade.
ClientRef1, string. If customer set the clientRef1 field when sending new order, the corresponding value is passed back
here.
Subscription to Trade is very similar to Order, except you request for GlobalMsgType.TradeUpdate instead.
TRADEDATA
Field
Req’d
Type
Firm
Y
String
Security
Y
String
Category
Y
Enum, INET/ RC /B TS,etc͙
TradeStatus
N
Enum, Open/Cancel/Correction
ExecPrice
Y
Double
NANO EXCHANGE | API - QUICK START GUIDE
ExecQty
Y
Int
Side
Y
Char
OrderCapacity
N
Enum, Principal/ gency,etc͙
Refno
Y
String
PrevRefno
N
String, link to previous trade if cancel or correct
OrderRef
Y
String
ClientRef1
N
String
Trader
Y
String
CANCEL/REPLACE ORDERS
In order to replace an order, the following would be used actMsg.data.actionType = GlobalOrderAction.Replace. The
following need to be referenced along with the action type, security,side , refno, rootRef field from existing order. If you
need to change quantity/price, set field to new value, otherwise copy the existing info.
An example of how to set
The clientRef1 is for that purpose. In new order, you set clientRef1=A. In cancel replace, you should set clientRef1=B.
Corresponding
ClientRef1 will come back to you in OrderUpdate and TradeUpdate if you subscribe to them. You don't set it in cancel
request.
EXAMPLES OF API MESSAGE FLOW.
<== Sending Order Information Via API to Neutron
==> Neutron is sending back information There are two types of actions (a: action, u: update)
16:24:31,798 INFO SEND order <==
firm=WTSD|security=S|category=STAGE|orderType=Limit|actionType=Entry|side=B|price=1|tif=GTX|clientRef1=
1624000036|1|clientRef2=NITEFAN|clientRootId=1624000036|trader=WTS0006|clientTif=GTX|quantity=100|ins
truction=SSD:NITEEDGE|fixTags=21=1 57=ALGO 6101=FAN 6210=0
|account=24438|symbolFormat=ACT|comment=NITEFAN|
16:24:31,798 INFO RECV action ==> a:
firm=WTSD|security=S|category=STAGE|orderStatus=Open|orderType=Limit|actionDir=STAGE|actionType=Entry
|side=B|price=1|orderCapacity=Agency|tif=GTX|complexOrigin=A5|baseType=Y|refno=3NW8RD07E91DA5|hiera
rchyRef=3NW8RD07E91D|rootRef=3NW8RD07E91DA5|clientRef1=1624000036|1|clientRef2=NITEFAN|clientRoo
tId=1624000036|1|userid=WTSD|trader=WTS0006|clientTif=GTX|quantity=100|origQty=100|liveQty=100|execQ
ty=0|execDollarAmount=0|stageLiveQty=0|instruction=SSD:NITEEDGE|seqNum=1|recno=0|orderFlags=6442450
944|date=12/21/12|entered=1356125071798|updated=1356125071798|multiDayFlag=N|fixTags=21=1 57=ALGO
6101=FAN 6210=0
|account=24438|buyingPowerLimit=1|symbolFormat=ACT|chainID=3NW8RD07E91DA5|comment=NITEFAN|
NANO EXCHANGE | API - QUICK START GUIDE
16:24:31,798 INFO RECV update ==> u:
firm=WTSD|security=S|exchange=NYSE|category=STAGE|orderStatus=Open|orderType=Limit|actionDir=STAGE|a
ctionType=Entry|side=B|price=1|orderCapacity=Agency|tif=GTT|tifValue=1356145202876|complexOrigin=A5|ba
seType=Y|refno=3NW8RD07E91DA5|hierarchyRef=3NW8RD07E91D|rootRef=3NW8RD07E91DA5|clientRef1=162
4000036|1|clientRef2=NITEFAN|clientRootId=1624000036|1|userid=WTSD|trader=WTS0006|clientTif=GTX|qua
ntity=100|origQty=100|liveQty=100|execQty=0|execDollarAmount=0|stageLiveQty=0|instruction=SSD:NITEEDGE
|seqNum=1|recno=0|orderFlags=6442450944|date=12/21/12|entered=1356125071798|updated=13561250717
98|multiDayFlag=N|fixTags=21=1 57=ALGO 6101=FAN 6210=0
|account=24438|nbboBid=5.46|nbboAsk=5.47|nbboSeqNum=20904248|nbboTime=1356125071798|buyingPow
erLimit=1|symbolFormat=ACT|chainID=3NW8RD07E91DA5|comment=NITEFAN|nbboBidSize=36|nbboAskSize=1|
Send Cancel Request
16:24:40,034 INFO SEND cancel <==
firm=WTSD|security=S|category=STAGE|orderStatus=Pending|orderType=Limit|actionType=Cancel|side=B|price
=1|stopPrice=0|tif=GTX|refno=3NW8RD07E91DA5|rootRef=3NW8RD07E91DA5|clientRef2=NITEFAN|trader=WT
S0006|quantity=100|instruction=SSD:NITEEDGE|entered=1356125071798|updated=1356125080013|account=24
438|symbolFormat=ACT|comment=NITEFAN|
16:24:40,034 INFO RECV action ==> a:
firm=WTSD|security=S|category=STAGE|orderStatus=Pending|orderType=Limit|actionType=Cancel|side=B|price
=1|stopPrice=0|tif=GTX|refno=3NW8RD07E91DA5|rootRef=3NW8RD07E91DA5|clientRef2=NITEFAN|trader=WT
S0006|quantity=100|instruction=SSD:NITEEDGE|entered=1356125071798|updated=1356125080013|account=24
438|symbolFormat=ACT|comment=NITEFAN|
16:24:40,034 INFO RECV update ==> u:
firm=WTSD|security=S|exchange=NYSE|category=STAGE|orderStatus=Canceled|orderType=Limit|actionDir=STA
GE|actionType=Entry|side=B|price=1|orderCapacity=Agency|tif=GTT|tifValue=1356145202876|complexOrigin=A
5|baseType=Y|refno=3NW8RD07E91DA5|hierarchyRef=3NW8RD07E91D|rootRef=3NW8RD07E91DA5|exchange
Ref=085910294|clientRef1=1624000036|1|clientRef2=NITEFAN|clientRootId=1624000036|1|oatsCancelTime=13
56125080034|userid=WTSD|trader=WTS0006|clientTif=GTX|quantity=100|origQty=100|liveQty=0|execQty=0|ex
ecDollarAmount=0|rejectQty=100|stageLiveQty=0|text=CANCELED|instruction=SSD:NITEEDGE|seqNum=3|recno
=0|orderFlags=23622320128|date=12/21/12|entered=1356125071798|updated=1356125080034|multiDayFlag=
N|fixTags=21=1 57=ALGO 6101=FAN 6210=0
|account=24438|nbboBid=5.46|nbboAsk=5.47|nbboSeqNum=20904248|lastInTags=1=WTS0006|nbboTime=135
6125071798|buyingPowerLimit=1|symbolFormat=ACT|chainID=3NW8RD07E91DA5|comment=NITEFAN|nbboBid
Size=36|nbboAskSize=1|
ORDER TYPES
There are three separate places where one specifies where an order is going:
actionMsg.header.dest
actionMsg.data.category
actionMsg.data.instruction
NANO EXCHANGE | API - QUICK START GUIDE
The header.dest specifies where this message goes. For OrderAction, it normally is STAGE. Data.category and
data.instruction combined define what this order is. There are multiple ways to do the same task, so it depends on what a
client wants to do.
For simple pass through, a client can specify data.cateogry=GlobalDestination.NYSE. The system will generate one order
and that order will go to NYSE. In this case, FI will only act as pre-risk check and routing purpose.
For a more complicated order, such as smart order/synthetic peg order and etc͙ There is possibility FI may need to
generate more than 1 order for customer order, in that case a client will specify data.category = GlobalDestination.STAGE
and instruction, orderType and etc͙
The following is an example of sending a NYSE limit-on-open:
Set the normal price, qty, symbol fields, set actMsg.data.category = GlobalDestination.NYSE;
actMsg.data.openCloseType = GlobalOpenCloseType.OnOpen;
If the client needs to replace the order,actMsg.data.actionType = GlobalOrderAction.Replace;
Client also needs to copy security, side, refno, rootRef field from existing order.
If client needs to change quantity/price, set field to new value, otherwise copy the existing information.
Routing Instructions:
The following is how to set up the Routing Instructions data tab on the console for the preference list for the smart router.
Stage, Firm, Security, Subject, Destination, Alt Destination,
ROUT, *, *. INET, ARCA
ROUT, *, *, ARCA, ARCA INET
ROUT, *,*, BATS, BATS, INET
ROUT, *,*, EDGX, EDGX, INET
ROUT, *, *, NYSE, NYSE, INET
Otherwise the API can be used for this as well the message GlobalMsgDBRoutingInstUpdate to change the route.
The following is an example of routing instructions update:
msgType=DBRoutingInstUpdate|firm=LEHM|dest=DB|tranId=4|flags=4|stage=ROUT|firm=*|security=*|subject=
NYSE|destination=ARCA|alterDestination=NYSE|
Example of smart router in action:
By default, orders staged within FIN will be automatically sent to smart router if order price is better than NBBO. In this
example, we send buy 20000 DELL MKT to FIN, the root order will automatically send it to smart router (ROUT), which will
then send out orders to different venues based on protected quotes. Smarter router will work the book until the order
itself is fully executed or market is out of reach.
Here is a configuration snapshot:
“P” is for parallel, “S” is for serial, “
” is for automatic
Console settings in Routing Instruction Tab
Stage, Firm, Security, Subject, Destination, Routing Instruction
NANO EXCHANGE | API - QUICK START GUIDE
Stage, DEMO, GOOG, P, Dark 50, Dark2, 50 (note, pinging two routes by splitting order)
More complex routing instructions can be created this would require to set the Order ction.orderData’s
field routingSessionName to “Custom Name” when sending order.
The following is examples of how to generate ALGO orders:
OCO example:
OrderData.executionType = GlobalExecutionType.OCO;
OrderData..manning_refno = uniqueID //unique id of the group
VWAP example:
OrderData.executionType = GlobalExecutionType.BasicVWAP;
OrderData.numOfSlices = v;//num of slices you want to take
OrderData.randomSeed = v1;//random number so system can randomize to hide your from being detected
TWAP example:
OrderData.executionType = GlobalExecutionType.BasicTWAP;
OrderData.numOfSlices = v;//num of slices you want to take
OrderData.sliceThreshold = vshares;//share of last sale for system to launch next slice
OrderData.randomSeed = v1;//random number so system can randomize to hide your from being detected
MULTILEG ORDERS
Use GlobalMsgMultiLegOrderAction for multi-leg orders
EXAMPLE OF ORDER ENTRY FOR MULTILEG
msgType=MultiLegOrderAction|firm=ABNA|dest=STAGE|tra
nId=2|flags=4|actionType=Entry|quantity=100|orderType=Limit|tif=DAY|category=INE
T|firm=ABNA|price=1.01|data=2|data[0]=[firm=ABNA|security=JNJ 20120121P
50.000|category=STAGE|actionType=Entry|side=B|price=1.01|tif=DAY|trader=MULTI|quantity=100|instrumentT
ype=Options|]data[1]=[firm=ABNA|security=JNJ 20120121C
60.000|category=STAGE|actionType=Entry|side=S|price=1.
01|tif=DAY|trader=MULTI|quantity=100| instrumentType=Options]
EXAMPLE OF ORDER CANCEL FOR MULTILEG
NANO EXCHANGE | API - QUICK START GUIDE
The cancel is still just OrderAction message
23:03:39.439-(TRAN[I->19]): msgType=OrderAction|firm=ABNA|dest=STAGE|tranId=8|fl
ags=4|firm=ABNA|security=JNJ|actionType=Cancel|refno=3HZB3605RR9VA3|rootRef=3HZB3605RR9VA3|
EXAMPLE OF ORDER REPLACE FOR MULTILEG
msgType=MultiLegOrderAction|firm=ABNA|dest=STAGE|tra
nId=6|flags=4|actionType=Replace|refno=3HZB3605RR9TA3|quantity=200|orderType=Limit|tif=DAY|category=D
ASHISE|price=10.02|data=2|data[0]=[security=JNJ 20120121P 5
0.000|side=B|quantity=200|instrumentType=Options|]data[1]=[security=JNJ 20120121
C 60.000|side=S|quantity=200|instrumentType=Options|]
P&L TRANSACTION DATA
Subscribe for PLTRAN:
Example One:
SubscriptionData subData = new SubscriptionData();
subData.init();
subData.security = Const_msggen.GlobalWildCard;
subData.msgType = GlobalMsgType.MultiPLTranUpdate;
data.firm = firm;
data.trader = trader;
Example Two:
Subscribe for MultiPLTranUpdate, and you will receive msg MultiPLTranUpdate and PLTranUpdate.
SubscriptionData subData = new SubscriptionData();
subData.init();
subData.security = Const_msggen.GlobalWildCard;
subData.msgType = GlobalMsgType.MultiPLTranUpdate;
subData.firm = firm;
subData.trader = trader;
You will get back GlobalMsgMultiPLTranUpdate and GlobalMsgPLTranUpdate, the difference between the two is that the
first can carry a list of updates, while latter carry one update.
The following is an example:
NANO EXCHANGE | API - QUICK START GUIDE
msgType=MultiPLTranUpdate|subId=63|data=1|data[0]=[firm=LEHM|security=ZVZZT|trader=0003|pos=1000|dol
larAmount=101000.0|seqNum=0|avgPrice=101.0|]
MANAGEMENT OF PRE-TRADE RISK CONTROLS
In order to get the current pre-trade risk control settings, the following message would be used
GlobalMsgDBMultiFirmUserQuery set whereClause to the criteria that you want to choose (standard SQL) from in the
settings.
Request example:
msgType=DBMultiFirmUserQuery|firm=LEHM|dest=DB|tranId=2|whereClause=firm = 'LEHM' and userid = 'KUN'|
Response example:
msgType=DBMultiFirmUserQuery|firm=LEHM|dest=DB|tranId=2|globalID=7243|lifeTime=30|flags=4|type=DefClient|
tranResponse=SUCCESS|where Clause=firm = 'LEHM' and userid = 'KUN' and firm =
LEHM'|data=1|data[0]=[firm=LEHM|userid=KUN|trader=0004|user_type=O|accountType=P|marginLimit=100000.0|s
tageAccessList=STAGE1|preTradeDest=PRERISK|]
In order to set new risk, use the message GlobalMsgDBFirmUserUpdate
Request example:
msgType=DBFirmUserUpdate|firm=LEHM|dest=DB|tranId=3|firm=LEHM|userid=KUN|trader=0004|user_type=O|acc
ountType=P|marginLimit=20000.0|stageAccessList=STAGE1|preTradeDest=PRERISK|
Response example,
12:49:13.549-(TRAN[O<-25]): msgType=DBFirmUserUpdate|tranId=3|flags=256|tranResponse=SUCCESS|
RISK MANAGEMENT FIELDS DESCRIPTION
The following is a List of db fields and corresponding screen display for the FIN Console
Database field names and screen names
("Firm","Firm",60),
("Userid","User ID",100),
("Totalallowqty","TotQty",90),
("Totalallowamount","TotAmt",90),
("Maxordershares","Max Ord Shares",90),
("Maxdollaramount","Max Ord Amt",90),
("Percentagelimit","Max away Pct",90),
("Nonmarketpercentagelimit","Non-open Max away Pct",90),
("Marginlimit","Margin BuyPower",90),
("Speedlimit", "Dup Order", 90),
("Speedlimit2", "Speed Check", 90),
("Preventnakedoptionsell", "No Naked Sell", 90),
("Volumepercentlimit", "ADTV %",90),
("Optionmaxordershares","OPT Max Ord Shares",90),
("Shortsale_monitor","Locate",70),
NANO EXCHANGE | API - QUICK START GUIDE
("Pretradedest", "Risk Dest",60),
("Trader","Trader",100),
("User_type","User Type",50),
("Accounttype","Account Type",60),
("Monitorconn","Monitor",50),
("Servicebureau","SveBureau",60),
("Status_monitor","Risk Status", 40),
("Attributes", "Attr", 100),
("Attributable","Displayable",60),
("Retail_type", "Extern Type", 30),
o
("extern_account", "Extern Acct", 80),
o
("commission", "Commission",60),
("Bureauid", "BureauID",60),
("Cancelondisconnect", "Cxl On Discon",60),
("Flatposafterdisconnect", "Zero Pos after Disc",60),
("Rolluptrader","Rollup Act", 50),
("Minprice","Min Price", 50),
("Maxprice","Max Price", 50),
("Maxnumpos","Max Num Pos", 50),
("Maxopenorders","Max Open Ords", 50),
("Maxgrossloss","Max Loss", 50),
("Riskrollup","Rollup Risk", 50),
("Symbolfilter","Sym Filt", 50),
("Concentpercentlimit","Concent Pct Lmt", 50),
("active_account","Active", 70),
("Washcheck","Acc Wash", 70),
("maxpossize", "Max Pos Size", 100),
("mastertrader", "Master Trader", 80),
("Instructions", "Spec Instr", 200),
("Oddlot_check", "Odd Lot Chk", 100),
("Shortsalemultiplier", "Short Multiplier", 100),
("Resetlimit", "Reset Limit", 100),
("Allow_accounts", "Sub Accts", 250),
("isocheck", "ISO Check", 100),
("Haltcheck", "HALT Check", 100),
RISK MANAGEMENT NOTIFICATION OF REJECTS
If there is rejection, following strings are returned to client, most of information is straightforward.
"Exceed max pos " //exceed max number of position
"Exceed max open order " // exceed max open order
"Exceeds max quantity"
“"ISO not allowed"”
"Cannot initiate odd lot pos"”
"Wash sale prohibited"
"Max dollar amount exceeded"”
"Not in filter list" // has symbol filter and symbol is not in allowed list
""Exceeds margin limit"
"Exceed total qty"
"Exceed total Amount"
NANO EXCHANGE | API - QUICK START GUIDE
You can also subscribe for MarginInfoUpdate for information such as currentMarginlimit, buy qty, sell qty, etc͙
Subscribe for margin Information:
subData = new SubscriptionData();
subData.init();
subData.firm = firm;
subData.trader = trader;
subData.msgType = GlobalMsgType.MarginInfoMultiUpdate;
Example of update message:
msgType=MarginInfoMultiUpdate|subId=63|data
=1|data[0]=[currentQty=200|currentAmount=2100.0|currentMargin=2100.0|firm=LEHM|trader=0004|maxDaily
Qty=0|maxDailyAmount=0.0|maxMargin=20000.0|currentSpeed=0|maxSpeed=0|currentCumNetQty=0|currentC
umNetValue=0.0|currentCumOpenQty=200|currentCumOpenValue=2100.0|currentCumLongQty=0|currentCumL
ongValue=0.0|currentCumShortQty=0|currentCumShortValue=0.0|totalOrders=2|totalTrades=0|lastMinOrders=
2|lastMinTrades=0|maxSpeed2=0|currentSpeed2=0|]
UNLISTED SECURITIES TRADE NEGOTIATION
ORDER ACTION/ORDER UPDATE
It is used to create a basic order action message.
GlobalMsgOrderAction actionMsg = new GlobalMsgOrderAction();
actionMsg.init();
actionMsg.header.dest = GlobalDestination.STAGE;
actionMsg.data.actionType = GlobalOrderAction.Entry;
actionMsg.data.side = bors;
actionMsg.data.quantity = qty;
actionMsg.data.security = symbol;
actionMsg.data.price = price;
if (price == 0)
actionMsg.data.orderType = GlobalOrderType.Market;
actionMsg.data.category = dest;
actionMsg.data.tif = tif;
NANO EXCHANGE | API - QUICK START GUIDE
DIRECTED ORDER MESSAGE
To route order to a recipient only
actionMsg.data.broker = v; //v is the id of the recipient
To route order to a list of recipients only
actionMsg.data.preferList = list;// list in in format of b1,b2,b3,b4͙
Indications of Interest Order Message
This is used to broadcast the order to everyone.
actionMsg.data.preferList = “*”;
Anonymous Flag
To be anonymous, (counter party will see it comes from “ NON” instead of your firm id)
BaseMsg.setFlag(ref actionMsg.data.orderFlags2, Const_msggen.GlobalOrderFlag2NonAttributable, true);
Execute Order
To execute an order, send back a new order with security,side(should be sell if incoming is buy, or buy if incoming is sell),
price, qty, refno( set to refno of the incoming order) and the flag.
BaseMsg.setFlag(ref ordAction.data.orderFlags2, Const_msggen.GlobalOrderFlag2RODMExecOrder, true);
Counter Order
To counter an order, send back a new order with security, price, qty, refno (set to refno) and the flag.
BaseMsg.setFlag(ref ordAction.data.orderFlags2, Const_msggen.GlobalOrderFlag2RODMCounterOrder, true);
Trade Update
It is used to receive a trade execution message
GlobalTradeUpdate extends ExternalDataMsg
TradeUpdate contains a list of TradeData.
category, enum, order category, such as CROX͙
refno, string, unique identifier assigned by FIN server
orderRef, string, corresponding order reference number, through this field, you can find corresponding order
that trade is generated from.
rootRef, string, corresponding parent order’s reference number.
NANO EXCHANGE | API - QUICK START GUIDE
execQty, int, the number of shares executed.
execPrice, double, the price of execution.
tradeStatus, enum, normally it is GlobalTradeStatus.
o Normal, but it can be GlobalTradeStatus.
o Canceled for broken trade or GlobalTradeStatus.
o Replaced for corrected trade.
clientRef1, string. If customer set the clientRef1 field when sending new order, the corresponding value is
passed back here.
The subscription to Trade is very similar to Order Action and Order Update, except you request for
GlobalMsgType.TradeUpdate instead.
Order Messages Basic Flows
1. The basic flow of order messages for two participants negotiating a trade.
2. There are two Firms: Firm ROD1 and Firm ROD2.
3. ROD1 sends an order to ROD2
ROD1 will send in GlobalMsgOrderAction
11:52:39.220-(TRAN[I->19]):
msgType=OrderAction|firm=ROD1|dest=STAGE|tranId=2|flags=4|security=ZVZZT|category=STAGE|actionType=E
ntry|side=B|price=100.5|userid=LUO|trader=LUO|quantity=1000|broker=ROD2|orderFlags2=68719476736|
ROD1 will receive a GlobalMsgOrderaction response and OrderUpdate update
11:52:39.282-(TRAN[O<-19]):
msgType=OrderAction|firm=ROD1|dest=STAGE|tranId=2|globalID=22053|lifeTime=30|flags=4|type=DefClient|tr
anResponse=SUCCESS|firm=ROD1|security=ZVZZT|category=STAGE|orderStatus=Open|actionDir=STAGE|actionT
ype=Entry|side=B|price=100.5|orderCapacity=Principal|tif=GTT|tifValue=1314978859173|complexOrigin=A7|bas
eType=Y|refno=3ANIC7EW0P8WA7|hierarchyRef=3ANIC7EW0P8W|rootRef=3ANIC7EW0P8WA7|userid=_NEGOT
|trader=LUO|clientTif=GTT|clientTifValue=1314978859173|quantity=1000|origQty=1000|liveQty=1000|execQty
=0|execDollarAmount=0.0|stageLiveQty=0|broker=ROD2|seqNum=1|recno=0|date=09/02/11|entered=1314978
759267|updated=1314978759267|multiDayFlag=N|orderFlags2=18073222381568|chainID=3ANIC7EW0P8WA7|
11:52:39.392-(DATA[O<-19]):
|subId=1|msgType=OrderUpdate|subId=4|data=1|data[0]=[firm=ROD1|security=ZVZZT|category=STAGE|orderSt
atus=Open|actionDir=STAGE|actionType=Entry|side=B|price=100.5|orderCapacity=Principal|tif=GTT|tifValue=13
14978859173|complexOrigin=A7|baseType=Y|refno=3ANIC7EW0P8WA7|hierarchyRef=3ANIC7EW0P8W|rootRef
=3ANIC7EW0P8WA7|userid=_NEGOT|trader=LUO|clientTif=GTT|clientTifValue=1314978859173|quantity=1000|
origQty=1000|liveQty=1000|execQty=0|execDollarAmount=0.0|stageLiveQty=0|broker=ROD2|seqNum=1|recno
=0|date=09/02/11|entered=1314978759267|updated=1314978759267|multiDayFlag=N|orderFlags2=180732223
81568|chainID=3ANIC7EW0P8WA7|]
NANO EXCHANGE | API - QUICK START GUIDE
ROD2 receives an Order Update
ROD2 will receive an order update (RODMIN indicates it is a solicitation order from someone, broker indicates where it is
from, if it is anonymous, it will have “ NON” in it)
11:52:39.423-(DATA[O<-21]):
msgType=OrderUpdate|data=1|data[0]=[firm=ROD1|security=ZVZZT|category=RODMIN|orderStatus=Open|side
=B|price=100.5|tif=GTT|tifValue=1314978859173|refno=3ANIC7EW0P8WA7|hierarchyRef=3ANIC7EW0P8W|roo
tRef=3ANIC7EW0P8WA7|clientTif=GTT|clientTifValue=1314978859173|quantity=1000|origQty=1000|liveQty=10
00|execQty=0|execDollarAmount=0.0|broker=ROD1|date=09/02/11|entered=1314978759267|updated=131497
8759267|]
ROD2 is to counter the order.
ROD2 sends in an orderAction for counter (change quantity to 1100 share and price to 100.51)
11:52:46.911-(TRAN[I->21]):
msgType=OrderAction|firm=ROD2|dest=STAGE|tranId=2|flags=4|firm=ROD2|security=ZVZZT|category=STAGE|o
rderStatus=Open|actionType=Entry|side=S|price=100.51|tif=GTT|tifValue=1314978859173|refno=3ANIC7EW0P8
WA7|hierarchyRef=3ANIC7EW0P8W|rootRef=3ANIC7EW0P8WA7|trader=LUO|clientTif=GTT|clientTifValue=1314
978859173|quantity=1100|origQty=1100|liveQty=1000|execQty=0|execDollarAmount=0.0|broker=ROD1|date=
09/02/11|entered=1314978759267|updated=1314978759267|orderFlags2=1099511627776|
ROD2 will receive confirmation and order update
11:52:46.926-(TRAN[O<-21]):
msgType=OrderAction|firm=ROD2|dest=STAGE|tranId=2|globalID=22053|lifeTime=30|flags=4|type=DefClient|tr
anResponse=SUCCESS|firm=ROD2|security=ZVZZT|category=STAGE|orderStatus=Open|actionDir=STAGE|actionT
ype=Entry|side=S|price=100.51|orderCapacity=Principal|tif=GTT|tifValue=1314978859173|complexOrigin=A7|b
aseType=Y|refno=3ANIC7EW0P8XA7|hierarchyRef=3ANIC7EW0P8X|rootRef=3ANIC7EW0P8XA7|userid=_NEGOT|
trader=LUO|clientTif=GTT|clientTifValue=1314978859173|quantity=1100|origQty=1100|liveQty=1100|execQty=
0|execDollarAmount=0.0|stageLiveQty=0|broker=ROD1|seqNum=1|recno=0|date=09/02/11|entered=13149787
66911|updated=1314978766911|multiDayFlag=N|fixTags=43222=C^A43223=null|orderFlags2=19172734009344|
chainID=3ANIC7EW0P8XA7|
11:52:46.926-(DATA[O<-21]):
|subId=1|msgType=OrderUpdate|subId=29|data=1|data[0]=[firm=ROD2|security=ZVZZT|exchange=NASD|categ
ory=STAGE|orderStatus=Open|actionDir=STAGE|actionType=Entry|side=S|price=100.51|orderCapacity=Principal
|tif=GTT|tifValue=1314978859173|complexOrigin=A7|baseType=Y|refno=3ANIC7EW0P8XA7|hierarchyRef=3ANI
C7EW0P8X|rootRef=3ANIC7EW0P8XA7|userid=_NEGOT|trader=LUO|clientTif=GTT|clientTifValue=131497885917
3|quantity=1100|origQty=1100|liveQty=1100|execQty=0|execDollarAmount=0.0|stageLiveQty=0|broker=ROD1|
seqNum=1|recno=0|date=09/02/11|entered=1314978766911|updated=1314978766911|multiDayFlag=N|fixTag
s=43222=C^A43223=null|nbboBid=100.0|nbboAsk=101.0|nbboSeqNum=46|orderFlags2=19172734009344|nbbo
Time=1314978766911|chainID=3ANIC7EW0P8XA7|]
NANO EXCHANGE | API - QUICK START GUIDE
ROD1 receives the Counter Order
ROD1 will receive an order update for counter order
11:52:46.926-(DATA[O<-19]):
msgType=OrderUpdate|data=1|data[0]=[firm=ROD2|security=ZVZZT|category=RODMIN|orderStatus=Open|side
=S|price=100.51|tif=GTT|tifValue=1314978859173|refno=3ANIC7EW0P8XA7|hierarchyRef=3ANIC7EW0P8X|root
Ref=3ANIC7EW0P8XA7|clientTif=GTT|clientTifValue=1314978859173|quantity=1100|origQty=1100|liveQty=1100
|execQty=0|execDollarAmount=0.0|broker=ROD2|date=09/02/11|entered=1314978766911|updated=13149787
66911|]
Because ROD2 countered ROD1’s order, the system will automatically cancel the original counter.
Both ROD2 and ROD1 will receive an update that the previous order is canceled.
ROD1 receives the Cancel Message
11:52:46.926-(DATA[O<-19]):
|subId=1|msgType=OrderUpdate|subId=4|data=1|data[0]=[firm=ROD1|security=ZVZZT|exchange=NASD|categor
y=STAGE|orderStatus=Canceled|actionDir=STAGE|actionType=Entry|side=B|price=100.5|orderCapacity=Principal
|tif=GTT|tifValue=1314978859173|complexOrigin=A7|baseType=Y|refno=3ANIC7EW0P8WA7|hierarchyRef=3ANI
C7EW0P8W|rootRef=3ANIC7EW0P8WA7|oatsCancelTime=1314978766911|userid=_NEGOT|trader=LUO|clientTif
=GTT|clientTifValue=1314978859173|quantity=1000|origQty=1000|liveQty=0|execQty=0|execDollarAmount=0.0
|rejectQty=1000|stageLiveQty=0|broker=ROD2|text=Countered|seqNum=2|recno=0|date=09/02/11|entered=1
314978759267|updated=1314978766911|multiDayFlag=N|nbboBid=100.0|nbboAsk=101.0|nbboSeqNum=46|or
derFlags2=18073222381568|nbboTime=1314978759345|chainID=3ANIC7EW0P8WA7|]
ROD2 receives the Cancel Message
11:52:46.942-(DATA[O<-21]):
msgType=OrderUpdate|data=1|data[0]=[firm=ROD1|security=ZVZZT|category=RODMIN|orderStatus=Canceled|s
ide=B|price=100.5|tif=GTT|tifValue=1314978859173|refno=3ANIC7EW0P8WA7|hierarchyRef=3ANIC7EW0P8W|r
ootRef=3ANIC7EW0P8WA7|clientTif=GTT|clientTifValue=1314978859173|quantity=1000|origQty=1000|liveQty=
0|execQty=0|execDollarAmount=0.0|rejectQty=1000|broker=ROD1|text=Countered|date=09/02/11|entered=13
14978759267|updated=1314978766911|]
AUTOMATIC CANCEL FUNCTIONALITY
The system will automatically cancel the original order only if the original order is sent to only one customer.
NANO EXCHANGE | API - QUICK START GUIDE
If the original order is sent to a list of customers or everyone, system will not cancel original if someone counters it, as
there might be other counter offers received, the sender in that case will need to cancel the original order manually, the
system will not process an automatic cancel.
RODM EXECUTES THE ORDER
Now ROD1 decides to execute it, ROD1 sends an OrderAction message
11:52:57.893-(TRAN[I->19]):
msgType=OrderAction|firm=ROD1|dest=STAGE|tranId=3|flags=4|firm=ROD1|security=ZVZZT|category=STAGE|o
rderStatus=Open|actionType=Entry|side=B|price=100.51|tif=GTT|tifValue=1314978859173|refno=3ANIC7EW0P
8XA7|hierarchyRef=3ANIC7EW0P8X|rootRef=3ANIC7EW0P8XA7|trader=LUO|clientTif=GTT|clientTifValue=13149
78859173|quantity=100|origQty=100|liveQty=1100|execQty=0|execDollarAmount=0.0|broker=ROD2|date=09/0
2/11|entered=1314978766911|updated=1314978766911|orderFlags2=2199023255552|
ROD1 receive an OrderAction confirmation and OrderUpdate
11:52:57.893-(TRAN[O<-19]):
msgType=OrderAction|firm=ROD1|dest=STAGE|tranId=3|globalID=22053|lifeTime=30|flags=4|type=DefClient|tr
anResponse=SUCCESS|firm=ROD1|security=ZVZZT|category=STAGE|orderStatus=Open|actionDir=STAGE|actionT
ype=Entry|side=B|price=100.51|orderCapacity=Principal|tif=GTT|tifValue=1314978859173|complexOrigin=A7|b
aseType=Y|refno=3ANIC7EW0P8YA7|hierarchyRef=3ANIC7EW0P8Y|rootRef=3ANIC7EW0P8YA7|userid=LUO|trad
er=LUO|clientTif=GTT|clientTifValue=1314978859173|quantity=100|origQty=100|liveQty=100|execQty=0|execD
ollarAmount=0.0|stageLiveQty=0|broker=ROD2|seqNum=1|recno=0|date=09/02/11|entered=1314978777893|u
pdated=1314978777893|multiDayFlag=N|fixTags=43222=E^A43223=null|orderFlags2=19791209299968|manning
_refno=3ANIC7EW0P8XA7|chainID=3ANIC7EW0P8YA7|
11:52:57.924-(DATA[O<-19]):
|subId=1|msgType=OrderUpdate|subId=4|data=1|data[0]=[firm=ROD1|security=ZVZZT|exchange=NASD|categor
y=STAGE|orderStatus=Open|actionDir=STAGE|actionType=Entry|side=B|price=100.51|orderCapacity=Principal|ti
f=GTT|tifValue=1314978859173|complexOrigin=A7|baseType=Y|refno=3ANIC7EW0P8YA7|hierarchyRef=3ANIC7
EW0P8Y|rootRef=3ANIC7EW0P8YA7|userid=LUO|trader=LUO|clientTif=GTT|clientTifValue=1314978859173|qua
ntity=100|origQty=100|liveQty=100|execQty=0|execDollarAmount=0.0|stageLiveQty=0|broker=ROD2|seqNum=
1|recno=0|date=09/02/11|entered=1314978777893|updated=1314978777893|multiDayFlag=N|fixTags=43222=
E^A43223=null|nbboBid=100.0|nbboAsk=101.0|nbboSeqNum=46|orderFlags2=19791209299968|nbboTime=131
4978777893|manning_refno=3ANIC7EW0P8XA7|chainID=3ANIC7EW0P8YA7|]
The Orders are matched.
The System will cross (CROX) these two final orders.
ROD1 will receive order update and trade updates
11:52:58.158-(DATA[O<-19]):
|subId=2|msgType=TradeUpdate|subId=5|data=1|data[0]=[firm=ROD1|spaFirm=TEST|security=ZVZZT|securityTy
NANO EXCHANGE | API - QUICK START GUIDE
pe=NASDGlobalSelect|tradeStatus=Open|category=CROX|side=B|execPrice=100.51|execQty=100|orderCapacity
=Principal|refno=3ANIC7EW0P8YA72_3ANIC7EW0P8Z|hierarchyRef=3ANIC7EW0P8Y|orderRef=3ANIC7EW0P8YA
72|rootRef=3ANIC7EW0P8YA7|exchangeRef=3ANIC7EW0P8Z|userid=LUO|trader=LUO|improvAmount=0.0|liquid
ityInd=T|broker=TEST|seqNum=2|date=09/02/11|confirmed=Y|entered=1314978777909|tradeOrigin=CROX|ma
nning_refno=3ANIC7EW0P8XA7|chainID=3ANIC7EW0P8YA7|]
11:52:58.174-(DATA[O<-19]):
msgType=OrderUpdate|data=1|data[0]=[firm=ROD2|security=ZVZZT|category=RODMIN|orderStatus=Canceled|s
ide=S|price=100.51|tif=GTT|tifValue=1314978859173|refno=3ANIC7EW0P8XA7|hierarchyRef=3ANIC7EW0P8X|r
ootRef=3ANIC7EW0P8XA7|clientTif=GTT|clientTifValue=1314978859173|quantity=1100|origQty=1100|liveQty=0
|execQty=0|execDollarAmount=10051.0|rejectQty=1000|broker=ROD2|date=09/02/11|entered=131497876691
1|updated=1314978778002|]
11:52:58.174-(DATA[O<-19]):
|subId=1|msgType=OrderUpdate|subId=4|data=1|data[0]=[firm=ROD1|security=ZVZZT|exchange=NASD|categor
y=STAGE|orderStatus=Executed|actionDir=STAGE|actionType=Entry|side=B|price=100.51|orderCapacity=Princip
al|tif=GTT|tifValue=1314978859173|complexOrigin=A7|baseType=Y|refno=3ANIC7EW0P8YA7|hierarchyRef=3AN
IC7EW0P8Y|rootRef=3ANIC7EW0P8YA7|userid=LUO|trader=LUO|clientTif=GTT|clientTifValue=1314978859173|q
uantity=100|origQty=100|liveQty=0|execQty=100|execDollarAmount=10051.0|rejectQty=0|stageLiveQty=0|brok
er=ROD2|seqNum=3|recno=0|date=09/02/11|entered=1314978777893|updated=1314978778002|multiDayFlag
=N|fixTags=43222=E^A43223=null|nbboBid=100.0|nbboAsk=101.0|nbboSeqNum=46|orderFlags2=19791209299
968|nbboTime=1314978777893|manning_refno=3ANIC7EW0P8XA7|chainID=3ANIC7EW0P8YA7|]
ROD2 will receive order update and trade updates.
11:52:58.158-(DATA[O<-21]):
|subId=2|msgType=TradeUpdate|subId=30|data=1|data[0]=[firm=ROD2|spaFirm=TEST|security=ZVZZT|security
Type=NASDGlobalSelect|tradeStatus=Open|category=CROX|side=S|execPrice=100.51|execQty=100|orderCapacit
y=Principal|refno=3ANIC7EW0P8XA72_3ANIC7EW0P8Z|hierarchyRef=3ANIC7EW0P8X|orderRef=3ANIC7EW0P8X
A72|rootRef=3ANIC7EW0P8XA7|exchangeRef=3ANIC7EW0P8Z|userid=_NEGOT|trader=LUO|improvAmount=0.0
|liquidityInd=P|broker=TEST|seqNum=2|date=09/02/11|confirmed=Y|entered=1314978777909|tradeOrigin=CR
OX|manning_refno=3ANIC7EW0P8XA7|chainID=3ANIC7EW0P8XA7|]
11:52:58.190-(DATA[O<-21]):
|subId=1|msgType=OrderUpdate|subId=29|data=1|data[0]=[firm=ROD2|security=ZVZZT|exchange=NASD|categ
ory=STAGE|orderStatus=Canceled|actionDir=STAGE|actionType=Entry|side=S|price=100.51|orderCapacity=Princi
pal|tif=GTT|tifValue=1314978859173|complexOrigin=A7|baseType=Y|refno=3ANIC7EW0P8XA7|hierarchyRef=3A
NIC7EW0P8X|rootRef=3ANIC7EW0P8XA7|userid=_NEGOT|trader=LUO|clientTif=GTT|clientTifValue=1314978859
173|quantity=1100|origQty=1100|liveQty=0|execQty=100|execDollarAmount=10051.0|rejectQty=1000|stageLiv
eQty=0|broker=ROD1|seqNum=3|recno=0|date=09/02/11|entered=1314978766911|updated=1314978778002|
multiDayFlag=N|fixTags=43222=C^A43223=null|nbboBid=100.0|nbboAsk=101.0|nbboSeqNum=46|orderFlags2=1
9172734009344|nbboTime=1314978766911|chainID=3ANIC7EW0P8XA7|]
NANO EXCHANGE | API - QUICK START GUIDE
NANO EXCHANGE | API - QUICK START GUIDE