question

Upvotes
Accepted
31 0 0 2

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

datastream-apir
1646994658425.png (15.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
56.3k 145 45 65

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


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
2.6k 19 2 3

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)?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
31 0 0 2

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?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
2.6k 19 2 3

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
31 0 0 2

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
56.3k 145 45 65

@soham.sen1

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

1647337804239.png


1647337804239.png (59.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
31 0 0 2

sessioninfo.png (30.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
31 0 0 2

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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

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