Skip to content

Releases: MarketDataApp/sdk-py

Release v1.2.0

13 Feb 21:23

Choose a tag to compare

What's Changed

Fixed

  • Timezone handling: API times are now correctly parsed; expirations use dateformat=unix for complete timestamps
  • Token obfuscation in logs for security
  • Stock candles now accept string input for 'from' and 'to' dates
  • Settings model now allows extra environment variables without validation errors
  • User agent string is now RFC 7231 compliant
  • URL building for /user endpoint

Added

  • support_info and support_context properties on error results for enhanced debugging
  • Improved exception wrapping ensures all errors include support context

Changed

  • Updated logging format and resource lifecycle logging
  • Removed /user and /status requests from response logging
  • User agent updated to match PyPI package name (marketdata-sdk-py)

Full Changelog: v1.1.0...v1.2.0

Release v1.1.0 - Enhanced Date Format Handling

15 Jan 12:59

Choose a tag to compare

Added

  • Enhanced date format handling for dataframe outputs

    • Automatic detection of date/datetime columns from output schemas
    • Improved date format parameter support across all endpoints (stocks, options, funds, markets)
    • Better date handling for both pandas and polars handlers
    • Date format now properly respected when converting date/datetime columns in DataFrames
  • New example: Stock Prices Monitor

    • Added examples/stock_prices_monitor_example.py - a terminal dashboard for monitoring stock prices
    • Features include:
      • Auto-refreshing terminal table with stock prices
      • Color-coded price changes (green for up, red for down)
      • Sortable by percentage change
      • Requires rich and pandas (optional dependencies)

Changed

  • Refactored dataframe output handlers to derive date/datetime columns from output schemas
  • Improved date format conversion logic in both pandas and polars handlers
  • Enhanced test coverage for date format handling across all resources

Version 1.0.0

08 Jan 22:20

Choose a tag to compare

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).