skillfed

polygon-api-client

Official Polygon.io REST and Websocket client.

polygon-api-client v1.16.3 793.2K downloads/30d#5,043 on PyPI1,496
Permissive license MIT Active released

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 on this page — 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

polygon-api-client on PyPI

pip

pip install polygon-api-client

uv

uv add polygon-api-client

poetry

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="<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 the current Python release (<4.0,>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 3 — urllib3, websockets, certifi
Maintenance actively maintained — 288 days since the last release
Last repo commit
First released
Downloads 793,154/month — #5,043 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: polygon_api_client-1.16.3-py3-none-any.whl

Keywords: polygon, free, rest, stock, market, data, api, polygon.io, websocket, client

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

stock market data api clientpolygon.io python clientwebsocket real-time market datarest api financial datatrade quote aggregate dataoptions chain apimassive.com python sdk
financial-datawebsocketmarket-data

More WWW/HTTP packages