LDL Tutorial 3 - Sessions, Configurations, Data Model and get_data

Overview

LSEG Data Model

The LSEG Data Platform is, well, a platform. More specifically, this platform hosts many API Families which themselves host individual APIs which allow users to access data (e.g.: historical end-of-business-day (i.e.: close) prices for a company's publicly floated equity (i.e.: stock)) or services (e.g.: calculations). Each individual service within each API can be accessed via endpoints, that are simply just addresses where our computers can send requests. You can think of this like your computer sending a letter detailing the request you asked for; e.g.: Vodafone's stock price last year. You need to know which endpoint to use when sending requests. Documentation about endpoint names, and the structure in which requests can be made can be found on the API Playground. This playground is, however, behind a paywall accesible only to LSEG clients via their user credentials (username and passwords). But you may be interested in the Data Model before becoming a client, so to serve such stakeholders, we have created the LSEG Developer Portal on which detailed Documentation (and more) can be found (mostly) publicly. You can also find informaion about other APIs (i.e.: APIs not hosted within the LSEG Data Platform, e.g.: Datastream) on this Developer Portal, but these are outside the scope of this tutorial.

 

LSEG Data Library

Anyone with a license can send requests to these endpoints and receive a response. One may choose to program their computer to do so using C++ or JAVA or any other coding language of choice; however, we decided to help developers and created functions in the most popular programing languages, Python, TypeScript and .Net. These functions were simple when 1st developed (e.g.: send all requests to the historical-pricing endpoint because it is the most popular one), but got more complex with time. In the case of Python, we decided to wrap as many functions as possible into a library, the LSEG Data Library (LDL).

Within this library, you can use the Delivery Layer functions to send requests to specific endpoints, but it is the most complex use-case of the LDL, since it requires us to know exactly which endpoint to use, and how to request for data/services from that assosiated API. We therefore created another set of functions, called the Content Layer, which renamed endpoints to more intuitive names, and allows us to structure our requests in a simpler, uniform, way. We noticed, however, that that some functions were more popular than others, much more, and therefore decided to siplify them even more! We packaged these into the last layer, the Access Layer.

Since the Access Layer is the simplest, we will start our tutorial there.

 

Related Questions

"SDate" and "Period" parameters of get_data function: What are the entries I can add in the `parameters` argument of the `get_data` function?

 

References

 

Tutorial Source Code

Python

Examples referenced

Last Update June 2024
Interpreter Python 3.11.x or greater
Pre-requisites

Familiarity with Python and a basic understanding of Jupyter Notebook.

Access Credentials

Quick Start

If accessing content from:

  • Desktop (Eikon 4.0.36 or greater / LSEG Workspace 1.8 or greater) 
  • Deployed Environment (ADS 3.2 or greater)

The majority of the examples are built to work within Jupyter Notebook.  Ensure this package is installed.