Error with get_timeseries
Hi folks,
I will ask all questions I have at this moment here, hopefully it is the correct way to do it.
I saw Excel and the Api were not giving me the same High, Low... values, and even I got different number of rows in the files. Then I realized that in the "Build Formula" at Excel I am allowed to specify what kind of price I want to download: Mid price, Common, Ask, Bid, Trade price etc...
I have seen that the get_timeseries from the APi does not allow us to choose from that list of prices and automatically chooses the "trade price", Am I correct? In that case I suggest you to add to the help section of the get_timeseries function an explanation of what you are actually downloading.
I assume that what I get with get_timeseriers is the trade price with the parameter "adjusted" set to "no". Is this correct?
Now my biggest problem is that I prepare a list of rics, I put a time.sleep(1) in my algorithm to avoid the limits on the API but after looping through several RICs I get an error:
2020-04-22 17:17:01,131 P[26600] [MainThread 4164] Request timeout occured Traceback (most recent call last): File "C:/direction.py", line 17, in <module> result = ek.get_timeseries(j, start_date = fecha_inicio, end_date = fecha_fin, interval="minute",fields= ["HIGH", "LOW", "OPEN", "CLOSE", "VOLUME"] ) File "C:\Users\....\eikon\time_series.py", line 178, in get_timeseries ts_result = eikon.json_requests.send_json_request(TimeSeries_UDF_endpoint, payload, debug=debug) File "C:\Users\...eikon\json_requests.py", line 127, in send_json_request _check_server_error(result) File "C:\Users\....eikon\json_requests.py", line 203, in _check_server_error raise EikonError(int(server_response['ErrorCode']), error_message) eikon.eikonError.EikonError: Error code 408 | Request timeout occured
And I got a different error telling me "no content for that RIC" or something like that.
My question is, Do you know how could I tell the loop to ignore the error and jump to the next RIC?
Maybe this has been answered in the past but I can't find it.
I add that the list of RICS was the stocks at the Tokyo Stock Exchange and the error appeared after looping through 98 of them.
Thanks for your time
Best Answer
-
Hi @arnoldpredator, You can attach your code snippet which replicates this issue, and then we can take a look at it. Since an exception is being throws, the simplest way would be to wrap the function in try-catch block and ignore the problem instrument.
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
- 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛