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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 1 1

Retrieving full orderbook data via Data API (C# .Net)

I'm new to this, but I'm writing a custom app (in C# .Net, but potentially C++) to retrieve market data using the Data API. I can get price data, but I can't find out how to get full order book data - are there any examples of this anywhere please?

I could potentially use the RFA API (either C# or C++), but I can't find any examples of this either?

Thanks

elektronrefinitiv-realtimeelektron-sdkdataorder-book
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 @julian.faber,

What API are you using to get price data?

The Data API in C# - ThomsonReuters.Desktop.SDK.DataAccess, notably Realtime.SetupDataSubscription(...).That replies with an IRealtimeUpdateDictionary object containing whatever fields have been updated, from LAST, ASK, BID, BIDSIZE, ASKSIZE, TRDTIM_1, ASK_TIME1, BID_TIME1, TRDVOL_1.

I found a python API that would give BEST_BID1/_ASK1, BEST_BID2/_ASK2 etc, which seems like the sort of thing I need, but not a C# or C++ version.

Upvotes
Accepted
24.9k 87 10 22

Hi @julian.faber

If you want to consume Full Depth orderbook data, your best route would be to use one of our strategic higher performance streaming APIs such as Elektron Message API

RFA is now considered feature complete / legacy mode and therefore not recommended for new developments.

However, if you can only use C# then you could consider the Websocket API or the alpha version of our upcoming Refinitiv Data Platform library

You can read more about RDP Library here and here and the Websocket API here

If at all possible, the EMA C++ route would be the recommended route to take - as it is best suited to the higher level of data throughput you may experience when consuming full order book for the more volatile instruments. If however, you will only be processing a limited number of Instruments e.g. for a display app and C# is much preferred, then you can consider using the Websocket or RDP Library.

Just to be clear you will need access to a TREP server or ERT in Cloud account in order to consume full depth order book. I believe there is some limited Orderbook data available on Eikon as well - hopefully, one of my Eikon colleagues can advise on that.

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.

Great, thanks @umer.nalla, I'll check out the Elektron Message API - I'd rather do this kind of thing in C++ anyway!

Hi @julian.faber

Good choice - you will find further links at the end of the article I linked above.

You may note there are references to RFA Level 2 tutorials as well - but I would advise against using it for any new development.

@umer.nalla : actually, having been looking through the examples I see server side examples. Why are there server side examples, isn't the point that we connect to your servers? Obviously I want to be able to connect to the Refinitiv servers for market and order book data, initially CME metals. Where do I find the server details to connect to for this?

Thanks, Julian

Upvotes
24.9k 87 10 22

Hi @julian.faber

The examples I referred you to are both Consumer examples - not server-side examples.

In order to consume the Full order book realtime data, you will need to have access to either

  • an ADS server which your internal Market Data team would be able to advise the details of OR
  • an ERT in Cloud account which includes a 'Machine ID' - this would have been in a 'Welcome to Refinitiv - Your New Account' email . The Machine ID would look something like GE-A-00215123-4-1234. The Welcome email would have also had a link to set a password etc.

If you are unable to access either of the above - e.g. because you only have access to Eikon desktop - you can reach out to your Refinitiv account team or I can ask them to contact you directly.

For first time EMA users, we always recommend they use the relevant Quick Start to validate their EMA installation and login/connectivity details:

Quick Start for ADS server connection

Quick Start for ERT in Cloud connection

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.