Skip to content

Version 1.0.0

Choose a tag to compare

@MarketDataApp MarketDataApp released this 08 Jan 22:20
· 64 commits to main since this release

Market Data Python SDK v1.0.0

We're excited to announce the first stable release of the Market Data Python SDK! This release provides a complete, production-ready interface for accessing real-time and historical financial market data.

Installation

pip install marketdata-sdk-py

Or using uv:

uv pip install marketdata-sdk-py

For DataFrame support (pandas or polars):

pip install "marketdata-sdk-py[pandas]"
# or
pip install "marketdata-sdk-py[polars]"

Key Features

Stocks

  • Prices: Real-time and historical stock prices
  • Quotes: Live bid/ask quotes with market depth
  • Candles: OHLCV data with multiple timeframes
  • Earnings: Earnings calendar and historical data
  • News: Financial news and market updates

Options

  • Chain: Complete options chains with Greeks
  • Expirations: Available expiration dates
  • Strikes: Strike prices for any expiration
  • Quotes: Real-time options quotes
  • Lookup: Find option symbols from natural language queries

Funds

  • Candles: Historical OHLC data for mutual funds

Markets

  • Status: Real-time market open/closed status for multiple countries

Core Capabilities

  • Multiple Output Formats: Choose from DataFrames (pandas/polars), JSON, CSV, or Python objects
  • Built-in Retry Logic: Automatic retry with exponential backoff for reliable data fetching
  • Type-Safe: Full Pydantic validation and comprehensive type hints
  • Zero Config: Works out of the box with sensible defaults
  • Rate Limit Tracking: Automatic rate limit monitoring and management
  • API Status Checking: Automatic service availability verification

Quick Start

from marketdata.client import MarketDataClient

# Initialize client (token from environment variable MARKETDATA_TOKEN)
client = MarketDataClient()

# Get stock prices
df = client.stocks.prices("AAPL")

# Get options chain
chain = client.options.chain("AAPL")

# Get market status
status = client.markets.status(countback=7)

Documentation

Requirements

  • Python >= 3.10 (tested on 3.10, 3.11, and 3.12)

Technical Details

  • HTTP Client: Built on httpx with connection pooling
  • Validation: Pydantic v2 for input/output validation
  • Retry Logic: Tenacity for robust error handling
  • Type Safety: Full type hints throughout the codebase

License

MIT License - see LICENSE for details

Community

Thank You

Thank you for using the Market Data Python SDK! We're committed to providing the best possible experience for accessing financial market data in Python.


Get Started Free: Sign up at www.marketdata.app/signup/ to get your free API token. Includes a 1-month free trial (no credit card required).