Overview
Spectra Adapter uses MOEX configuration file for getting information about feeds.
Currently, B2BITS FIX Antenna C++ supports the following feed types:
<type>Incremental</type> <type>Snapshot</type> <type>Instrument Incremental</type> <type>Instrument Replay</type>
Some configuration requires using of several sources of security definitions. Please use instructions below for configuration of such option.
Customize feeds in Configuration file (configuration.xml)
Add connections
MOEX could provide separate configuration files for different feeds.
The configuration file could be extended with new connections if it requires.
For example, ORDERS-LOG connections can be integrated into an original configuration just by adding a new MarketDataGroup to configuration section:
<configuration type="Test" label="Test System" marketId="MOEX"> <!-- ... --> <MarketDataGroup feedType="FUT-INFO" marketID="F" label="Futures defintion"> <connections> <!-- FUT-INFO feeds --> </connections> </MarketDataGroup> <!-- New section with ORDERS-LOG connections --> <MarketDataGroup feedType="ORDERS-LOG" marketID="D" label="Full orders log"> <connections> <!-- ORDERS-LOG feeds --> </connections> </MarketDataGroup> </configuration>
Use multiple security definition sources
MarketDataGroup could contain as many connections as it is required.
The following configuration block shows how to get two security definitions channels for ORDERS-LOG feed:
Configure feeds in source code
Extra security definition feeds could be configured with Spectra::SpectraApplicationParams::customSecDefFeeds_ parameter:
Spectra::SpectraApplicationParams params; params.customSecDefFeeds_[Spectra::SpectraDataChannel("D", "ORDERS-LOG")].push_back(Spectra::SpectraDataChannel("F", "FUT-INFO")); params.customSecDefFeeds_[Spectra::SpectraDataChannel("D", "ORDERS-LOG")].push_back(Spectra::SpectraDataChannel("O", "OPT-INFO")); params.customSecDefFeeds_[Spectra::SpectraDataChannel("D", "ORDERS-LOG")].push_back(Spectra::SpectraDataChannel("S", "SPOT-INFO"));
How to get MDEntryTime with nano second precision.
move to "How to" for MOEX Spectra MD Adapter
MOEX Spectra uses custom UTCTimeOnly, UTCTimestamp format in FAST messages.
Find more details in official documentation: http://ftp.moex.com/pub/FAST/Spectra e.g. http://ftp.moex.com/pub/FAST/Spectra/docs/spectra_fastgate_en.pdf
Example:
How MOEX Spectra Market Data Adapter reacts on Sequence Reset message
move to How to use Spectra Application Listener callbacks and leave a link to it there: Steps to migrate from the version 1.3.2 of Spectra adapter to version 1.4.1
The new type of messages (a message 'Sequence Reset') was introduced in Spectra FAST protocol specification v 1.4.2.
MOEX Spectra Market Data Adapter handles Sequence Reset message in the following way:
- A Sequence Reset message received in Incremental feed initiates recovery mechanism for all subscribed instruments. In this case, MOEX Spectra Market Data Adapter fires OnRecoveryStarted (link) and the callback OnBookReset (link).
- Sequence filtering mechanism isn't applied to Sequence Reset messages. Therefore, OnRecoveryStarted and OnBookReset would be fired for each sequence reset message and even more than once due to A-B arbitrage.
Note
Recovery mechanism doesn't work properly in trade feeds, because of this, the trades will be available only since the application launch, i.e. there is no ability to request historical trades.