I am stuck while trying TRTH Python code. How can I get help in this?

Best Answer
-
You want to pull end of day data (TRADE_DATE and LAST_PRICE) for around 25000 RICs everyday.
How to identify the API call that delivers the fields you want
You can use the data dictionary to identify which calls deliver the fields you want. In sheet Field Descriptions, search in column Field Name for Last, and you will see that the Elektron Timeseries call delivers it. It also delivers a Trade Date.
A call can be done On Demand or be scheduled. These 2 approaches are described in the Tutorials Introduction.
The Elektron TimeSeries call
The Elektron Timeseries call delivers End of Day data. REST API Tutorial 7 describes this call and its parameters, done using an On Demand request, with the 2 fields you are interested in (and a few more). You can refer to the API Reference Tree for additional information on the parameters (you must first select the appropriate call in the first parameter's dropdown, i.e. ElektronTimeSeriesExtractionRequest).
Implement the call in your Python code
We do not have a Python sample for this call, but it would be easy for you to make one, using the TRTH_OnDemand_IntradayBars sample (available in the downloads) as a starting point. In step 2 you need to implement a way to populate the InstrumentIdentifiers array. You must change the requestBody to do an Elektron Timeseries call, with your parameters. As you have 25k instruments, delete step 4. Step 5 will save the data to file. Step 6 can be deleted as well, it is purely cosmetic.
0
Answers
-
@sreedhanya.kavunkara1, please tell us exactly:
- What code you are using (is this an existing sample, or something you made). If it is your own code, or if you modified an existing sample, then please post it as an attachment.
- What makes you say it is "stuck". What are the symptoms or error messages you observe ?
0 -
@moragodkrit.chumsri_1, I am able to run the code. It works at times, and sometimes it pulls an error also. I shared the screenshot with Christiaan, and according to him it is a connection issue, TRTH server being unavailable.
Now, my requirement is to pull not the intraday data, but end of day data available in IDN for a set of Commodities and derivatives RICs. I wanted to compare the NDA timeseries data and IDN data for a quality check purpose, as we get client queries on this very frequently. I need to check the last_price and TRADE_DATE from IDN. Please let me know how you can help me.
0 -
Here are 2 example RICs - WPBEURYZ9, FROTC-B-DA=ARG.
I have to pull the TRADE_DATE and LAST_PRICE for around 25000 RICs everyday.
0 -
Hi,
can anyone help me on this?
Sree
0 -
@sreedhanya.kavunkara, a new version of the on demand Python sample is available under the downloads tab. It has been enhanced to manage an eventual initial HTTP 200 response (which is rare but could happen, as you saw when changing the type of request). Hope this helps.
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛