question

Upvotes
Accepted
3 0 1 2

C++ API to connect to Refinitiv Real Time Optimized

Hello,

I would like to know what API's are available for a C++ application to connect to Refinitiv Real Time Optimized to fetch data from cloud? I came across RTSDK for C/C++ and EMA, could you please let me know if these are the correct API's I am looking at or are there any other ways to fetch data from cloud from a C++ application.


Is there any available API which works similar to RFA to connect to Refinitiv Real Time Optimized?

Your help is much appreciated.

Thank You.

ema-apic++refinitiv-realtime-optimisedrefinitiv-realtime-sdk
icon clock
10 |1500

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

Upvotes
Accepted
31.8k 38 11 19

Hello @hdiniz ,

RTSDK is the recommended way to access Refinitiv Real Time Optimized using C/C++.

RTSDK Enterprise Message API(EMA) is a higher level API, message tier API that is high performance and is the preferred approach for the majority of the use cases.

RTSDK Enterprise Transport API (ETA) is a lower level, transport level API. EMA is built on top of ETA, with ETA requiring significantly more coding effort but also allowing the greatest flexibility on the implementation.

Please also find article Choosing a Refinitiv Real-time Streaming API with detailed suggestions on selecting streaming API that is most attuned with your organization's requirements.

icon clock
10 |1500

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

Upvote
16.8k 31 9 12

Hello @hdiniz

While my colleague has provided clear information about the C++ API for RTO, you can find more RTSDK C++ detail from the following resources:

We have a ready-to-use EC2 AMI on AWS that contains all SDK for the RTO (including the RTSDK C++) too, you can find more detail on this How to Setup Refinitiv's Amazon EC2 Machine Image for Refinitiv Real-Time - Optimized article.

icon clock
10 |1500

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

Upvotes
3 0 1 2

@zoya faberov @wasin.w Thank you for the information provided, this is exactly what I was looking for.

icon clock
10 |1500

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

Upvotes
3 0 1 2

@zoya faberov @wasin.w are there any C++ EMA sample programs to subscribe to a particular currency by specifying RIC? e.g. EUR= to get feeds for EUR.

Is the currency list configurable? If so could you please specify the config field and name of configuration file.

icon clock
10 |1500

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

Upvote
16.8k 31 9 12

Hello @hdiniz

There are two examples for the RTO connection, the EMA Cons113, and Cons450 examples. You can find more detail about how to run the Cons113 example from the "Cons113 (RTO test)" section of the RTSDK C++ Quick Start page. Please note that you can add the "-itemName" parameter to specify the RIC you want to subscribe to.

# Windows example
Cons113 -username <Machine-ID> -password <RTO Password> -clientId <App-Key> -itemName EUR=

Or

Cons450 -username <Machine-ID> -password <RTO Password> -clientId <App-Key> -itemName EUR=

Note: Cons450 is the recommended example.

I also recommend you check the RTSDK C++ tutorials page that contains a step-by-step guide for using the EMA C++ to connect and consume data from Refinitiv Real-Time.


icon clock
10 |1500

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

@wasin.w Thank you. -itemName is specified as an option with the binary. Can this be configured in EmaConfig.xml? itemName or itemList?


Also could you please let me know what is the data format of market feeds with RTO?

what consumer name should be?
Upvote
24.9k 87 10 22

Hi @hdiniz

Please refer to the source code of the above examples - e.g.

consumer.registerClient( ReqMsg().serviceName( "ELEKTRON_DD" ).name( itemName ) 

where itemName is defaulted to "IBM.N" and can be overridden on the command line.

I also recommend you work through the basic Tutorials which should increase your understanding of how to use EMA. Tutorials | Refinitiv Developers

Unfortunately, I don't understand the question 'Also could you please let me know what is the data format of market feeds with RTO? ' please explain in more detail what you mean.

I should also add that if you wish to request multiple instruments; you can either call registerClient repeatedly with a unique RIC code each time OR use a Batch request as demonstrated in the example 370_MP_Batch - for example below it requests IBM.N and TRI.N

UInt64 handle = consumer.registerClient( ReqMsg().serviceName( "ELEKTRON_DD" )
.payload( ElementList().addArray( ENAME_BATCH_ITEM_LIST, 
OmmArray()
.addAscii( "TRI.N" ).addAscii( "IBM.N" ).complete() ).complete() ), 
client ); 
icon clock
10 |1500

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

@umer.nalla what I meant by data format is the format in which market data is sent from Refinitiv to the subscribing application. e.g. encrypted xml, json etc.

As per my understanding logging can be enabled which would log all incoming feeds into a file, what format of the log file would it be?

Hello @hdiniz

The RTO supports two data formats:

  • WebSocket: JSON string messages
  • RSSL: Refinitiv proprietary TCP connection, the data is encoded in binary format. This is the same data format as the RFA OMM interface (RSSL connection).

The Cons113 and Cons450 examples use the RSSL data format. The API just logs data to a file (or STDOUT) in XML format. You can find more detail in the XML trace section of the Enterprise Message API (EMA) - Configuration Overview article.

Upvotes
3 0 0 3

AppClient client;



// create OMM consumer


OmmConsumer consumer(


OmmConsumerConfig()


.host( "ADS:14002" )


.username( "user1" )


);


what should be the IP/username for my config,

icon clock
10 |1500

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

Hi @skumar

I can see your question was answered in your other post - Refinitiv Real-Time -- Optimized - Forum | Refinitiv Developer Community .

Whilst you can specify an RTO endpoint and port in the source code, we recommend you use Service Discovery as demonstrated in examples 113 and 450.

I suspect the code above is from a simpler example such as 100 - which is not coded to support RTO connections.