Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

eikonapir cannot specifiy start and end date in parameter field

Hi. I am using the eikonapir pacakge to pull data. I am trying to specify a start and end date in the get_data function in the parameter field but it isnt working: eikonapir::get_data(instruments = list("IBM", "GOOG.O", "MSFT.O"), fields = list("TR.AvgDailyVolume5D", "TR.AvgDailyVolume10Day"), parameters = list(Frq = "D", SDate = startdate, EDate = enddate), raw_output = TRUE)

eikon-data-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.

1 Answer

· Write an Answer
Upvote
Accepted
78.2k 246 52 72

@justin.sage

The code looks like this:

startdate = "2022-06-01"
enddate = "2022-06-23"
get_data(instruments = list("IBM", "GOOG.O", "MSFT.O"), 
         fields = list("TR.AvgDailyVolume5D", "TR.AvgDailyVolume10Day"), 
         parameters = list("Frq" = "D", "SDate" = startdate, "EDate" = enddate), raw_output = FALSE)

The output is:

1655982852274.png

However, I checked with Data Item Browser and found that the "TR.AvgDailyVolume5D" and "TR.AvgDailyVolume10Day" fields don't support time-series data. Therefore, these fields don't support the "Frq", "SDate", and "EData" parameters.

1655982950195.png

You can use Data Item Browser to search for available fields and supported parameters.


1655982852274.png (31.7 KiB)
1655982950195.png (31.2 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. Thanks for this. I entered PR.PriceClose as the field and the data gets returned but without a date column. Do I need to specify an additional parameter to get the dates out as well?

@justin.sage

You can add .date to the TR.PriceClose field to get date of the price close.

TR.PriceClose.date

1656037181139.png

1656037181139.png (55.0 KiB)

hi @justin.sage ,

You can use "TR.PriceClose.date" to get the date of each row.

As mentioned by my colleague, Data Item Browser (DIB) can be used to search for the supported parameters of each field. Here's the video of introduction to DIB

1656039244093.png

Hope this helps

1656039244093.png (76.7 KiB)

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.