Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by fgaspar · Feb 02 at 10:19 AM · python apipython api eikonpython eikonlast quote

Retrieve LAST_QUOTE from Eikon API using python

I need to retrieve LAST_QUOTE data history using python and Eikon API. I want the same output as if using Eikon Excel call:

=RHistory(".IBBEU003D","LAST_QUOTE.Timestamp;LAST_QUOTE.Close","INTERVAL:1D NBROWS:25",,"TSREPEAT:NO")

It would be appreciated if the solution would work for similar data fields.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jason.ramchandani · Feb 02 at 01:20 PM

@fgaspar So 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 my note below regarding this instrument):

df, err = ek.get_data('VOD.L', fields = ['TR.PriceClose.date','TR.PriceClose','TR.Volume'],parameters={'SDate':'2019-12-01','Frq':'D','EDate':'2020-12-01'})

df

We 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 .IBBEU003D is not yet available via this service, but many others will be - so it may help you in future.

In terms of Data Item Browser usage you should type in an instrument and then you can also get values. The instrument you were looking for is a contributed index which is using illogical Fields or FIDs - so it is slightly more complicated than more standard instruments. If you need more help with that particular instrument and field meanings or where things are located please open a ticket with our content support team using Contact Us in the main Eikon menu and specifying a content query.

I hope this can help.


1612272023646.png (108.9 KiB)
1612269878751.png (351.1 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by jason.ramchandani · Feb 02 at 11:39 AM

@fgaspar - so if you are looking for just the latest value snapshot you can just us the following python call to our real-time fields (any realtime field - you can use the data item browser (type DIB into eikon search bar) to search for any field you like):

df,err = ek.get_data(".IBBEU003D",['CF_Date','CF_Time',"CF_Last"]) 
df

If you want a timeseries history of this you can try:

df1 = ek.get_timeseries(".IBBEU003D",['CLOSE'],count=25,interval='daily') df1

The most recent value available is from 1-Feb so I'm not sure what time this is updated every day - maybe 18:25 each day as this seems to be an index. I hope this can help.


1612265616755.png (13.7 KiB)
1612265752764.png (84.9 KiB)
Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
fgaspar · Feb 02 at 11:56 AM 0
Share

Could you please share how one can find the item codes needed? I am using Eikon Data Item Browser and I am unable to find "CLOSE"/"close" item and what I find is empty, please see the image:

I have similar issue in obtaining Mid Yield for the same identifier so I would like to know the way to resolve these task myself.

1612266740001.png (73.8 KiB)

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
12 People are following this question.

Related Questions

Download indices in percentages

Request CF_LAST in a particular currency.

Price data missing for several RIC's using ek.get_timeseries in python API

How to get Eikon data on python for a set of RICs given in excel sheet?

Python Data retrieving

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges