question

Upvotes
Accepted
3 1 3 6

Can I get bid and ask prices in a single ITimeSeriesDataService.SetupDataRequest?

Based on the code in the `DataApiUsageExampleTimeSeries` I am building a request like this:

            request = timeSeries.SetupDataRequest(ric)
                .WithView("BID")
                .WithAllFields()
                .WithInterval(CommonInterval.Daily)
                .From(from)
                .To(to)
                .OnDataReceived((dc) => { tcs.SetResult(dc); })
                .CreateAndSend();

Is it possible to also get ask prices in the same request and if yes, how do I get them out of the response?

eikonapic#time-serieseikon-app-studio
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.

1 Answer

· Write an Answer
Upvotes
Accepted
4.6k 26 7 22

@robert.hardy

There is a way to do this, you need to specify a different view in the WithView() function:

      request = timeSeries.SetupDataRequest("EUR=")
                .WithView("NDA_RAW")
                .WithAdjustedPrice(true)
                .WithAllFields()
                .WithInterval(CommonInterval.Daily)
                .WithNumberOfPoints(10)
                .OnDataReceived(DataReceivedCallback)
                .CreateAndSend();

Here is a piece from the tutorials explaining the views:

Every entry has a set of Views, or field definitions, that specify which data points are collected and stored. The views are largely tailored to a specific asset class of the financial instruments, but by default there will be:

  • Common or default view, that will carry a timestamp and the Open-High-Low-Close information for a default field (e.g. Trade for equities, Bid quote for the OTC instruments, etc.);
  • Raw view, containing all of the fields stored in the database for the selected instrument.

Supported intervals can be divided into three groups:

  • Evenly spaced intra-day: 1, 5, 10, 30 and 60 minutes;
  • Unevenly spaced intra-day: Tick, Quotes, Trades, Trades And Quotes;
  • Evenly spaced inter-day: Daily, Weekly, Monthly, Quarterly and Yearly.

You can get more information on this in the tutorial.

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.