For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Can this formula =RHistory("31283H5T8=RRPS","NDA_RAW.Nda_ask_price") translated to get data api.

the specail is the asset is MBS. And the field is all NDA_RAW.Nda =====

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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.

1 Answer

Upvotes
Accepted
18k 21 12 20

Hi @huachong.li

You have to use .NET API.

You can follow this .NET API tutorial.

Here is the sample request code:

request = timeSeries.SetupDataRequest("31283H5T8=RRPS")
     .WithView("NDA_RAW")
     .WithAllFields()
     .WithInterval(CommonInterval.Daily)
     .WithNumberOfPoints(10)
     .OnDataReceived(DataReceivedCallback)
     .OnStatusUpdated(StatusUpdatedCallback)
     .CreateAndSend();

Here is the sample DataReceivedCallback code:

foreach (IData data in chunk.Records.ToList())
 {
     object closeObject;
     DateTime? date = null;
     double? ask = null;
     if (data.TryGetValue("NDA_DATE", out closeObject))
         date = (DateTime)closeObject;
     if (data.TryGetValue("NDA_ASK_PRICE", out closeObject))
         ask = (double)closeObject;
     Console.WriteLine(date + " " + ask);
 }

This is the output:


ahs.png (84.1 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.

Click below to post an Idea Post Idea