Error when trying to pull Datastream time series in R

@Shadab Hussain @chavalit_jintamalit Here's the code

tkrs <- tkrTbl[which(tkrTbl$Field=="A12PE"),"RawTicker"]

datatype <- c("A12PE")

x.period <- "D"

mydsws <- dsws$new()

data <- mydsws$timeSeriesRequest(tkrs[1], datatype, startDate = DSStDate,

endDate = eDate,

frequency = x.period)
Error snippet:
1646994658425.png

Tagged:

Best Answer

  • Jirapongse
    Answer ✓

    @soham.sen1

    DatastreamDSWS2R 1.4.1 is quite old. The current version is 1.8.2. The source code is available on GitHub.

    Please upgrade the DatastreamDSWS2R to the new version.


Answers

  • Hi @soham.sen1 ,


    Have you used datastream in R successfully before?

    If yes: have you had any machine update since? Maybe an anty-virus update that might now stop your code to connect to local ports (specifically the eikon one, normally number 9000)?

  • Thanks @jonathan.legrand . Yes, I run this daily and this is the first time I've faced this issue. Am not aware of a machine / anti-virus update; working on the firm's VM- what is the workaround?

  • Hi @soham.sen1 ,


    If your anti-virus is blocking your code access to local ports, then several other Refinitiv APIs would fail too, such as the Eikon Data API (EDAPI) available in R. Are you using this API too? And if so: does it fail? If it does not, then it's unlikely to be an anti-virus issue.

    Failing the above, if the issue is indeed to do with local ports being out of reach for your code because of an anti-virus, a work around would be to run this code in another environment (e.g.: in another machine).

    A solution would be to contact your IT to see if there has indeed been an anti-virus update, and white list local ports (9000).


    In order to check if this is not a permission issue, would you mind checking your credentials by logging into the Datastream navigator?

    http://product.datastream.com/DswsClient/Docs/Default.aspx

  • Hi @jonathan.legrand , I don't use the R API above and I'm able to login to DataStream. This worked fine yesterday but I'm facing the same problem today- so I don't think there's any anti-virus or system update that is causing this issue

  • @soham.sen1

    Please run the sessionInfo() command to check the versions of R and DatastreamDSWS2R.

    1647337804239.png

  • @Jirapongse @jonathan.legrand it's solved now- this was an issue of monthly data limit being maxed out

  • We can check our usage statistics by using the following code.

    myStat <- mydsws$snapshotRequest(instrument = "STATS", 
    datatype = "DS.USERSTATS",
    requestDate = Sys.Date())
    myStat