Refinitiv Data Library for Python
Welcome to the new Refinitiv Data Library for Python (BETA)
We are happy to share this pre-release with you! Please feel free to use this library and we welcome any thoughts and suggestions you may have. As a beta product, the interface is still subject to minor change. It is planned to be released it in Q4 2022.
All questions and feedback can be sent to us through our Q&A Forums
The latest version of the Refinitiv Data Library for Python is available from PyPi. Editions for TypeScript and for .NET are also available. Related learning materials will be published on the Refinitiv Developer Community very soon.
The Refinitiv Data Library for Python provides a set of ease-of-use interfaces offering coders uniform access to the breadth and depth of financial data and services available on the Refinitiv Data Platform. The platform refers to the layer of data services providing streaming and non-streaming content, bulk content and even more, serving different client types from the simple desktop interface to the enterprise application. With the Refinitiv Data Library, the same Python code can be used to retrieve data regardless of which access point you choose to connect to the platform. The series of examples presented in this project demonstrates how to use the Refinitiv Data Library for these different use cases.
The library provides multiple layers of abstraction allowing for different styles and programming technics suitable for all developers, from financial coders to seasoned developers:
- The Access layer is the easiest way to get Refinitiv data. It provides simple interfaces allowing you to quickly prototype solutions in interactive environments such as Jupyter Notebooks. It was designed for quick experimentation with our data and for the specific needs of financial coders.
- The Content layer is the foundation of the Access layer. It provides developers with interfaces suitable for more advanced use cases (synchronous function calls, async/await, event driven). The Content layer refers to logical market data objects such as market data prices and quotes, fundamental & reference data, historical data, company research data and so on.
- The Delivery layer is a lower abstraction layer that allows your applications to retrieve data using the service agnostic delivery mechanisms defined by the Refinitiv Data Platform. The Delivery layer is a foundational component of the Content layer.
- The Session layer defines interfaces allowing your application to connect to the Refinitiv Data Platform via its various access points (either via a direct connection, via Eikon, via the Refinitiv Workspace, via CodeBook or even via a local Real-Time Distribution System).
The library is available on PyPI here
Quick example using the Access layer
Import the Refinitiv Data Library
import refinitiv.data as rd
Open a data session
Get pricing snapshots and fundamental data
df = rd.get_data(
fields=['BID', 'ASK', 'TR.Revenue']
Get Fundamental and pricing history
df = rd.get_history(
fields=["BID", "ASK", "TR.Revenue"],
Close the session