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

    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.

Answers