{"id":24000,"library":"lseg-data","title":"LSEG Data Platform Python Client","description":"A Python client library for accessing the London Stock Exchange Group (LSEG) Data Platform APIs, including real-time and historical data. Current version: 2.1.1. Released under the Apache-2.0 license with regular updates.","status":"active","version":"2.1.1","language":"python","source_language":"en","source_url":"https://github.com/LSEG/lseg-data","tags":["lseg","financial-data","api-client","market-data","pandas"],"install":[{"cmd":"pip install lseg-data","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The correct package name is lseg.data (subpackage), not lseg_data.","wrong":"from lseg_data import LsegData","symbol":"LsegData","correct":"from lseg.data import LsegData"},{"note":"Credentials class is located in auth module.","wrong":"from lseg.data.credentials import Credentials","symbol":"Credentials","correct":"from lseg.data.auth import Credentials"}],"quickstart":{"code":"import os\nfrom lseg.data import LsegData\nfrom lseg.data.auth import Credentials\n\ncreds = Credentials(app_key=os.environ.get('LSEG_APP_KEY', ''))\nclient = LsegData(credentials=creds)\ndf = client.get_history(\n    instruments=['IBM.N'],\n    fields=['TR.PriceClose'],\n    start_date='2025-01-01',\n    end_date='2025-01-31'\n)\nprint(df.head())","lang":"python","description":"Initialize LSEG Data client with app key and fetch historical prices."},"warnings":[{"fix":"Use `from lseg.data.auth import Credentials` instead of `from lseg.data.credentials import Credentials`.","message":"In v2.0.0, the credential class moved from `lseg.data.credentials` to `lseg.data.auth`. Old imports will break.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Pass a list to 'instruments' even for a single instrument, e.g., `instruments=['AAPL.O']`.","message":"The `get_history()` method no longer accepts `instrument` (singular) parameter; use `instruments` (list) only.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade Python to 3.9 or later.","message":"The library requires Python >=3.9. Using older Python versions will raise ImportError.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Verify your LSEG app key has access to the requested data products.","message":"API keys must be granted appropriate entitlements; otherwise requests return authorization errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from lseg.data import LsegData`.","cause":"Trying to import from the top-level 'lseg' package instead of 'lseg.data'.","error":"ImportError: cannot import name 'LsegData' from 'lseg'"},{"fix":"Add `from lseg.data.auth import Credentials`.","cause":"Forgot to import the Credentials class, or imported from wrong module.","error":"NameError: name 'Credentials' is not defined"},{"fix":"Ensure LSEG_APP_KEY environment variable is set with a valid key.","cause":"App key is missing, expired, or invalid.","error":"lseg.data.exceptions.AuthenticationError: Invalid credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}