Series Index

LSEG Data Library
'Patterns and Features' Series

Practical patterns for programmatically accessing LSEG financial data with Python - cleaner requests, faster workflows, and fewer surprises once you know how the library works.

Ujjawal Khandelwal
Developer Advocate Developer Advocate
Returning to the series? 
Already familiar with the overview? Use the Consolidated Series Index to jump directly to any article, section, or topic across all volumes.

First time here? Read on - this page explains what the series covers, how examples work, and where to start. 

About This Series

A practical, volume-by-volume guide to the LSEG Data Library for Python (the lseg-data package) - the patterns, behaviours, and details that make your code cleaner, faster, and more predictable once you're past your first call.

lseg-data is LSEG's unified Python interface to financial data - pricing, fundamentals, news, estimates, ESG, and more. It is the successor to the Refinitiv Data Library for Python (refinitiv-data).

The official documentation already covers quick-starts, API reference, and cookbooks. This series complements those - it focuses on the things that aren't difficult once you know them, but aren't obvious the first time you meet them.

 

Who This Series Is For

This series assumes you've already made your first successful API call - you've installed lseg-data package, opened a session, and retrieved some data.

Now you're asking the questions that come after that:

  • Am I using the right call for this?
  • Is there a cleaner way to structure this request?
  • Why did this return something I didn't expect?
  • How do I handle this at scale?
  • What's the fastest way to find the right field or instrument?

If those questions sound familiar, you're in the right place.

Not there yet? Start with the Quick Start Guide and come back once you've made your first successful call.

 

The Access Layers

The library connects in three ways. Most examples in this series use Desktop. For detailed documentation and access, please read the official documentation. 

Layer Connects via Typical user
Desktop LSEG Workspace running locally - via Desktop API Proxy Analysts, quants on Workspace
Platform LSEG Data Platform (LDP) in the cloud - via OAuth 2.0 / machine account credentials Developers, cloud and server workflows
Deployed On-premise Real-Time Distribution System (RTDS) / Advanced Data Server (ADS) Enterprise and infrastructure teams


Where behaviour differs meaningfully by layer, that's called out explicitly.

 

How Code Examples Work

To keep examples focused, most snippets assume a session is already open. The standard setup used throughout the series is:

    	
            

import lseg.data as ld

ld.open_session() # opens a desktop session

A few conventions to know upfront:
  • All examples use import lseg.data as ld as the import convention
  • Outputs are shown as they appear in a Jupyter or Codebook environment
  • DataFrames are rendered with default pandas display unless noted otherwise
  • Where a snippet depends on earlier code in the same section, it says so explicitly

 

The Volumes

The series moves from a single call outward - to precision, then scale, then discovery etc.  Each volume is self-contained: dip into any one directly, or read them in order for the full picture.

Vol. 1 - Calls That Do More

Explore↗ | The Mechanics underneath every request |  Recommended starting point for new users


Every workflow begins with a call. This volume covers what get_data() and get_history() actually do, how to control parameters inline and globally, how to retrieve metadata in the same request, how to shape your output for code rather than just reading, how to debug, and two shortcuts that quietly cut development time.

Topics 
  1. Snapshot or Series
    Picking the right call before you write it
  2. Inline vs. Global Parameters
    Place a setting where it actually belongs
  3. Field Propagation
    Get metadata without a second call
  4. List vs. Semicolon Inputs
    Two inputs formats, one request
  5. Machine-Friendly Column Headers
    Column names built for code, not just reading
  6. Debugging and Logging
    See what the library is actually doing
  7. Ctrl+Space
    Search fields and instruments inside Codebook
  8. Ctrl+Shift+Space
    Use LSEG Workspace search from anywhere

 

Vol. 2 - Asking What You Mean

Explore↗ | Working with time correctly, embedding calculations in the call, and filtering news | For anyone moving beyond basic retrieval


Dates are simple until they're not. This volume covers relative versus absolute dates, pushing calculations to the server rather than post-processing, knowing exactly what a field supports before you request it, and structured news retrieval patterns.

Topics
  1. Absolute vs. Relative Dates
    Ask for "last x days" without  hard-coding
  2. Embedded Calculations
    Let the server do the math
  3. Know Your Parameters
    Read a field's real capabilities in the DIB
  4. Filtering News Headlines
    Query news the way you query data

 

Vol. 3 - Calls That Survives Scale

Explore↗ | Patterns for when your calls grow beyond a handful of instruments or fields | For larger workloads and production workflows


The same code that works perfectly for ten instruments can behave very differently when scaled to thousands. This volume covers the three patterns that make the difference: splitting requests safely, running them concurrently, and staying inside platform limits without babysitting the code.

Topics
  1. Chunking
    Split large requests into reliable batches
  2. Async calls
    Run requests concurrently
  3. Rate limit management
    Stay inside platform limits

 

Vol. 4 - Finding What to Fetch (to be published soon)

Explore↗ | Instrument discovery, universe building, and retrieval through alternative paths | For finding the data before retrieving it


Not every workflow begins with a known RIC. This volume focuses on the discovery tools and retrieval methods that help you find instruments, build universes, navigate chains, and work with identifiers across time.

Topics
  1. ld.discovery.search
    Search the LSEG universe
  2. Screener
    Filter instruments by criteria
  3. DataQuery
    Programmatic syntax builder for Screener
  4. Chain RICs
    Expand dynamic lists
  5. RIC history via PermID
    Resolve RIC changes using a stable identifier
 

 

Elsewhere In The Official Docs

This series complements the official documentation - it doesn't replace it. For foundational reference and comprehensive coverage, these are the primary resources:

  • Quick Start Guide - first-call walkthrough, session setup, access layer overview
  • Data Item Browser (DIB) - the authoritative reference app for every field, its parameters, and propagation attributes. Search for DIB on LSEG Workspace to open it.
  • Developer Community Forum - questions, answers, and discussion
  • LSEG Developers GitHub - working code examples and notebooks

 

Feedback

Found an error, have a question, or want to suggest a topic for a future volume? Post it on the Developer Community Forum

  • Register or Log in to applaud this article
  • Let the author know how much this article helped you
If you require assistance, please contact us here

 

Consolidated Series Index

If you want to... Go here
Pick the right call type before writing any code Vol. 1 - 01 - Snapshot or Series
Know where a parameter actually belongs - inline or globally Vol. 1 - 02 - Inline vs. Global Parameters
Pull metadata alongside your data in a single call Vol. 1 - 03 - Field Propagation
Understand the two ways to pass inputs in your request Vol. 1- 04 - List vs. Semicolon Inputs
Get column headers optimised for DataFrames and downstream code Vol. 1 - 05 - Machine-Friendly Column Headers
Trace or troubleshoot what the library is actually sending Vol. 1 - 06 - Debugging and Logging
Discover fields and instruments without leaving Codebook Vol. 1 - 07 - Ctrl+Space
Access LSEG Workspace search directly from anywhere Vol. 1 - 08 - Ctrl+Shift+Space
   
Use rolling date windows without hardcoding calendar dates Vol. 2 - 01 - Absolute vs. Relative Dates 
Offload calculations to the server instead of post-processing locally Vol. 2 - 02 - Embedded Calculations
Look up a field's valid values and real capabilities in the DIB Vol. 2 - 03 - Know Your Parameters
Filter news headlines with structured query logic Vol. 2 - 04 - Filtering News Headlines
   
Handle large universes or field lists without hitting payload limits Vol. 3 - 01 - Chunking 
Fire multiple requests in parallel and collect results efficiently Vol. 3 - 02 - Async Calls
Avoid throttling errors during bulk or high-frequency requests Vol. 3 - 03 - Rate Limit Management
   
Find instruments by name, keyword, or identifier Vol. 4 - 01 - ld.discovery.search
Build a filtered instrument list from fundamental or market criteria Vol. 4 - 02 - Screener
Programmatic syntax builder for Screener Vol. 4 - 03 - DataQuery
Resolve an index or basket into its current constituents Vol. 4 - 04 - Chain RICs
Trace historical RIC changes for an instrument Vol. 4 - 05 - RIC History via PermID