Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Currently, B2BITS FIX Antenna cC++ support supports the following feed types:


Some configuration requires using of several sources of security definitions, how to configure such option is described below. Please use instructions below for configuration of such option.

Customize feeds in Configuration file (configuration.xml)

Add connections

Moex MOEX could provide separate configuration files for different feeds.


Code Block
void ConvertTimeToStr(System::u64 entry, std::string* strTime)
    static std::size_t const TIME_LENGTH = sizeof( "HHMMSSsssssssss" ) - 1;

    std::stringstream stream;
    stream << entry; // convert u64 to std::string.
    std::string time(stream.str());
    if (TIME_LENGTH > time.size())
        time.insert(0, TIME_LENGTH - time.size(), '0');

    strTime->assign(time, 0, 2); // HH
    strTime->append( ":");
    strTime->append(time, 2, 2); // MM
    strTime->append( ":");
    strTime->append(time, 4, 2); // SS
    strTime->append( ".");
    strTime->append(time, 6, 9); // sssssssss

bool InstrumentHandler::onIncrement( Spectra::SpectraSubscriptionItem const& subsItem, Engine::FIXMessage const* const* msgs, size_t incrementsCount )
	// ...
    for( ; i < incrementsCount; ++i ) {
	    const Engine::FIXGroup& gr = msgs[i].getAsGroup( FIXFields::NoMDEntries );
	    for( int j = 0; j < gr.size(); ++j ) {
		    const Engine::TagValue& entry = *gr.getEntry(j);
			std::string timeNs;
			if (entry.hasValue(FIXFields::MDEntryTime))
				ConvertTimeToStr(entry.getAsUInt64(FIXFields::MDEntryTime), &timeNs);
			// ..
	// ...

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:

  1. A Sequence Reset message received in


  1. Incremental feed


  1. initiates recovery mechanism for all subscribed instruments


  1. . In this case, MOEX Spectra Market Data Adapter fires OnRecoveryStarted (link) and the callback OnBookReset (link)


  1. .
  2. Sequence filtering mechanism isn't applied to Sequence Reset messages


  1. . Therefore, OnRecoveryStarted and OnBookReset would be fired for each sequence reset message and even more than once due to A-B arbitrage. 

Sequence reset messages causing a recovery in Trades feeds but recovery is unable to be performed there because TCP Recovery mechanism doesn't work properly in the current version Spectra Adaptertrade feeds, because of this, the trades will be available only since the application launch, i.e. there is no ability to request historical trades.