- Version: 1.0
- Last update: June 2026
- Environment: Python + JupyterLab + Data Platform Account
- Prerequisite: Data Platform access/entitlements
This project is a semi-sequel to my Concurrent Data Platform API Calls with Python Asyncio and HTTPX project. That project shows how to use Python and the HTTPX library to make concurrent HTTP REST requests to LSEG Data Platform asynchronously. This project shifts away from manually sending HTTP REST requests and instead uses the easy-to-use LSEG Data Library for Python. The Data Library for Python Historical Pricing module offers the get_data_async method to request historical data asynchronously, letting developers send multiple requests concurrently without blocking the process.
Note: This project is based on the Data Library for Python version 2.1.1. The library behavior might change in future releases.
The Data Platform API request limits (throttles) to effectively manage and protect its service and ensure fair usage across the non-streaming content.
An application would receive an error from the API call if an application reached or exceeds a limit (especially with the Asynchronous HTTP calls). You required to make some necessary adjustments to rectify the interaction with the API and retry the respective API call.
Two different server errors on API request limits are:
| HTTP Status | Detail |
|---|---|
| 429 | Error Message: too many attempts |
| Description: A per account limit where the number of requests per second is limited for each account accessing the platform. If this limit is reached, applications will receive a standard HTTP error (HTTP 429 too many requests). | |
| Suggestion: Please reduce the number of requests per second and retry. |
Please find more detail regarding the Data Platform HTTP error status messages from the RDP API General Guidelines document page.
The Historical Pricing endpoint rate limits information is available on the Reference tab of the Data Platform API Playground page. The current rate limits (As of Mar 2026) is as follows:
- Python 3.11+
- LSEG Data Platform credentials with Historical Pricing permission:
- Machine ID
- Password
- AppKey
Please your LSEG representative or account manager for the Data Platform Access
.
├── notebook/
│ ├── ld_notebook_async_gather.ipynb # Main notebook
│ ├── ld_notebook_gather_performance.ipynb # Asyncio Gather performance notebook
│ ├── lseg-data.config.json # Data Library logging configuration
│ ├── .env # Platform Session credentials (not committed)
│ └── .env.example # Credentials template
├── images # Project images folder
├── .venv # Project Python virtual environment
├── LICENSE.md # Project License
├── requirements.txt # Pinned Python dependencies
├── Article_Gather.md # The Asyncio Gather with Data Library article document
└── README.md # The Project README file
- Python 3.11 or higher
- A valid LSEG Data Platform account with:
- API Key
- Machine ID (username)
- Password
| Notebook | Description |
|---|---|
| ld_notebook_async_gather.ipynb | Demonstrates how to request multiple RICs concurrently using the Data Library Historical Pricing get_data_async method combined with asyncio.gather(). Covers Events and Summaries definitions, error handling for invalid RICs and fields, and how return_exceptions=True keeps all results — successes and failures — in one place. |
- Create and activate a virtual environment
# Windows (PowerShell)
python -m venv .venv
.\.venv\Scripts\Activate.ps1# macOS / Linux
python3 -m venv .venv
source .venv/bin/activate- Install dependencies
(venv)$>python -m pip install --upgrade pip
(venv)$>python -m pip install -r requirements.txt- Configure credentials
Copy .env.example to .env inside the notebook/ folder and fill in your credentials:
LSEG_API_KEY=your_api_key_here
LSEG_MACHINE_ID=your_machine_id_here
LSEG_PASSWORD=your_password_here- Run the notebook
Open notebook/ld_notebook_async_gather.ipynb in JupyterLab or VS Code and run the cells in order.
(venv)$>notebook\jupyter lab notebook| Package | Purpose |
|---|---|
lseg-data |
LSEG Data Library for Python — market data access |
jupyterlab |
Interactive notebook environment |
python-dotenv |
Load credentials from .env without hardcoding them |
See requirements.txt for pinned versions.
See LICENSE.md.
You can find more detail regarding the Data Library and Python Asyncio from the following resources:
- LSEG Data Library for Python on the LSEG Developer Community website.
- Data Library for Python - Reference Guide
- The Data Library for Python - Quick Reference Guide (Access layer) article.
- Essential Guide to the Data Libraries - Generations of Python library (EDAPI, RDP, RD, LD) article.
- Upgrade from using Eikon Data API to the Data library article.
- Data Library for Python Examples on GitHub repository.
- Python Asyncio library page.
- A Conceptual Overview of asyncio article.
- Python's asyncio: A Hands-On Walkthrough
- Asyncio gather function document page.
- Asyncio TaskGroup function document page.
For any question related to this example or Data Library, please use the Developers Community Q&A Forum.
