Registry / http-networking / massive

massive

JSON →
library2.8.0pypypiunverified

The `massive` library is the official Python client for the Massive (formerly Polygon.io) REST and WebSocket APIs. It provides comprehensive access to real-time and historical market data for Stocks, Options, Forex, and Crypto. The library is currently at version 2.5.0 and aims to follow the API's release cadence, often bundling breaking changes and maintaining backward compatibility where feasible.

pip install -U massive
INSTALL
IMPORT
SIG · MASSIVE
M
massive
http-networkingpythonv2.8.0
Install
2.0s avg
Import
904ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.958s · 21.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.0s · import 0.851s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RESTClient
from massive import RESTClient
from polygon import RESTClient
The library rebranded from Polygon.io to Massive.com, changing the package name and import path from 'polygon' to 'massive' in v2.0.1.
WebSocketClient
from massive import WebSocketClient
from polygon import WebSocketClient
Similar to RESTClient, the WebSocket client import also changed due to the rebranding.

This quickstart demonstrates how to initialize the `RESTClient` using an API key (preferably from an environment variable) and fetch historical aggregate bars for a stock like Apple (AAPL). It iterates through the results, printing each aggregate bar.

import os from massive import RESTClient from datetime import date api_key = os.environ.get('MASSIVE_API_KEY', 'YOUR_API_KEY') if api_key == 'YOUR_API_KEY': print("WARNING: Please set the MASSIVE_API_KEY environment variable or replace 'YOUR_API_KEY' with your actual API key.") # Exit or raise an error in a real application client = RESTClient(api_key=api_key) ticker = "AAPL" multiplier = 1 timespan = "day" from_date = date(2023, 1, 1) to_date = date(2023, 1, 5) print(f"Fetching aggregate bars for {ticker} from {from_date} to {to_date}...") try: aggs = [] for a in client.list_aggs(ticker=ticker, multiplier=multiplier, timespan=timespan, from_=from_date, to=to_date): aggs.append(a) if aggs: print(f"Retrieved {len(aggs)} aggregate bars:") for agg in aggs: print(agg) else: print("No aggregate bars found for the specified period.") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingThe library underwent a major rebranding from Polygon.io to Massive.com in v2.0.1. This changed the package name from `polygon` to `massive`, updated default API base URLs (e.g., `api.polygon.io` to `api.massive.com`), and necessitated changes in import statements.
fix
Update your `pip install` command to `pip install massive` and change import statements from `from polygon import ...` to `from massive import ...`. Existing API keys and `api.polygon.io` endpoints will continue to work for an extended period, but updating is recommended.
affects: >=2.0.1
breakingThe Futures Beta Endpoints were significantly updated and consolidated in v2.1.0. Endpoints like `/futures/vX/contracts`, `/futures/vX/products`, and `/futures/vX/schedules` now handle both lists and specific details, replacing older separate endpoints.
fix
Refer to the updated Futures API documentation for the new consolidated endpoint structures and methods. Your existing Futures API calls may need to be refactored.
affects: >=2.1.0
breakingEffective November 3, 2025 (v2.0.x series), the `bid_size` and `ask_size` fields for stock quotes now report values in shares instead of round lots. This change aligns with SEC Market Data Infrastructure (MDI) Rules.
fix
Adjust your parsing and calculations for stock quote sizes, as they now represent raw share counts. Historical flat files will also be regenerated to reflect this change.
affects: >=2.0.1
deprecatedThe Benzinga News v1 API was officially sunset on December 1, 2025. This endpoint is no longer available.
fix
Migrate to the Benzinga News v2 API. The v2 API includes small breaking changes that enabled real-time delivery architecture and provides faster access to news. Consult the Benzinga News v2 documentation for migration details.
affects: All versions
gotchaUsers of the free tier API may encounter rate limit errors (`HTTP 429 Too Many Requests`) due to usage limitations.
fix
Review Massive.com's subscription plans for higher usage limits suitable for your application. Implement robust error handling and retry logic with exponential backoff for API calls.
affects: All versions
Upgrade
Version history
2.8.0latest on PyPI · released May 26, 2026
Audit
Dependencies
httpxrequiredUsed for HTTP requests by the underlying client.
Agent activity
4 hits · last 30 days
node
4
Resources