question

Upvotes
Accepted
44 6 10 12

Do we have APIs available for C# .NET to get the real time market data?

Hi Team,

I have a .NET application which uses below DLL files to get the real time market data (Rates).

SSLConfig.Interop.dll

SSLRecord.Interop.dll

We are planning to use the latest APIs to get the real time market data.

We did some research and found that we have latest RTSDK APIs which can be used but these APIs are either in C/C++ or JAVA. I didn't find any thing which is related to .NET.

Could you please help me how to move forward from here.

Questions:

Do we have any other APIs which can be used directly used with .NET C# application to get the real time market data (rate)?

Or do we have any other mechanism which is suitable to .NET C# application to gte the real time market data (rate).

Thanks

Pradeep B

elektronrefinitiv-realtimeelektron-sdk.net
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.

20 Answers

Upvote
Accepted
11.5k 16 7 10

Hello @pradeep.badoni

There is the Websocket API for Pricing Streaming and Real-Time Services (aka WebSocket API) that lets developers use any programming language that supports JSON message and WebSocket API to consume real-time data from deployed Refinitiv Real-Time Distribution System.

The WebSocket API resources pages are the following:

You can download the C# example from the following pages:

If you are planning to consume data from Refinitiv Real-Time - Optimized (cloud solution), the examples are the following:

The other community-based.Net API that also supports the WebSocket connection to Refinitiv Real-Time Distribution Systems*, and, to Refinitiv Real-Time - Optimized (cloud solution) is Refinitiv Data Platform Library for .NET. Please find the API Quickstart on this page.


Hope this help.

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
44 6 10 12

Hi @wasin.waeosri


Thanks for quick response. I appreciate that.

I will look into the above links and hoping that it will have all the reading material.

Few additional questions:

Is the WebSocket API only option left for the .NET C# application to get the real time price?

I was looking into the refinitive site and found the below

https://developers.refinitiv.com/en/api-catalog/eikon/-net-apis-for-use-in-custom-applications

If you don't mind, could you please let me know if the above one has any relevance with real time price streaming.

Also, is the below sheet I don't see anything related to WebSocket API (If required, I can log a separate ticket for it)

What is RFA .NET 8.0?


sorry for asking many questions in one go.


Thanks

Pradeep B


1608274207680.png (129.6 KiB)
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
11.5k 16 7 10

Hello @pradeep.badoni

I cannot answer the question regarding .NET APIs for use in custom applications, I strongly suggest you contact your Refnitiv representative to help you.

Regarding the RFA .Net, the API can connect and consume data from Refinitiv Real-Time Distribution System. But the RFA API is a feature-completed API (non-strategic), that why I recommend you check the strategic WebSkcet API.

The WebSocket API is a server-side API based on standard WebSocket and JSON message. So, any programming languages and Websocket frameworks that support JSON message format can connect to it based on protocol/message specification. That is the reason it is not listed in the API compatibility matrix.

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
44 6 10 12

Hi @wasin.waeosri

Thanks for the quick response.

I will spend time on the WebSocket API. Will let you know if I have more questions.

Thanks

Pradeep B

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
7.6k 15 6 9

@pradeep.badoni

You can find more details about RFA.NET from

https://developers.refinitiv.com/en/api-catalog/thomson-reuters-enterprise-platform/robust-foundation-api-raf-net

Only RDC named user can download RFA.NET from the page.

I believe that you are using SFC/SFC COM with the SSL connection type. Actually, you can create a new application using RFA.NET, but you have to re-write the app and use a new RSSL connection. Please note that RFA is now in the maintenance phase, so it will not support a new feature and cannot connect to Refinitiv Real-Time - Optimized, which is a cloud solution.


If you have to open a new project to develop a new app and plan to support a connection to both the local Provider server and the Refinitiv Real-Time - Optimized (cloud solution), Websocket should be a better choice for you.

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
44 6 10 12

Hi @moragodkrit.chumsri_1

Thanks for your input here.

you are correct we were using SFC/SFC COM in our current application.

As you have suggested the RFA.NET is in maintenance phase using WebSocket API should be the best option for us.

If you don't mind need some clarification.

What your other clients which are working/developing application with .NET C# use if they want to go with latest APIs or technology?

Do they all prefer to go with WebSocket API route?

Or we have any other alternative here?

Thanks

Pradeep

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
20.3k 73 10 20

Hi @pradeep.badoni

Some existing customer may well use RFA.NET, however, more recent customers or new developments by existing customers are more likely to use Websocket API.

Some are also exploring the RDP.NET Library which is an ease-of-use layer around the Websocket API and also allows access to both realtime streaming as well as other non-realtime data from the Refinitiv Data Platform.

NOTE that the RDP.NET library is a community-based API and managed as an open-source project - whereas the Websocket API is a fully supported Refinitiv offering.

Going down the RFA.NET route could restrict your future choices in terms of consumption of data from other sources e.g. some organisations are moving away from deployed Refinitiv Realtime Distribution systems towards cloud-based data sources. RFA.NET will not support this kind of move or other future offerings from Refinitiv.

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
7.6k 15 6 9

Hi @pradeep.badoni

Currently, Refinitiv Real-Time SDK does not plan to release the .NET version, so the choice is still RFA.NET and Websocket.


As far as I understand, some clients still use RFA.NET to implement desktop app, publisher app, and windows service app because they still need a configuration for low latency or high throughput with additional configuration provided by RFA. And the app was designed to connecting to their own TREP(rebrand to Refinitiv Real-Time Distribution System) and do not have a plan for the cloud solution now.


Note that RFA.NET is just a C++/CLI wrapper library built on top of RFA C++. Therefore it supports .NET SDK on Windows only.


Some clients have decided to use WebSocket instead because they need a cross-platform solution to implement the .NET Core app/services. They need to fetch a price or data to their system, and they need a choice to develop and deploy the application on a modern cloud solution or implementing microservices.

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
44 6 10 12

Hi Team,

I am still looking into it and not finalized the approach yet so I am keeping it open till I conclude about the approach.

I will let you know if I need more help here

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
44 6 10 12

Hi Team,

One quick question:

Do we have any .NET framework dependency while using the WebSocket API? or it can be used in any lower version of .NET framework like 3.5 or 3.0?

Thanks

Pradeep B

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.

@pradeep.badoni

The Websocket API is not an API or SDK in the commonly understood sense - i.e. there are no Refinitiv specific libraries or DLLs etc to download. If you refer to the Downloads section you will find Sample source code and Documentation only.

In theory, you can use any programming language that supports Websocket connectivity and JSON encoding/decoding to develop an application utilising this Websocket API.

Therefore, as long as your version of .NET lets you create a Websocket connection and parse JSON payloads it should be fine.

Upvotes
44 6 10 12

Hi Team,

Also, Could you please let me know if we have any scalability issues with the WebSocket API if we are dealing with huge number of RIC.

Thanks

Pradeep B

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
20.3k 73 10 20

Hi @pradeep.badoni

In terms of scalability - that is something you would need to test for in your environment, using your list of typical RICs, during peak volatility times and perform your typical payload processing to get an idea of how scalable Websocket API could be.

I say this, because, there are too many factors at play e.g. your network speed and bandwidth, the volatility of your typical instruments, your payload size, just how much processing you do to the payload, the performance of your PC/server etc etc.

I have personally tested the Websocket API with a watchlist size of 3000 instruments and it seemed to work fine during normal market activity periods - but then I was just dumping the payload data to a file and running the example on my normal work laptop.

We may be releasing some performance figures in the (not too near) future. However, these will just show what we managed to achieve without our very specific and detailed software and hardware configuration, watchlist, payload size etc. The figures could and probably will vary from what you may achieve in your particular usage scenario + implementation.

If you do want to try a few basic initial tests of your own, you could use my test client example - which is written in Python - but it should provide some indicative results. Or you could use it as a starting point and amend the code to reflect your particular implementation in .NET.
NOTE: it is purely an educational example

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
44 6 10 12

Hi Team,

Do we have any WebSocket test or demo Server detail which can be used to test the examples provided for WebSockets?

Thanks

Pradeep B

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
44 6 10 12

Hi Team,

I am not very sure if this is the correct place to ask this question. Please let me know if I need to raise it somewhere else.

I was looking into the examples provided at https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api/download for CSharp and I can see that we are using "websocket-sharp.dll" in all the examples.

And as per my understanding, this is a WebSocket wrapper is created CSharp application to ease the development.

Do you have preference of using "websocket-sharp.dll" in CSharp application?

Appreciate your help here.

Thanks

Pradeep B

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.

That is a 3rd party open source dll available on Github - this is the one we have used in our examples.

If you wish to use an alternative you may do so, but if you have any issues consuming data from our servers, you may be asked to recreate the issue using the one we use in our example.

As per the README that comes with the CSharp examples, '

  • This project uses WebSocketSharp to handle the WebSocket protocol, and JSON.NET to read JSON messages. Both packages are retrieved via Visual Studio's NuGet extension; if enabled, they will be downloaded automatically when the build is run.

Upvotes
44 6 10 12

Hi Team,

I didn't the below completely. Could you please elaborate a bit more here.

"If you wish to use an alternative you may do so, but if you have any issues consuming data from our servers, you may be asked to recreate the issue using the one we use in our example."

Thanks

Pradeep B

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.

Hi @pradeep.badoni

You asked in your post 'Do you have preference of using "websocket-sharp.dll" in CSharp application?' and I was trying to address that point.

We are using that particular open source dll and our examples have been tested with that DLL - as it is probably one of the more popular open source C# Websocket implementations out there.

If you have a preference for using some other Websocket C# implementation - then that would be your choice. However, if you had some issue/problem we could not necessarily investigate your issue using your choice of DLL.

Upvotes
44 6 10 12

Hi @umer.nalla,

Thanks for the above detail, that make sense to me. Thanks.

Quick question:

I can see from the Open source Websocket-sharp's doc, it supported .NET Framework 3.5 or later. My understanding is that I can use Websocket-sharp DLL with any CSharp application where the target framework is 3.5 or later (We have couple of client where the solution build in 3.5 .NET Framework).

Could you please share your thoughts,


1610553503018.png (40.6 KiB)
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.

Hi @pradeep.badoni

Unfortunately, I cannot comment on the compatibility of an open source 3rd party library. I recommend you reach out the developer of websocket-sharp and confirm with them.

Upvotes
44 6 10 12

Hi @umer.nalla,

Thanks, sure I will check with the developer.

Do we have any test environment or Websocket server where I can connect and test the examples?

Thanks

Pradeep B

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.

Hi @pradeep.badoni

That is something you will need to discuss ith your internal Market Data team. Confirm they have enabled Websocket connection on your organisation's ADS servers (usually the case) and also confirm which port (default 15000) they are using.

You should be able to connect your Websocket examples to those servers using the existing DACS username used with the SSL app mentioned in your original post.

Some of our examples assume a default service has been configured on your ADS. So, check your MDS team have specified a default Websocket service. If they have not then you will need to explicitly provide the service name in your JSON when making an Item request e.g. below I am explicitly setting it to ELEKTRON_DD when requesting VOD.L

"ID":2,
  "Key":{
    "Name":"VOD.L",
    "Service":"ELEKTRON_DD"
  }

When working through the Websocket API tutorials, please note that the ADS is part of the Refinitiv Real-Time Distribution System.

Hi Team,

Did you get a chance to look into it?

Appreciate your help here.

Thanks

Pradeep B

Upvotes
44 6 10 12

Hi Team,

Very good morning.

WebSocket API

===============

As per the examples provided, we only need the below key parameters when we need to connect to WebSocket API server to get the realtime market price.

--hostname

--port

--user

--password

--app_id

--auth_hostname

--auth_port

Let me know if there is anything else is required.

Thanks

Pradeep B

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.

Hello @pradeep.badoni

Are you aiming to connect the WebSocket client to your local deployed Refinitiv Real-Time (ADS server) or to the Cloud (Refinitiv Real-Time Optimized, formerly known as ERT in Cloud)?


If you try to connect to your local deployed Refinitiv Real-Time, you should check the MarketPriceExample.cs which requires the following parameters:

  • hostname: ADS server hostname.
  • port: ADS server WebSocket port.
  • app_id: Your application id (define by you).
  • user: Your Market Data DACS username.
Upvotes
44 6 10 12

Hi @wasin.waeosri,

Thanks For the above detail.

What additional we required for the "Cloud (Refinitiv Real-Time Optimized, formerly known as ERT in Cloud)" other then the "Refinitiv Real-Time"?

Thanks

Pradeep B

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.

Hello @pradeep.badoni

For Refinitiv Real-Time Optimized connection, you can download the C# example from "Refinitiv Real-Time — Optimized: Websocket API Sample Applications" in the WebSocket API download page or GitHub repository.

I suggest you try the MarketPriceEdpGwServiceDiscoveryExample.cs example. This example requires the following parameters:

  • clientid: Client ID aka AppKey generated using AppGenerator, to use when authenticating to Refinitiv Data Platform.
  • password: Password to use when authenticating to Refinitiv Data Platform
  • user: Username (Machine ID) to use when authenticating to Refinitiv Data Platform

You can see more detail on this Quick Start page. Please contact your Refinitiv representative to help you with the Refinitiv Data Platform credential setup.

Hi @pradeep.badoni

In addition to the QuickStart, I also recommend you work through the WebSocket API Tutorials - they should answer many questions for you and save you time in the long run. They use the Python language, however, most of the learning should also be relevant to any C# example you run or code you eventually write.

Upvotes
44 6 10 12

Hi @umer.nalla,

Sure, noted thanks...

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