Parsing of the NYSE Arca Feed data.
NYSE supplies 4 different channel feeds (http://www.nyxdata.com/page/1084):
The NYSE Arca Integrated Feed now lists four channels each A-Z. What is significant about four channels?
The four channels will send data via matching engine ID’s, which are load balanced across all letter ranges A-Z. Four-channel delivery of this feed will benefit customers by reducing the overall delivery latency with this product. These channel configurations will help our publishers achieve the very lowest latency possible.
Parsers for XDP streams.
XDP channel parser (unpacker) with file stream.
Get path to the channel found in the directory.
Channel file name format string defaults to string set in CHANNEL_FILE_NAME_FMT but it may be changed by calling the function with appropriate channel_file_name_fmt value.
XDP channel parser (unpacker).
The parser reads the supplied stream, unpacks packet headers, reads all message headers and unpacks only known messages.
Note
The parser assumes that the stream position is not manipulated during the lifetime of this object. Packets and messages are assumed to appear in the stream consecutively.
The parsers uses headers.PacketHeader and headers.MsgHeader for parsing, but you can supply your own header classes by setting pkt_hdr_cls and msg_header_cls to appropriate values.
Parameters: |
|
---|
Generator for all the known messages from the stream.
As long as there is a data remaining in the stream (assumed to be sufficiently long), it unpack the packet header. For each packet header parses the messages contained within.
Read the stream and parse to create an instance of given class.
Assumes cls._make is a method accepting a tuple of unpacked data.
Returns None if the stream is empty and raises an error if unpacking failed.
Parse a message from the stream.
Message header is used to determined the size of the payload and the type of the message contained within it.
Generator for messages found within packet.
Packet header is used to read off the number of messages contained within the packet. Then unpacks message headers one by one and if the message type is recognised, the message is parsed. Otherwise position of the stream is advanced.
Fields used in the XDP data stream packets.
XDP stream headers.
XDP Message header.
Return the size of the payload (message) only.
Customers should not hard code msg sizes in feed handlers; instead the feed handler should use the Msg Size field to determine where the next message in the packet begins. This allows the XDP format to accommodate the different market needs for data content and allow the format to be more agile.
Mapping between known message types and known message classes.
NYSE integrated feed messages.