question

Upvotes
Accepted
89 2 6 9

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;
}
elektronrefinitiv-realtimeelektron-sdk
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
18k 21 12 20

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 );


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
89 2 6 9

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)?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea