Error message "Invalid JSON date"

Dear community,
I am having a bit of trouble with DSWS API operating through Python. Hoping for your experience and help!
I am running the DSWS api through python and run the following request
instrument_request = 'DE0007236101'
#fields_request = ['P']
fields_request = ['x(P)~E0','x(UP)~E0','x(PI)~E0','x(PI)~E0','x(PO)~E0','x(PA)~E0','x(PB)~E0','x(PH)~E0','x(PL)~E0','AF','x(MP)~E0','(x(VO)*1000)','(x(VC)*1000)','x(CP)~E0', 'x(GP)~E0', 'NOSH']
start_request = '-20Y'
end_request = '2020-06-30'
# Run the actual request
df = ds.get_data(instrument_request,fields_request,start=start_request,end=end_request)
print(df)
That query produces the following error for the earlier dates obviously:
raise Exception("Invalid JSON Date")
Exception: Invalid JSON Date
It runs smoothly if use '-10Y' orfor any date after '2003-01-01'. The actual time series is longer and should contain data. The response is:
Instrument DE0007236101 ...
Field x(P)~E0 x(UP)~E0 x(PI)~E0 ... x(CP)~E0 x(GP)~E0 NOSH
Dates ...
NaN 104.548 161.80 1524.0 ... None None 594780
NaN 108.683 168.20 1584.3 ... None None 594840
NaN 108.554 168.00 1582.4 ... None None 594840
NaN 105.323 163.00 1535.3 ... None None 594840
NaN 104.677 162.00 1525.9 ... None None 594840
... ... ... ... ... ... ...
2020-06-24 101.100 101.10 1473.8 ... None None 850000
2020-06-25 102.300 102.30 1491.3 ... None None 850000
2020-06-26 101.880 101.88 1485.1 ... None None 850000
2020-06-29 103.800 103.80 1513.1 ... None None 850000
2020-06-30 104.300 104.30 1520.4 ... None None 850000
Any ideas what, would be solving the issue?
Thank you very much for any help. It is highly appreciated!
Best Answer
-
Looking into this more - its not the python version. I downgraded to 1.0.1 (pip install DatastreamDSWS ==1.0.1) and that fixed the issue. Looks like a change was made to the code recently. I raised a comment on the Git Repo.
0
Answers
-
I am getting this issue now I have updated to the latest version of Python. Still working OK with 3.7.4 though.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 616 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛