Error using Datastream in R

soham.sen1
soham.sen1 Newcomer
edited November 2024 in Datastream

addpkg('DatastreamDSWS2R', '1.9.7')

library("DatastreamDSWS2R")

options(Datastream.Username = " ZXXX000")
options(Datastream.Password = " PASSWORD123")
mydsws <- dsws$new()
Error in rjson::fromJSON(myTokenResponse) : no data to parse

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    edited November 2024

    @soham.sen1

    Thank you for reaching out to us.

    DatastreamDSWS2R is a third party library which isn't owned by LSEG. You may need to contact the owner to verify what the problem is.

    You can check your credentials by using the TEST REST Service website.

    image.png

    Otherwise, you can use the following R code.

    library(httr)
    DatastreamUsername <- "ZXXX000"
    DatastreamPassword <- "PASSWORD123"
    token_url <- paste("http://product.datastream.com/DSWSClient/V1/DSService.svc/rest/Token?username=", DatastreamUsername, "&password=", DatastreamPassword, sep="") test <- httr::GET(token_url, httr::timeout(300)) print(test) print(httr::content(test, as = "parsed"))
  • Thanks!

    1. we earlier received support for Datastream via the LSEG/Eikon support teams. Has that changed? Who do we reach out to now?
    2. How do I interpret the below response when i execute the instructions you shared to test DSWS?
      image.png
  • Jirapongse
    Jirapongse ✭✭✭✭✭

    The result indicated that the credentials are valid. DatastreamDSWS2R is a third party library which isn't owned by LSEG. You may need to contact the owner to verify what the problem is.

    Otherwise, please try the provided R code.