Massive.com Python Client (formerly Polygon.io)
Official Python client for Massive.com (formerly Polygon.io) REST and WebSocket financial data APIs. Polygon.io rebranded as Massive.com on October 30, 2025. Package renamed from polygon-api-client. Import path changed from 'polygon' to 'massive'. Both api.polygon.io and api.massive.com remain operational. Current stable version follows the polygon-api-client release cadence.
Common errors
-
ImportError: cannot import name 'RESTClient' from 'polygon'
cause Using old import path after upgrading to massive-api-client v2.x.fixChange 'from polygon import RESTClient' to 'from massive import RESTClient'. -
ModuleNotFoundError: No module named 'massive'
cause Still using polygon-api-client v1.x or package not installed.fixRun 'pip install massive-api-client' to get v2.x with the new import path. -
401 Client Error: Unauthorized for url: https://api.massive.com
cause API key not passed or invalid.fixPass API key explicitly: RESTClient(api_key=os.environ['POLYGON_API_KEY']) or set POLYGON_API_KEY env var.
Warnings
- breaking Import path changed from 'polygon' to 'massive' in v2.0.0. 'from polygon import RESTClient' no longer works with the new package.
- breaking Default API base URL changed from api.polygon.io to api.massive.com in v2.0.0. Both domains remain operational.
- gotcha Existing POLYGON_API_KEY values continue to work with Massive.com. No key rotation needed.
Install
-
pip install massive-api-client -
pip install polygon-api-client
Imports
- RESTClient
from polygon import RESTClient
from massive import RESTClient
- WebSocketClient
from polygon.websocket import WebSocketClient
from massive.websocket import WebSocketClient
Quickstart
import os
from massive import RESTClient
API_KEY = os.environ.get('POLYGON_API_KEY') or os.environ.get('MASSIVE_API_KEY')
with RESTClient(API_KEY) as client:
resp = client.get_aggs('AAPL', 1, 'day', '2024-01-01', '2024-01-10')
for agg in resp.results:
print(agg)