question

Upvotes
Accepted
1 0 1 1

What is the corresponding RIC for the page "TRESORTEC10" to fetch all the date and corresponding values in .Net? When I use the RIC "TRESORTEC10=AFTP", it fetches only 5 values. How to fetch the full list of date and values?

#contentricspage
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
18.6k 85 39 63

Hi @rathi.r

To retrieve your data in .Net using the Data Library for .Net, I would follow these steps:

  1. Download the .Net Example package from GitHub
  2. To test against your desktop (Workspace or Eikon), you can:
    • Open the Session.cs file and change to: SessionTypeEnum.DESKTOP
    • Refer to Quick Start for more details
  3. Try this historical Pricing example to make sure you can retrieve data

If you have succeeded in the above steps, you should be able to do this:

 var data = Summaries.Definition("TRESORTEC10=AFTP").Interval(Summaries.Interval.P1D)
                                                    .Fields("TRDPRC_1")
                                                    .Start("2024-02-01")
                                                    .End("2024-02-23")
                                                    .GetData();

Common.DisplayTable("Your data", data);

1708694581419.png


1708694581419.png (14.3 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 @nick.zincone,

I tried the steps mentioned, but getting the below error.
"Data services unavailable. Session is closed."

1708939263062.png

1708939263062.png (239.4 KiB)
Hi @rathi.r

It is unclear whether you had any success using the example application. Looking at your code, you are opening your session before you are trying to retrieve data - you on,y need to open your session once, at the beginning of you application. Also, you need to confirm you had success in opening the session. The example application is simply a demonstration, not intended it to insert as-is in your production code. Please review the learning material and further examples. For now, please demonstrate the issue within the example application so we can better guide. The error message indicates the session did not open and thus you can’t retrieve data with a closed session

Hi @nick.zincone,


I tried running the dotnet examples as well in the same order provided, I was getting the same error and the connection is closed.

Please find the dotnet example snippet below,


using ISession session = Sessions.GetSession();

// Open the session

session.Open();

// Retrieve Intraday Summaries with PT1M (5-minute interval). Specify to capture only 2 rows.

var response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.PT5M)

.Fields("DATE_TIME", "OPEN_BID", "OPEN_ASK", "BID", "ASK",

"BID_LOW_1", "ASK_LOW_1", "BID_HIGH_1", "ASK_HIGH_1")

.Count(2)

.GetData();

Common.DisplayTable("Historical Intraday Summaries", response);


1708966843710.png


1708966843710.png (182.5 KiB)
Show more comments
Upvotes
82.3k 277 53 77

@rathi.r

Thank you for reaching out to us.

This developer forum is for questions on and general discussions of Refinitiv APIs.

For data content or RIC questions, the best and most efficient way to receive an answer is to open a content-related inquiry via MyRefinitiv, or to call the Refinitiv Help Desk directly.

The Helpdesk will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.


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, we reached refinitiv team (Case 13171450) and they redirected us to dev community

Upvotes
14.9k 31 5 10

Hi @rathi.r ,

Is this what you're looking for? The code below is for Python

import refinitiv.data as rd
rd.open_session()

rd.get_history(['TRESORTEC10=AFTP'], start = '2023-10-01', end = '2024-02-20')

1708579179383.png

Regarding the .NET historical pricing tutorials here, the code could be like below

response = Summaries.Definition("TRESORTEC10=AFTP").Interval(Summaries.Interval.P1D)
                                        .Fields("TRDPRC_1
                                        .GetData();

Could you please try and let me know if this is what you're looking for. Hope this helps


1708579179383.png (22.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.

Hi @raksina.samasiri , Thanks for the comment


response = Summaries.Definition("TRESORTEC10=AFTP").Interval(Summaries.Interval.P1D)

.Fields("TRDPRC_1")

.GetData();


In the above code, Summaries is not detected. Do we need to add any nuget package explicitly.

Upvotes
82.3k 277 53 77

@rathi.r

I checked the case and found that you may need to retrieve the required data from the historical service instead. The products that can provide historical data are desktop applications (Refinitv Workspace or Eikon), Refinitiv Data Platform, Refinitiv Knowledge Direct, and LSEG Tick History.

The RD.NET library can retrieve historical data either from desktop applications or Refinitiv Data Platform.

Therefore, to use the RD.NET library, you need to have:

  • The desktop application (Eikon or Refinitiv Workspace) running on the same machine and your Eikon or Workspace account must support the API feature
  • Or, you need to have the Refinitiv Data Platform account (https://api.refinitiv.com/)

For more information, please refer to the Quick Start.

Yes, the library is available on Nuget.

1708683979138.pngThe examples are on GitHub.

If this doesn't work, please confirm the product that you are using.


1708683979138.png (68.3 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
18.6k 85 39 63

Hi @rathi.r

Looking at your original question, it is unclear where you want to retrieve the data. If you have a desktop account, you have to make sure LSEG Workspace is running before you attempt to run your .Net application. If you have a platform account, LSEG Workspace has nothing to do with your solution. I would recommend you go through the Quick Start section as this will provide the step by step instructions to ensure you have connectivity.

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.

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.