Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
166 stars 75 forks source link

bdh Not a valid HistoricalDataResponse & Choice sub-element not found for name 'fieldData' #263

Closed hakki13 closed 6 years ago

hakki13 commented 6 years ago

Hi, following code gives me different errors when I'm running it:

options <- c("periodicityAdjustment" = "CALENDAR", "periodicitySelection" = "MONTHLY", currency="EUR")
startDate = as.Date("2017-12-31")
flds <- c("PX_LAST", "VOLUME")

bdh("/ISIN/AEDFXA0M6V00", fields = flds, start.date = startDate, options = options)

Errors are:

Error in bdh_Impl(con, securities, fields, start.date, end.date, options,  : 
  Choice sub-element not found for name 'fieldData'.

and

Error in bdh_Impl(con, securities, fields, start.date, end.date, options,  : 
  Not a valid HistoricalDataResponse.

Could it be that my options currency="EUR" doesn't work with VOLUME field? Is that meant to be that way, as in excel it will spit out both those fields or do I have user error? If I take VOLUME away, code works.

johnlaing commented 6 years ago

I don't get an error here, but I also don't get any data. Possibly you are using an older version of the library?

I am closing for now, please feel free to reopen if the problem persists with a current release.