gridstatus is an open source Python library, maintained by Grid Status, that fetches electricity market data directly from North American independent system operators (ISOs), regional transmission organizations (RTOs), and the U.S. EIA.
|
⚡ Have you considered our Hosted API? It provides a consistent schema across markets, a maintained historical archive, and server-side filtering. Python users can query it with gridstatusio; other languages can use the REST API directly.
|
- Open source
gridstatusvs. the hosted Grid Status API - Installation
- Getting started
- What's available
- Resources and help
Choose between the open source library and the hosted Grid Status API based on how you want to access and work with the data:
Open source gridstatus |
Hosted Grid Status API and gridstatusio |
|---|---|
| Minimally processed data fetched directly from ISO and EIA sources | Hosted data with consistent column names, timestamp formats, and DST handling |
| Python library with source-specific integrations and fields | Single REST API with a Python client |
| No Grid Status account; most datasets require no API key | Grid Status API key with free and paid plans |
| Historical availability depends on each source's retention policy | Historical data queryable immediately |
| Filtering capabilities vary by source | Consistent server-side filtering by time, columns, and row values |
gridstatus supports Python 3.10+. Install with uv or pip:
uv pip install gridstatus
# or
pip install gridstatusSome sources require credentials, such as an EIA API key or ERCOT API username and password. See .env.template for the full list and supported environment variables.
from gridstatus import CAISO, Ercot, SPP, list_isos
# See the ISO classes exposed by the discovery helper
list_isos()
# Pick an ISO and pull a dataset for a fixed date
iso = Ercot()
fuel_mix = iso.get_fuel_mix("2024-06-01")
# Source-specific methods expose other datasets and market intervals
ercot_lmp = Ercot().get_lmp_by_settlement_point("2024-06-01")
spp_lmp = SPP().get_lmp_real_time_5_min_by_location("2024-06-01")
real_time_15_min_lmp = CAISO().get_lmp_real_time_15_min("2024-06-01")
day_ahead_hourly_lmp = CAISO().get_lmp_day_ahead_hourly("2024-06-01")
print(fuel_mix.head())Most dataset methods return pandas DataFrames, with timezone-aware columns for time-indexed data; columns vary by method and source. Date arguments accept "today", "latest", "historical", an ISO-8601 string ("2024-06-01"), a pd.Timestamp, or a (start, end) range — interpreted in the ISO's own local timezone. Use fixed dates for reproducible results.
Available data includes load, fuel mix, forecasts, locational marginal prices (LMPs), storage, ancillary services, interconnection queues, and more. Coverage and historical availability vary by source.
- ISOs / RTOs / grids: CAISO, ERCOT, PJM, MISO, SPP, NYISO, ISO-NE, IESO, and AESO, plus the U.S. EIA.
- Datasets (vary by ISO): fuel mix, load (demand), load forecasts, locational marginal prices (LMP, day-ahead & real-time), storage, ancillary-service prices, interconnection queues, and more.
The exact dataset coverage per ISO is documented in the API reference.
- Open source: API reference and examples · Changelog · Contributing
- Hosted API: data catalog · OpenAPI spec · docs assistant
- Support: Open a GitHub issue for questions or bugs. Grid Status support is primarily focused on hosted API users, but we'll do our best to help with open source issues.
