LSEG Extension for Visual Studio Code
A Visual Studio Code extension with rich support for the LSEG Analytics Pricing Python SDK (PyPI package: lseg-analytics-pricing, hereafter referred to as “the SDK”), providing code automation features such as Intelligent Code Completion and Samples, and integrated access to the LSEG Analytics AI Assistant.
Introduction
The LSEG Visual Studio Code Extension is designed to assist coders working on financial applications. It offers a suite of predefined code templates tailored for various financial use cases and intelligent code completion features that help suggest parameter values, ensuring accuracy and efficiency in your financial coding tasks.
This extension integrates the latest LSEG Analytics APIs, providing broad support across multiple asset classes, with plans to further expand coverage in future releases.
Features Overview
LSEG Analytics APIs
- Commands:
- Quickly access and execute LSEG Analytics functions from the command palette.
- Coding Assistance:
- Intelligent Code Completion:
- Enjoy real-time, context-aware code completions specifically for LSEG Analytics parameter values, reducing coding errors and boosting productivity.
- Code Samples:
- Access a library of pre-built code templates for common LSEG Analytics use cases, helping you get started quickly and efficiently.
- AI-Powered Code Generation:
- AI Assistant:
- Generate Python code for FX, Calendars and IR SWAPs using natural language using the LSEG AI Assistant, with broader coverage coming in future releases.
- Prompt Examples:
- Access a library of example prompts to help guide you through basic LSEG Analytics use cases.
- Seamless Authentication:
- Easily authenticate to the SDK from within Visual Studio Code, ensuring secure and hassle-free access.
Usage
Commands
To use commands, open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:
| Command |
Description |
| LSEG: Sign In |
Opens window for log in details to start using the extension features. |
| LSEG: Sign Out |
Logs user out |
| LSEG: Refresh Code Completion Data |
Updates the cache of completion data which is used for parameter suggestions. |
To see all available LSEG Analytics commands, open the Command Palette and type LSEG.
Coding Assistance
Intelligent Code Completion
Dynamic parameter suggestions, based on the data available to the user. To use Intelligent Code Completion:
- Place your cursor within a piece of code that requires a parameter
- Trigger the parameter to see a list of possible values using one of the following methods:
- Type the name of the parameter (hovering over the current function will tell you the name) followed by an equals sign (=)
- Run the Trigger Suggest command (
Ctrl/Cmd + space)
Code Samples
Samples provide templates of code for key analytics functionality. To use samples:
- Select the LSEG icon from the left hand side bar. After logging in, expand
LSEG Financial Analytics and select Code Samples.
- Once a compatible version of the SDK is installed in your Python environment, expand the sections to browse through the available samples.
- Open a sample as a Python script or a Jupyter Notebook.
- Modify it to tailor it to the task you're working on.
AI Assistant
The interaction with the SDK is simplified with the LSEG AI Assistant.
Explore the code generation capabilities of the LSEG AI Assistant using single or multiple lines of comments for complex instructions:
- Write your prompt as a single or multi-line comment (
#) using natural language.
- Keep the cursor inside the comment block
- Run Trigger Inline Suggestion command to invoke the LSEG AI Assistant.
- Accept/Reject/Modify the generated code.
- Run the code and access the LSEG Analytics API under the hood to query financial data and analytics.
Prompt Examples
Prompt examples provide templates of natural language to experiment with the AI Assistant. To use the prompts:
- Select the LSEG icon from the left hand side bar. After logging in, expand
LSEG AI Assistant and select Prompt Examples.
- Once a compatible version of the SDK is installed in your Python environment, expand the sections to browse through the available prompt examples.
- Open the prompt as a Python script.
- Run Trigger Inline Suggestion command on the commented line/s to receive AI-generated coding suggestions.
- Modify the prompt to tailor it to the task you're working on.
Seamless Authentication
The LSEG Visual Studio Code extension (“the extension”) makes it easier to write Python code that uses the lseg-analytics-pricing Python SDK. However, you need to be authenticated to be able to execute your Python code that uses the SDK.
The SDK provides several authentication mechanisms (see the SDK documentation for more information). One of these is designed to provide a seamless authentication experience when using the extension: if you are logged in to the extension, you do not need to authenticate again to execute your Python code inside Visual Studio Code.
By default this is disabled, to enable it:
- Navigate to Settings → Extensions → LSEG
- Select the box
Enable Automatic Authentication.
Seamless Authentication - implementation
When the setting is enabled, the extension starts a proxy web server that forwards calls from the SDK to the LSEG Financial Analytics backend APIs, adding the necessary authentication token.
The behaviour of the proxy web server is as follows:
- The proxy web server runs on http://127.0.0.1, so only the user and scripts/apps running locally can make requests to it.
- It will only forward SDK requests to the LFA backend; it will not forward requests to unknown endpoints.
- The extension has an output panel that shows the calls being forwarded to the LFA backend, so it is easy to see all the traffic handled by the proxy.
There is the possibility that other local scripts/apps could try to access the proxy web server and make requests using it. If this concerns you, you can disable the proxy and use one of the other SDK authentication mechanisms.
Privacy Statement
Please read the Privacy Statement governing the use of this extension.
License
See the LICENSE.txt file installed with the extension.
Compatibility
- LSEG Analytics Pricing Python SDK (
lseg-analytics-pricing) v1.0.0+
- VS Code Desktop Version only
- VS Code v1.82 from August 2023
- Operating systems: Windows, OS X, Linux
Troubleshooting
If you encounter issues while using the LSEG Extension for Visual Studio Code, you can try the following self-help tips to resolve them.
Common Actions to Try
- Log out and log in again: Sometimes, re-authenticating can resolve issues.
- Run cache refresh: Use the
LSEG: Refresh Code Completion Data command to update the cache of completion data.
- Restart VSCode: If issues persist, try completely restarting Visual Studio Code.
Log Output
Log output will generally come from one of two sources:
- The extension itself
- The SDK (
lseg-analytics-pricing)
The VSCode extension adds two output windows: LSEG Analytics and LSEG Analytics: SDK Auth.
- LSEG Analytics: This contains general logging about the behavior of the extension itself, such as logging in, logging out, refreshing data, inserting samples, and providing code completion prompts.
- LSEG Analytics: SDK Auth: This contains information about the calls the extension is forwarding to the LFA web backend on behalf of the SDK.
How to Open the Output Windows
- Open Visual Studio Code.
- Go to the menu bar and select
View > Output (or press Ctrl+Shift+U).
- In the Output panel, use the dropdown menu to select the desired output channel (e.g., LSEG Analytics or LSEG Analytics: SDK Auth).
How to Increase the Logging Level
There are two ways to increase the logging level:
Method A:
- Open Visual Studio Code.
- Go to the menu bar and select
View > Output (or press Ctrl+Shift+U).
- In the Output panel, click on the settings wheel (Set Log Level) and select the desired log level from the options: off, warning, info, debug, trace.
Method B:
- Open the Command Palette (
View > Command Palette).
- Run the
Developer: Set Log Level... command.
- You can either set the log level for all output windows or pick a specific one.
How to See Logged Output from the SDK
- Open your Python file in Visual Studio Code.
- Run the code by clicking the play button (Run Python File) on the top right corner of the Visual Studio Code window.
- View the output in the integrated terminal window. If the terminal is not visible, go to the menu bar and select
View > Terminal (or press Ctrl+`).
How to track AI Assistant processing status
The AI Assistant requests may take few seconds to be completed and their state can be checked in the progress status bar item LSEG AI Assistant.
If the LSEG AI Assistant does not return any results:
- check the status bar and if Disabled, enable the feature in the LSEG Extension Settings
- check the status bar and if Ready or Completed after a request, switch between the generated code results - multiple AI Assistants can return a response and LSEG might not always be the first one
- make sure the request is related to the SDK
If you need further assistance, please use the following contact information:
Questions, issues, feature requests, and contributions
If you have feedback for the extension please email analyticschannelsupport@lseg.com
Release notes
Version 1.9.0 - December, 2025
- AI Assistant now available: The LSEG AI Assistant can be triggered using the Trigger Inline Suggestion command to receive AI-generated coding suggestions based on SDK-related prompts.
- AI Assistant configuration: A new user setting that allows you to enable or disable the LSEG AI Assistant can be found in the extension's Help tree view under Settings.
Version 1.8.0 - December, 2025
- Minor UI improvements & Minor bug fixes: Standardized prompt UI notifications, renamed authentication output pane, and improved command naming consistency.
Version 1.7.0 - October, 2025
Version 1.6.0 - September, 2025
- Enhanced Intelligent Code Completion: Improved ICC functionality with fixes for type reference completions and enhanced bracket handling.
- Improved Getting Started Experience: Enhanced walkthroughs for LFA features to help users get started more easily.
- Enhanced Logging and Troubleshooting: Improved logging for better user visibility and troubleshooting support.
Version 1.5.0 - August, 2025
- Drop support for old LSEG Python SDK versions: Support for lseg-analytics v2.1.0b1 is dropped. This version of the extension supports v2.1.0b4 and newer releases of the SDK.
- ICC now suggests expected class types for function parameters: Intelligent Code Completion will automatically suggest and import the appropriate class when an LSEG Python SDK function parameter expects a specific class type.
- Improved UX for Code Samples webview: Code samples are now synchronized with the lseg-analytics Python SDK installed in your working environment. To access code samples you need to install a compatible lseg-analytics Python SDK version.
- Yield Book samples now integrated into LFA samples gallery: The separate Yield Book samples gallery has been removed. Yield Book samples are now available directly within the LFA samples gallery.
Version 1.4.1 - July, 2025
- Add ICC support for LSEG Python SDK v2.1: Add Intelligent Code Completion for new APIs introduced in lseg-analytics v2.1.0b1 (Interest Rate Curves, Loans and Options).
Version 1.4 - June, 2025
- Drop support for old LSEG Python SDK versions: Support for v1 versions of lseg-analytics is dropped. This version of the extension supports v2 and newer releases of the SDK.
- Code Samples are embedded in the LSEG Python SDK: From v2, the SDK contains code samples showing how to use the SDK. The extension will display the LFA samples from the installed version of the SDK. No code samples will be displayed if the SDK is not installed or if an incompatible version is installed.
- Improvements to search and filtering of samples: minor UX improvements.
Version 1.3.1 - March, 2025
- Drop support for old LSEG Python SDK versions: Support for lseg-analytics v1.0.0b3.post4 is dropped. This version of the extension supports v1.0.0b9 and newer releases.
- Search/Filter Capabilities for Code Samples: Added the ability to search and filter code samples for easier navigation.
- Contact Us Page: Added a new Contact Us page for better user support.
- Added troubleshooting section to the README.md: Added documentation explaining how to access extension logs to help diagnose issues.
Version 1.2.0 - December, 2024
- Support for multiple LSEG Python SDK versions: previous versions only supported lseg-analytics v1.0.0b2. This version of the extension supports v1.0.0b3.post4 and newer releases.
- Improved logging : more detailed logging to simplify support and troubleshooting
- Minor UX improvements: e.g. improved styling in the Sample UI, minor branding changes
- Minor bug fixes: e.g. removing redundant query parameters from proxy calls
Version 1.1.0 - September, 2024
- Updated Samples UI: A new, easier to navigate Samples UI that adds the option to open a sample in a Jupyter Notebook as well as a Python file.
- Minor bug fixes : e.g. fixing broken help link, adding license check to refresh command.
- Minor UX improvements: e.g. removing redundant commands, improved logging.
Version 1.0.0 - August, 2024
Version 1.0.0 of the LSEG Financial Analytics (LFA) Extension for Visual Studio Code. This extension brings dynamic intelligent code completion features tailored specifically for developers working with the LFA Python SDK, empowering them to write code more efficiently and accurately.
Known Issues:
- Not compatible with web version of VS Code.
- If Intelligent Code Completion is unavailable immediately after installing or updating the LSEG Analytics Pricing Python SDK, try the following: (1) run the LSEG: Refresh Code Completion Data command, (2) log out and log in again, or (3) restart Visual Studio Code.
- Intelligent Code Completion might not display the correct suggestions if multiple different Python environments are being used inside the same VSCode instance e.g. when a Jupyter Notebook uses a different Python environment from the folder it is in.