DSWS REST API
I'm attaching a screenshot but also here's the full details of the issue as well:
We're using the DSWS REST API. While trying to troubleshoot in case it was some of our code causing the issue, we tried multiple alternatives.
We tried the Python package https://github.com/datastreamapi/DatastreamPy as mentioned on https://developers.lseg.com/en/api-catalog/eikon/datastream-web-service, without any luck, resulting in the same error.
We also tried pure manual HTTPS requests to the same REST API specifically
1. Get auth token: https://product.datastream.com/DSWSClient/V1/DSService.svc/rest/Token?username=...&password=...
2. Get data using the above auth token https://product.datastream.com/DSWSClient/V1/DSService.svc/rest/Data?token=...&instrument=VOD&datatypes=PL%2cPH&datekind=TimeSeries&start=-30D&end=-25D&freq=D
The (1) auth token is returned successfully (HTTP code 200), but (2) fails to return the data and instead returns HTTP code 401 with the following response:
{
"Code": "InvalidCredentials",
"Message": "User ZEID052 access temporarily suspended. Access suspended whilst investigating end user . Please contact your LSEG representative",
"SubCode": null
}
and some headers of a sample problematic reponse:
X-Ds-Server: DSWP12
Date: Fri, 26 Jul 2024 16:44:46 GMT-18m 3s
X-DS-VIP: DS_Web_Prod_EXT-443
X-DS-TimeTaken: 3 ms
X-DS-URID: 1722012287719287366120319
Best Answer
-
Thank you for reaching out to us.
According to the error message, your account has been suspended.
You can contact the Datastream Web Service support team directly via MyAccount to verify what the problem is.
0
Answers
-
Hi @RALPHPAOLO.NAVARRO , may I ask: which data field were you after? I'm asking because on my end I can make things like this work:
import DatastreamPy as DSWS
# We can use our Datastream Web Socket (DSWS) API keys that allows us to be identified by
# Refinitiv's back-end services and enables us to request (and fetch) data:
# Credentials are placed in a text file so that it may be used in this code without showing it itself.
(DSWS_username, DSWS_password) = (
open("Datastream_username.txt","r"),
open("Datastream_password.txt","r"))
ds = DSWS.Datastream(
username = str(DSWS_username.read()),
password = str(DSWS_password.read()))
# It is best to close the files we opened in order to make sure that we don't stop any other
# services/programs from accessing them if they need to.
DSWS_username.close()
DSWS_password.close()
# # Alternatively one can use the following:
# import getpass
# dsusername = input()
# dspassword = getpass.getpass()
# ds = DSWS.Datastream(username = dsusername, password = dspassword)
df = ds.get_data(
"VOD",
['PL'],
start = '2013-08-31',
kind = 1)0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛