Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Datastream /
avatar image
Question by Michael · Nov 26, 2019 at 11:24 AM · datastream-apidsws-apirtoken

Package DatastreamDSWS2R error requesting acces Token

Hello,

I am trying to download data from Datastream directly in R using

require(devtools)
install_github("CharlesCara/DatastreamDSWS2R")

This works so far.

next I saved my username and password (those credential I use for Refinitive) and entered

mydsws <- dsws$new(username=DatastreamUsername,password=DatastreamPassword)

This throws the following error

> mydsws <- dsws$new(username=DatastreamUsername,password=DatastreamPassword)
...retrying
...retrying
...retrying
...retrying
Error in .self$.loadToken() : 
  Error requesting access Token.  Error message was:
Timeout was reached: [product.datastream.com] Connection timed out after 10001 milliseconds

Do you know why or do you have a solution for me?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by wasin.w · Dec 11, 2019 at 08:59 AM

Hi,

Based on all given error messages, it seems to me that your machine cannot connect to DataStream server. I suggest you contact your network or IT team to verify a connection problem on your side.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Jirapongse · Nov 27, 2019 at 06:49 AM

@Michael

From the error, the request was timed out. You can try the following code to directly send a request to the server.

library(httr)
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))
test
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by Michael · Nov 29, 2019 at 09:42 AM

@jirapongse.phuriphanvichai

Thank you very much for your answer. However this seems not to fix the problem as it still throws an timeout error.

Comment

People who like this

0 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Jirapongse ♦♦ · Nov 29, 2019 at 09:56 AM 0
Share

It could be a network issue. You need to contact your network team to verify the problem. If you need to connect through a proxy, you can use the following command to set the http_proxy.

Sys.setenv(http_proxy="http://127.0.0.1:8080")
DatastreamUsername <- "username"
DatastreamPassword <- "password"
mydsws <- dsws$new(username=DatastreamUsername, password=DatastreamPassword)


avatar image
Michael Jirapongse ♦♦ · Nov 29, 2019 at 10:00 AM 0
Share

I tried it and this produced a new error:

Error in .self$.loadToken() : 
  Error requesting access Token.  Error message was:
Failed to connect to 127.0.0.1 port 8080: Connection refused
avatar image
REFINITIV
Jirapongse ♦♦ Michael · Nov 29, 2019 at 10:05 AM 0
Share

127.0.0.1:8080 is my test proxy. You should contact the network or IT team to verify the problem.

avatar image
Answer by Michael · Dec 04, 2019 at 07:52 AM

Hello @zoya.farberov, I tried using my local proxy but now I am encountering a new error which is:

Client error: (403) Forbidden

Since I am not an IT specialist, I am kind of stuck at this point. Do you know a solution for that? Best regards Michael

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Received this error when trying to run any requests on DatastreamDSWS2R

Installation error DatastreamDSWS2R in R / There is no package called 'DatastreamDSWS2R'

How to use Data Type "WC07015 - Inactive date (Security)" output

Token Request : Unexpected error

I am trying to use the Datastream API in R (using the R package DatastreamDSWS2R), but it is giving me a 403 error.

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges