DSWS guide & other questions
Hi team, a few questions regarding DSWS:
1. Which python package is the official and will be continue supported one, DatastreamDSWS or pydatastream?
2. I tried (DatastreamDSWS) df = ds.get_data(tickers='VOD,BARC', fields=['PH','PL'], start= '-2D', retName = True) but got error below:
TypeError: get_data() got an unexpected keyword argument 'retName'
May i know the reason?
3. May I know any detailed instruction or user guide for DSWS? The ones in my.refinitiv.com or developer community seems too simple. Some questions like how to get unit/date/explanation/source/meaning of retrieved value are not mentioned in the user guide, and i don't know where to find them since it's not mentioned in navigator as well.
Thanks in advance.
Best Answer
-
I can't find an official document regarding DatastreamPy. You can contact the Product team directly via MyRefinitiv to confirm this.
You can use the |N suffix to get the return name.
df = ds.get_data(tickers='VOD|N, U:IBM|N',fields=['EPS1TR12'],
kind=0)
dfThe output is:
Regarding the "pip install" command, it may be blocked by the proxy or firewall (Zscaler). You can try the following options when running the pip command.
--trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org
Otherwise, please contact the Zscaler team to whitelist these names.
The DatastreamPy library may not be available in Conda.
According to the Exception("Invalid JSON Date"), it could be a bug in the API. I can replicate the problem too.
Please report this issue to the Product team (Refinitiv Datastream Web Service) directly via MyRefinitv.
0
Answers
-
Thanks for reaching out to us.
1. It is DatastreamPy which is a rebranded version of DatastreamDSWS. They are linked to the same GitHub. Therefore, you need to use DatastreamPy which is supported by Refinitiv.
2. According to the source code, it doesn't support the retName argument anymore.
def get_data(self, tickers, fields=None, start='', end='', freq='', kind=1):
"""This Function processes a single JSON format request to provide
data response from DSWS web in the form of python Dataframe3. The Datastream Navigator is a good tool to search for content and description. However, if you are unable to find it in the Datastream Navigator, you can contact the Datastream support team directly via MyRefinitiv.
I hope that this information is of help.
0 -
Hi mate, thanks for replying. Following up questions:
1. Is this change an official one? When will that be announced and changed in the official user guide & docs? It's still branding DatastreamDSWS.
2. Then are we able to get field names, like retName's function?
3. Understood, thank you.
0 -
Besides, I tried pip install DatastreamPy and got the error "HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) - skipping"
and conda install DatastreamPy got the error "
PackagesNotFoundError: The following packages are not available from current channels:
- datastreampy
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
and use the search bar at the top of the page.
"
0 -
1 more q: i tried usage check function and got error
df = ds.get_data(tickers='STATS', fields=['DS.USERSTATS'], kind=0)
raise Exception("Invalid JSON Date")
Exception: Invalid JSON Date
May i know the reason as well? Thank you.
0 -
Thank you very much!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 中文论坛