How could I adjust ek.get_timeseries in order to make it work for LAST_QUOTE.Close?

The following code gets data
ek.get_timeseries(rics=['ARSMPR=BCRA'], fields=["CLOSE"], start_date='2020-01-01',end_date= '2020-01-20', interval = 'daily'),
but the next one does not:
ek.get_timeseries(rics=['NGMPR='], fields=["LAST_QUOTE.CLOSE"], start_date='2020-01-01',end_date= '2020-01-20', interval = 'daily')
Via Excel add-in historical data for NGMPR= we could extract via the following formula:=RHistory("NGMPR=";"LAST_QUOTE.Timestamp;LAST_QUOTE.Close";"START:01-Jan-2020 END:31-Jan-2022 INTERVAL:1D";;"TSREPEAT:NO SORT:ASC CH:IN;Fd";B2)
How could I adapt it for the formula ek.get_timeseries?
Best Answer
-
according to an answer in this thread, I'm following my colleague's suggestion and found that
the get_timeseries API call has a reduced datamodel - Open, High, Low, Close, Volume, Count. The Close field in that model is the same as CF_CLOSE - which you can find the description for in the Data Item Browser app. Unfortunately, you cannot use the get_timeseries API to request any other fields as a timeseries history. You can use the get_data api call to retrieve non-realtime field history. Something like this would usually work (it does not with the RIC you wanted - see the note below regarding this instrument):
df, err = ek.get_data('VOD.L', fields = ['TR.PriceClose.date','TR.PriceClose','TR.Volume'],parameters={'SDate':'2020-01-01','Frq':'D','EDate':'2022-01-31'})
dfWe do however, have another route - which is the Refinitv Data Platform (RDP) APIs and their accompanying ease of use RDP Libraries (Python, Typescript and a community supported .NET version). Eikon users have access to many new services there such as Search APIs, Instrument Pricing and Analytics APIs & much more, and importantly in your case Historical Pricing APIs - these have an enhanced realtime data model of about 30 fields instead of the reduced get_timeseries data model. You can see examples of how to get started (pip install refinitiv.dataplatform) in the links above. You could try something as simple as:
import refinitiv.dataplatform as rdp
import pandas as pd
import numpy as np
session = rdp.open_desktop_session('YOUR EIKON APP KEY HERE')
rdp.get_historical_price_summaries('VOD.L')Now, unfortunately - the RIC you were initially looking for NGMPR= is not yet available via this service, but many others will be - so it may help you in the future.
However, ticket number 10930190 has been raised to a content specialist via MyRefinitiv asking for the suggestion of the proper field to get LAST_QUOTE.Close price of RIC "NGMPR=" using =@TR excel formula (which can be converted to Eikon Data API get_data function) and the support team is going to contact you soon.
I hope this can help.
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
- 557 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
- 653 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
- 229 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 中文论坛