question

Upvotes
Accepted
1 0 2 3

i am trying to use Eikon Desktop API to access TimeSeries Data based on Example DataApiUsageExampleTimeseriesData, since i have multiple rics to send, how can I wait one data request finish then to send another data request?

eikoneikon-data-apieikon-com-api
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
4.6k 26 7 22

There are several ways in which you can achieve this:

+ Create your own bulk request class; You can use the attached file as an example:bulkdatarequestcs.txt . The initialisation routine will look like this:

     new BulkDataRequestSetup()

             .WithRics("LCOc1", ".SPX")

             .WithFields("CLOSE", "TIMESTAMP")

             .WithInterval(new Interval(IntervalType.Daily, 1))

             .WithNumberOfPoints(100)

             .OnDataReceived(DataReceivedCallback)

             .OnStatusUpdated(StatusUpdatedCallback)

             .CreateAndSend();

+ Reuse the same request object; after you received (chunk.isLast == true) in your DataReceivedCallback event, you can set up and send the next request, i.e. chain them.


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 0 2 3

Thank Zhenya~@Zhenya Kovalyov

I tried to access several Rics with your reference code, but I only get the first one "AUD=" rics' 24 ticks' data back, then the program stopped.

Would you please help to check why? the following is my code.

BulkDataRequestSettings RequestSettings = new BulkDataRequestSettings();
List<String> field_list = new List<string>();
List<String> rics_list = new List<string>();
RequestSettings.View = "BID";
rics_list.Add("AUD=");
rics_list.Add("AUDON =");
rics_list.Add("AUDSW =");
field_list.Add("CLOSE");
field_list.Add("TIMESTAMP");
RequestSettings.Rics = rics_list;
RequestSettings.Fields = field_list;
RequestSettings.From = new DateTime(2016, 9, 7, 15, 0, 0);
RequestSettings.To = new DateTime(2016, 9, 8, 15, 0, 0);
RequestSettings.Interval= CommonInterval.Intraday60Minutes;
RequestSettings.TimeZone = TimezoneType.GMT;
BulkDataRequest Request = new BulkDataRequest(RequestSettings);
Request.Send();
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
87 7 8 13

get rid of the space preceeding the equal sign, e.g., "AUDON=" not AUDON ="

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 0 0 0

What should I do if I want get multiple views at the same time, i.e. BID and ASK ?

Is it the same way as @Zhenya Kovalyov suggested?

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.

If you just want close bid and ask, you can get them both from the view named NDA_RAW. But if you need open, high, low, close for bid and ask, you have to retrieve them separately for bid and ask, as the API only allows to query one view at a time.

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.