The official Python client for Polygon.io's REST and Websocket APIs. This package (`polygon-api-client`) reached its end of life at version `1.16.3` and is no longer maintained. For active development, new features, and bug fixes, users should migrate to the successor library, `massive-api-client`.
pip install polygon-api-client==1.16.3Verified import paths — ran on the pinned version, not inferred.
Initialize the REST client and fetch basic reference data. Ensure your API key is set via environment variable or directly in the code. This version of the client defaults to the `api.polygon.io` endpoint.
Uninstall `polygon-api-client` (`pip uninstall polygon-api-client`) and install the successor `massive-api-client` (`pip install massive-api-client`). Update your code to use the new package. The core `from polygon import ...` import structure generally remains the same, but new features and endpoint changes in `massive-api-client` may require code adjustments.
When initializing the client with `massive-api-client`, either allow the new `https://api.massive.com` default or explicitly specify `RESTClient(API_KEY, base_url='https://api.polygon.io')`.
Pass your Polygon.io API key to the `RESTClient` or `WebSocketClient` constructor, or ensure it's available as the `POLYGON_API_KEY` environment variable.
pip uninstall polygon-api-client && pip install massive-api-client — see https://checklist.day/registry/massive-api-client
pip install polygon-api-client (or migrate to massive-api-client)
from polygon import RESTClient
Set POLYGON_API_KEY env var or pass api_key= to RESTClient constructor
No dependency data recorded yet.