API does not return the latest data, seems to be an issue with the API as it does give the correct a
CBOT_BO_c2 = ek.get_timeseries('/BOc2',start_date=dt.datetime(2018,8,10))
gives me only data untill 16th of Aug, was expecting untill today including the 17th.
This holds for all RICs that I am working with.
Best Answer
-
I didnt get an error, I just got too less data.
I have restarted the python session and now it does give me the correct data.
The jupyter notebook, where I was working in was open for several days already. I did reset the eikon object and set the API key again, but it did not work. So somehow the end date perceived by the API is not the actual day today, but set somewhere when you start a python session?
0
Answers
-
Could you please provide with the screenshot or the log of your output?
0 -
we'll check on that, thanks for letting me know
0 -
In the meanwhile, maybe you want to set the end date in your code:
end = datetime.datetime.today().strftime('%Y-%m-%d')
0 -
I can't request '/BOc2' item because I don't have permission, but that could be related to the instrument '/BOc2'.
'/' means the item is requested in delayed mode, so the last data could be ignored.I requested 'BOc2' and I retrieved all data, including the actual day:
>>> ek.get_timeseries('BOc2',start_date=dt.datetime(2018,8,10))
BOc2 HIGH LOW OPEN CLOSE VOLUME COUNT
Date
2018-08-10 28.67 28.00 28.53 28.10 20233.0 -1.0
2018-08-13 28.40 27.80 28.13 28.36 17984.0 -1.0
2018-08-14 28.32 28.06 28.30 28.28 17424.0 -1.0
2018-08-15 28.42 27.86 28.41 28.00 15131.0 -1.0
2018-08-16 28.36 27.92 28.00 28.28 5205.0 -1.0
2018-08-17 28.53 28.18 28.33 28.36 3316.0 -1.0
2018-08-20 28.70 28.53 28.59 28.63 1404.0 177.00 -
We found the root cause. It's related to the default arguments evaluation by Python.
While plain values are hard-coded, thus needing no evaluation except that made at compilation time, function calls are expected to be executed at run time.
If we write this:import datetime as dt
deflog_time(message, time=dt.datetime.now()):
print("{0}: {1}".format(time.isoformat(), message))We expect the log_time() function to correctly provide the current time each time we call it. This unfortunately does not work: default arguments are evaluated at definition time (for example when you first import the module), and the result of successive calls is :
>>> log_time("message 1")<br>2015-02-10T21:20:32.998647: message 1<br>>>> log_time("message 2")<br>2015-02-10T21:20:32.998647: message 2<br>>>> log_time("message 3")<br>2015-02-10T21:20:32.998647: message 3
This issue will be fixed in the next version.
In the meanwhile, Joris.Hoendervangers's suggestion is totally appropriate : you can force end_date to dt.datetime.today().strftime('%Y-%m-%d')0
Categories
- All Categories
- 6 AHS
- 39 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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛