Installation
This guide will help you install the Market Data Python SDK and configure it for your needs.
Prerequisites
- Python >= 3.10
Basic Installation
Install the Market Data Python SDK from PyPI:
- pip
- uv
pip install marketdata-sdk-py
uv pip install marketdata-sdk-py
Installation with DataFrame Support
The SDK supports multiple DataFrame libraries for OutputFormat.DATAFRAME. To use DataFrame output format, you need to install at least one DataFrame library.
Install with pandas (recommended)
- pip
- uv
pip install "marketdata-sdk-py[pandas]"
uv pip install "marketdata-sdk-py[pandas]"
Install with polars
- pip
- uv
pip install "marketdata-sdk-py[polars]"
uv pip install "marketdata-sdk-py[polars]"
Install with both pandas and polars
- pip
- uv
pip install "marketdata-sdk-py[pandas,polars]"
uv pip install "marketdata-sdk-py[pandas,polars]"
Optional Dependencies
The SDK supports multiple DataFrame libraries for OutputFormat.DATAFRAME. You must install at least one of the following:
- pandas (recommended):
pandas>=2.3.3 - polars:
polars-lts-cpu>=1.33.1
DataFrame Handler Priority
When using OutputFormat.DATAFRAME, the SDK automatically selects an available DataFrame library in the following order:
- pandas (if installed)
- polars (if pandas is not installed)
If neither pandas nor polars is installed, a ValueError will be raised when attempting to use OutputFormat.DATAFRAME:
ValueError: No dataframe output handler found
You can use other output formats (OutputFormat.INTERNAL, OutputFormat.JSON, OutputFormat.CSV) without installing pandas or polars.
Local Development Installation
For local development, install from the project directory:
# Clone the repository
git clone https://github.com/MarketDataApp/sdk-py.git
cd sdk-py
# Install the package
pip install .
# Or install with optional dependencies
pip install ".[pandas]"
Core Dependencies
The SDK includes the following core dependencies (installed automatically):
httpx>=0.28.1: HTTP client library for making API requestspydantic>=2.12.5: Data validation and settings managementpydantic-settings>=2.12.0: Configuration management from environment variablestenacity>=9.1.2: Retry logic library for handling transient errors
Next Steps
After installation, you'll need to:
- Set up your authentication token
- Learn about the client and how to make your first API requests
- Configure settings to customize output format, date format, and other universal parameters