Elektron Real-Time

RIC: ESM1 (MARKET_PRICE)

RIC: ESM1m (Level 2)

What code to use?

How to get these two RICs in parallel in one application?

code:

int main(int argc, char* argv[])
{
    EmaString configFile;
    if (argc == 2)
        configFile = argv[1];
 
    try {
        AppClient client;
        OmmConsumer consumer(OmmConsumerConfig(configFile).
            username("MY_USERNAME").
            password("MY_PASSWORD").
            clientId("MY_CLIENT_ID").
            consumerName("Consumer_4"));
        UInt64 handle = consumer.registerClient( ReqMsg().domainType( MMT_MARKET_PRICE ).serviceName( "ELEKTRON_DD" ).name( "ESM1" ), client );
sleep( 60000 );                
    }
    catch ( const OmmException& excp ) {
        cout << excp << endl;
    }
    return 0;
}

Best Answer

  • chavalit-jintamalit
    Answer ✓

    Hi @s61670

    You can make multiple subscriptions.


            UInt64 handle1 = consumer.registerClient( ReqMsg().domainType( MMT_MARKET_PRICE ).serviceName( "ELEKTRON_DD" ).name( "<RIC1>" ), client );

            UInt64 handle2 = consumer.registerClient( ReqMsg().domainType( MMT_MARKET_PRICE ).serviceName( "ELEKTRON_DD" ).name( "<RIC2>" ), client );

            UInt64 handle3 = consumer.registerClient( ReqMsg().domainType( MMT_MARKET_BY_PRICE ).serviceName( "ELEKTRON_DD" ).name( "<RIC1>" ), client );

            UInt64 handle4 = consumer.registerClient( ReqMsg().domainType( MMT_MARKET_BY_PRICE ).serviceName( "ELEKTRON_DD" ).name( "<RIC2>" ), client );


Answers

  • Please give an example code to parallel synchronized in two threads in Elektron Real Time to work with ESM1 (MTT_MARKET_PRICE) and ESM1m (RawLegacyMarketDepth) in one application.

    What is the practice in Electron Real-Time for synchronous parallel Market_Price (quote + trade) and Level 2 (10 levels)?

  • question about the Elektron Real-Time