For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted

Looking for Elektron WebSocket API MRN Example with C++

Hi,

I would like to find more or less the same (if possible 100% equal):

https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN/tree/ERT-in-Cloud

but in C++ so I don't need to translate it line by line and start this application from scratch.

Is it possible to have a WebSocket API MRN Example in C++

(NOT RDP, because RDP doesn't work well :-( ), no TREP I don't have TREP, just WebSocket API MRN consumer in C++ as simple as possible

?

Thanks in advance


PS. It is impossible to find C# example, we have already cleared that up here:

https://community.developers.refinitiv.com/questions/75830/looking-for-elektron-websocket-api-mrn-example-wit.html

So now let's hope to have a C++ example at least.

elektronrefinitiv-realtimeelektron-sdkwebsocketsc++mrn
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.

Hello @oleksandr.kocherha,

Thank you for your participation in the forum.

Is one of the replies below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
AHS

Upvotes
Accepted
25.3k 87 12 25

Hi @oleksandr.kocherha

We don't have any C++ Websocket examples as most of our C++ client developers use the RTSDK - specifically the Enterprise Message API - rather than Websocket API.

EMA Consumer - Request & Decode Machine Readable News

Although the above MRN tutorial connects to an ADS, we do have general EMA examples that can connect to RRTO as demonstrated in the QuickStart - Connect to RRTO

Once you work through the RRTO Quickstart and understand how the code for example 113 works, you can merge the 113 Initialisation + session code with the MRN Tutorial code - to achieve your required example.


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
17.2k 81 39 63

Hi @oleksandr.kocherha,

I noticed you asked a similar question on this thread.

You state you don't have a locally deployed instance (TREP) you can connect into and you state "RDP doesn't work well". Unfortunately, that doesn't leave you with much left. The language isn't the concern but your requirements of where you want to connect to.

The question is, what do you have access to?

If you have a license to stream data, then you may have access to the OMM-based streaming services. With that, you can utilize the RealTime SDK - C/C++.

I think we need to first establish:

  1. What you have access to? What are you licensed to use?
  2. Explain what you mean "RDP doesn't work well"?

thanks.

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

1. I have tried this example in Python https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN/tree/ERT-in-Cloud and it works I discovered the hostname: emea-3-t1.streaming-pricing-api.refinitiv.com


I have access to Refinitiv Real-Time optimized. I need to read only

MRN_STORY and MRN_TRNA. nothing else.


2. I downloaded and tried some example from a), b)

a)https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.DotNet.MRNStoryConsumer
https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.DotNet/blob/master/src/2.%20Content/2.3-News/2.3.06-News-MRN/2.3.06-News-MRN.cs

b) https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.DotNet

and I cannot make it work, it is not stable. Sometimes I can download something but it generates an exception pretty quickly. I have tried to run both from a computer connected directly to internet and behind a proxy.

Examples of errors:




I always use the same credentials for C# RDP and Python and

only this Python example works for me:

https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN/tree/ERT-in-Cloud

So I'm looking for the same in C# or in C++


1617026516217.png (101.0 KiB)
1617026557714.png (158.6 KiB)
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

Another error message I have:


1617026807548.png (105.2 KiB)
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 @oleksandr.kocherha

Access Denied means that you are not licenced for MRN data - please discuss with your Refinitiv Account team to gain access to MRN data.

Upvotes

One more error message I have:


1617026852297.png (177.5 KiB)
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 @oleksandr.kocherha

Please confirm which port you are trying to connect to for the Websocket - it should be port 15000 (and 443 for the Authentication server)

Upvotes

So as you can see, C#/RDP doesn't work well

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

So I'm looking to this

https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN/tree/ERT-in-Cloud

but in C# or if not possible in C++.

I'd like the same simple approach as in Python but in C# (or in C++ if not available in C#)

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.

@oleksandr.kocherha,

There is no C# or C++ equivalent to the above Python example.

Did you try using this example: https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.DotNet/tree/master/src/2.%20Content/2.3-News/2.3.06-News-MRN

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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