Note: This problem can only be replicated if one has a Thomson Reuters Datastream login
I am attempting to request data from Thomson Reuters Datastream using RDatastream::ds
but cannot successfully request data. It seems that the problem has got to do with the specification of my login credentials in the 'user' argument of the ds
function.
How do I specify the 'user' argument correctly to make requests?
This is an example unsuccessful request I have attempted, copied straight from the package documentation:
ds(user, c("U:IBM", "U:MMM"), c("P", "PO"), "2012-07-20")
This is the subsequent error:
Error in apply(records, 2, function(record) { :
dim(X) must have a positive length
So far I have:
a) user <- list(username= "my username", password="my password")
b) user <- list(username= "DS: my username", password="my password")
The second specification is attempted because the documentation examples append 'DS:'
at the start of the username. Both of the user specifications give the same aforementioned error.
Namely, I have tried appending 'DS:'
to username and replacing @
in the username with @
. Notably, my username is an email package but author suggested that the username should be ~7 alphanumeric characters. Though I am hoping to get work around my issue making requests with ds
without having to request an alternative username from Thomson Reuters if possible.
Lastly, I am able to make successfully make requests using the the Thomson Reuters desktop app and Excel add in, where I use the same login credentials that I am feeding into the ds
package.
This is how to get requests working.
When you have a Thomson Reuters subscription, there are two sets of user details that you receive.
THOMSON REUTERS EIKON (Which has an email username id, and a password)
DATASTREAM FOR OFFICE (Which has a non-email, alpha numeric username id and a separate password)
In order to make requests in the RDatastream library, use the second set of credentials in the user argument of RDatastream::DS
, appending "DS:" to the start of user name.
As the first set of credentials can be used to make Datastream requests via the Thomson Reuters app as well as its Excel plug in, it is easy to overlook that there are another set of login credentials that can be used.