--- id: polygon-api-client version: "1.16.3" license: MIT license_treatment: permissive maintenance: active --- # polygon-api-client — Official Polygon.io REST and Websocket client. License: permissive · Maintenance: active · Downloads: 793.2K/mo ## What it is and what it does This is the official Python client for Massive (rebranded from Polygon.io on October 30, 2025), providing both REST and WebSocket interfaces to financial market data. The REST client handles stock trades, quotes, aggregates (OHLCV bars), and options chains with automatic pagination by default, while the WebSocket client streams real-time tick data for subscribed symbols. The library abstracts away connection management, pagination logic, and API authentication, letting you focus on data retrieval. The package depends on urllib3 for HTTP requests, websockets for real-time connections, and certifi for SSL certificate validation. It supports Python 3.9 and newer, with no system-level compiled dependencies. Pagination is enabled by default for list endpoints, meaning the limit parameter controls page size rather than total results—you can disable this if you need a fixed result count. The client includes debug mode for inspecting request and response details. Use it for: - Fetch historical stock trades and quotes for backtesting trading strategies or analyzing market microstructure. - Stream real-time tick data via WebSocket for live trading systems or market monitoring dashboards. - Query options chains with filter parameters for options analysis and research. - Build data pipelines that aggregate OHLCV bars at various timeframes for technical analysis. - Retrieve last trade and quote snapshots for current market price lookups in applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides REST and WebSocket client libraries for accessing Massive financial market data APIs, including stock trades, quotes, aggregates, and options chains. Yes. The package has low install friction, active maintenance, no known vulnerabilities, permissive licensing, and broad Python version support. It is the official client for a widely-used financial data API, making it the natural choice if you need Massive market data in Python. The main constraint is needing a valid API key and accepting the free tier's rate limits. ## Install pip install polygon-api-client uv add polygon-api-client poetry add polygon-api-client ## Installing polygon-api-client Before you install: Low install friction with only three runtime dependencies (urllib3, websockets, certifi). Actively maintained with recent commits and 1496 repository stars. Supports Python 3.9 through 3.14. License in practice: MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects. Quickstart: pip install -U massive from polygon_api_client import RESTClient client = RESTClient(api_key="") trades = [t for t in client.list_trades(ticker="AAPL", timestamp="2022-01-04")] Requires a Massive API key. API free tier has usage limitations and may trigger rate limits. Verify before relying: - Exact rate limit thresholds and behavior under free tier usage. - WebSocket reconnection and error handling behavior in production scenarios. - Performance characteristics when fetching very large historical datasets. - Whether import path is 'polygon_api_client' or 'massive' in current version. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 793.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags stock market data api client, polygon.io python client, websocket real-time market data, rest api financial data, trade quote aggregate data, options chain api, massive.com python sdk, financial-data, websocket, market-data [View on SkillFed](https://skillfed.io/packages/polygon-api-client) · [View on PyPI](https://pypi.org/project/polygon-api-client/)