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)

Tagged:

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @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:

    image

    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.

    image

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

Answers

  • 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

  • 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