Tags: bats, client logs, comma delimited, cr lf, drop session, ecn, execution, executions, field layout, information log, proper authorization, protocol, protocols, real time, redundancy, replay, specification overview, successful connection, tcp ip socket, telnet client,
DROP Specification
Version 1.0
September 4, 2007
BATS DROP Specification
Overview
BATS uses a variation of the DROP protocol to provide real-time information about executions.
DROP cannot be used to enter orders. For order entry, refer to the BATS FIX Specification.
Note that the field layout is slightly different than similar protocols used by other ECN's.
Configuration
DROP is typically used by clearing firms or subscribers to monitor their trading activity.
With proper authorization, a single DROP session can be used to obtain execution information about multiple BATS
subscribers, allowing a service bureau configuration.
For redundancy, multiple DROP hosts can be configured to send the same information about the same set of
subscribers.
Protocol
DROP is a CR/LF terminated protocol.
The client connects to an assigned host and port using a TCP/IP socket.
After a successful connection, the client sends an assigned password followed by a CR/LF.
The DROP host authenticates the password and begins sending fixed length, comma delimited execution
information to the client. Each line reflects a single execution and is terminated with a CR/LF pair.
Once the DROP host has sent all previous executions the connection remain open but idle until the next new
execution is sent by the host. After initial replay, each execution is sent as quickly as possible in real time. If the
client is slow in reading executions, the executions are queued and delivered in sequence as fast as the client can
read them.
An empty line containing only a CR/LF pair marks the end of the trading day.
An empty line containing only a CR/LF represents a logout request from the client. The DROP host will close the
connection and wait for a new connection when the client logs out.
The protocol can be used manually with a standard Telnet client. Using a Telnet client, a user could log into a DROP
port, download execution information, log out, and then directly import the comma separated execution information
into a spreadsheet or database application.
BATS Trading, Inc. © 2006 Page 2 of 6
BATS DROP Specification
Replaying from a Specified Line Number
If a connection is lost between a DROP host and its client, the client can reconnect and request the host begin
transmitting with a specific line number using the following login format:
password[,line number]
where "password" is the assigned client password and line number is the optional line number the client would
like the host to begin transmission with. The login line must be terminated with a CR/LF pair. If the optional line
number is unspecified, the DROP host will begin transmission with the first trade for the current day (line #1).
The client application can count incoming lines and request the next expected line on reconnect to avoid duplicate
transmission of execution data.
Heartbeating
A heartbeat message should be sent from the DROP client to the server every 10 seconds. This will ensure the client
is notified of connectivity interruptions and avoid unnecessary network timeouts. The heartbeat sent to the DROP
server must have the following format:
H\r\n
Data Types
· Numeric fields are a string of ASCII digits, right justified and zero filled on the left.
· Alphanumeric fields are a string of ASCII characters (33-126), left justified and space padded on the right.
· Base 36 Numeric (Order Id and Execution Id) fields are base 36 (0-9A-Z) numbers, right justified and
zero filled on the left. Note that these fields are longer than on some other ECN's.
· Alpha fields are left justified and space padded on the right.
· Prices are decimal with x whole number digits followed by y decimal digits. The whole number portion is
zero filled on the left; the decimal portion is zero filled on the right. The decimal point explicitly appears
inside the price field. Note that this is slightly different from implementations on some other ECN's.
· Timestamp fields are seconds past midnight Eastern Time of the trade date with millisecond precision.
BATS Trading, Inc. © 2006 Page 3 of 6
BATS DROP Specification
Trade Message Format
After login, the client will receive a series of Trade Message Lines from the host in real time. Each Trade Message
Line is fixed format, comma delimited, and CR/LF terminated ASCII text.
Field Name Offset Length Type Sample Description
Timestamp 0 9 Timestamp 12345.123 The time the trade occurred
on BATS accurate to the
nearest millisecond.
Sender Comp 10 4 Alphanumeric ABCD Sending Firm
Id
Sender Sub Id 15 4 Alphanumeric 0001 The firm port identifier
where the order originated.
Clearing Firm 20 4 Alphanumeric WXYZ The clearing MPID.
User 25 4 Alphanumeric A001 User defined pass through
value to distinguish trading
activity. Matches FIX
ClearingAccount (tag 440)
and POUCH "User" field
Client Order 30 24 Alphanumeric j4Ig000T00 The client order identifier
Id specified on the order entry
Order Id 55 15 (12 char) Base 1CW7A0000001.02 Day-unique order identifier
36 Numeric + assigned by BATS to this
`.' + (2 char) order. The first 12
Base 36 characters match the Order
Numeric Id seen in FIX, POUCH, &
PITCH. The two character
base 36 number after the
dot indicates the number of
times the order was
modified. The full 15
character Order Id matches
the Order Id used for trade
reporting and OATS.
Execution Id 71 12 Base 36 12W7A0000001 Day-unique execution
Numeric identifier assigned by
BATS to this execution.
Symbol 84 6 Alpha MSFT The stock symbol
Side 91 1 Alpha B The side of the execution.
B=Bought,
S=Sold,
T=Sold Short (subscriber
affirmed ability to borrow),
E=Sold Short Exempt
(subscriber affirmed ability
to borrow and subscriber is
exempt from short sale
tests)
Price 93 11 Price 6.4 000025.5100 Execution price
Shares 105 6 Numeric 100000 Number of shares executed
Capacity 112 1 Alpha P FIX 4.2 OrderCapacity
(Tag 47) value (E.g.
"P"=Principal)
Liquidity 114 1 Alpha A "A"=Added,
"C"=Conditionally Added,
BATS Trading, Inc. © 2006 Page 4 of 6
BATS DROP Specification
"R"=Removed,
"X"=Routed,
"Q"=NASDAQ or NSX
delivered against order
Clearing 116 1 Alpha Q "A"=ACT locked-in,
Method "Q"=QSR,
"C"=QSR Compressed,
"R"=Correspondent
"X"=Correspondent
Compressed
ECN Access 118 12 +/-Price 5.5 +99999.99999 (+) Fee or (-) rebate for the
Fee -99999.99999 entire execution based on
BATS access fee policies.
Subscriber Id 131 4 Alphanumeric ABCD BATS Assigned Subscriber
Id (the MPID which will
clear the trade is found in
the "Clearing Firm" field
above)
Symbology
BATS allows a maximum of 6 characters for symbols which requires the conversion of certain CQS issues to a 6
character format. The conversion for these CQS symbols is found below.
Symbology for CQS Symbols
SIAC/CQS Exchange/CMS BATS
Type Suffix Suffix Suffix
Preferred p PR -
Preferred Class "A" pA PRA -A
Preferred Class "B" pB PRB -B
Class "A" /A A .A
Class "B" /B B .B
Warrants /WS WS +
Warrants Class "A" /WS/A WSA +A
Warrants Class "B" /WS/B WSB +B
Preferred when distributed p/WD PRWD -$
When distributed /WD WD $
Called /CL CL *
Class "A" called /A/CL ACL .A*
Preferred called p/CL PRCL -*
Preferred "A" called pA/CL PRACL -A*
Preferred "A" when issued pAw PRAWI -A#
Emerging Company
Marketplace /EC EC !
Partial Paid /PP PP @
Convertible called /CV/CL CVCL %
Rights r RT ^
Units /U U =
When issued w WI #
Rights when issued rw RTWI ^#
Preferred when issued pw PRWI -#
BATS Trading, Inc. © 2006 Page 5 of 6
BATS DROP Specification
Class "A" when issued /Aw AWI .A#
Warrant when issued /WSw WSWI +#
Test /TEST TEST ~
BATS does not convert NASDAQ-listed securities as they are limited to 5 characters.
Support
Please e-mail questions or comments regarding this specification to tradedesk@batstrading.com.
Revision History
December 1, 2005 Initial Version 1.0
January 9, 2006 Added two character (base 36) modifier to the end of Order Id.
May 11, 2006 Added heartbeat from client to server
July 31, 2006 Changed "On Behalf Of" to "Subscriber Id" to avoid confusion
August 9, 2006 Added "C" as valid liquidity flag
August 21, 2006 Added "Symbology" Section
BATS Trading, Inc. © 2006 Page 6 of 6