Miso Api#
Module Contents#
Classes Summary#
Class for querying the MISO API. Currently supports only pricing data. |
Attributes Summary#
Contents#
- gridstatus.miso_api.BASE_LOAD_GENERATION_AND_INTERCHANGE_URL = 'https://apim.misoenergy.org/lgi/v1'[source]#
- gridstatus.miso_api.LOAD_GENERATION_AND_INTERCHANGE_PRODUCT = 'load_generation_and_interchange'[source]#
- class gridstatus.miso_api.MISOAPI(pricing_api_key: str | None = None, load_generation_and_interchange_api_key: str | None = None, initial_sleep_seconds: int = 1, max_retries: int = 3, exponential_base: int = 2)[source]#
Class for querying the MISO API. Currently supports only pricing data.
- Parameters:
pricing_api_key – The API key for the pricing API. Can be a comma-separated list of keys if you have multiple keys.
load_generation_and_interchange_api_key – The API key for the load, generation, and interchange API. Can be a comma-separated list of keys if you have multiple keys.
initial_sleep_seconds – The number of seconds to wait between each request. Used to address rate limiting (429 responses).
max_retries – The maximum number of retries for failed requests. Uses exponential backoff between retries. Used to address the common 503 errors from the MISO API.
exponential_base – The base for exponential backoff calculation. Sleep time is exponential_base^(attempt+1) seconds. Default is 2, which gives delays of 2, 4, 8 seconds for attempts 0, 1, 2.
Attributes
current_load_generation_and_interchange_key_index
0
current_pricing_key_index
0
default_timezone
‘EST’
exponential_base
2
initial_sleep_seconds
1
load_generation_and_interchange_api_key
None
load_generation_and_interchange_api_keys
None
max_retries
3
pricing_api_key
None
pricing_api_keys
None
Methods
get_actual_load_daily(→ pandas.DataFrame)get_actual_load_hourly(→ pandas.DataFrame)get_actual_load_hourly_pivoted(→ pandas.DataFrame)Get actual load by local resource zone in hourly intervals,
get_as_mcp_day_ahead_ex_ante(→ pandas.DataFrame)get_as_mcp_day_ahead_ex_post(→ pandas.DataFrame)get_as_mcp_real_time_5_min_ex_ante(→ pandas.DataFrame)get_day_ahead_cleared_demand_daily(→ pandas.DataFrame)get_day_ahead_cleared_demand_hourly(→ pandas.DataFrame)get_interchange_hourly(→ pandas.DataFrame)get_lmp_day_ahead_hourly_ex_ante(→ pandas.DataFrame)get_lmp_day_ahead_hourly_ex_post(→ pandas.DataFrame)get_lmp_real_time_5_min_ex_ante(→ pandas.DataFrame)get_lmp_real_time_5_min_ex_post_final(→ pandas.DataFrame)get_lmp_real_time_5_min_ex_post_prelim(→ pandas.DataFrame)get_lmp_real_time_hourly_ex_post_final(→ pandas.DataFrame)get_lmp_real_time_hourly_ex_post_prelim(→ pandas.DataFrame)get_look_ahead_hourly(→ pandas.DataFrame)Get look-ahead hourly data combining medium-term load forecast and outage forecast.
get_medium_term_load_forecast_daily(→ pandas.DataFrame)get_medium_term_load_forecast_hourly(→ pandas.DataFrame)Get medium term load forecast aggregated from individual zones (Z1-Z10)
get_outage_forecast(→ pandas.DataFrame)Get hourly outage forecast. The API only returns hourly data for today and
get_pricing_nodes(→ pandas.DataFrame)Retrieve MISO pricing nodes for a specific date or date range.
get_real_time_cleared_demand_daily(→ pandas.DataFrame)get_real_time_cleared_demand_hourly(→ pandas.DataFrame)get_real_time_cleared_generation_hourly(→ pandas.DataFrame)NOTE: This function is not ready for use yet. MISO Real-Time Cleared Generation API returns wrong timestamp.
- get_actual_load_daily(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, geo_resolution: Literal['region', 'localResourceZone'] = 'region') pandas.DataFrame[source]#
- get_actual_load_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, geo_resolution: Literal['region', 'localResourceZone'] = 'region') pandas.DataFrame[source]#
- get_actual_load_hourly_pivoted(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
Get actual load by local resource zone in hourly intervals, pivoted with zones as columns.
Returns columns: Interval Start, Interval End, LRZ1, LRZ2 7, LRZ3 5, LRZ4, LRZ6, LRZ8 9 10, MISO
- get_as_mcp_day_ahead_ex_ante(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, use_daily_requests: bool = False) pandas.DataFrame[source]#
- get_as_mcp_day_ahead_ex_post(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, use_daily_requests: bool = False) pandas.DataFrame[source]#
- get_as_mcp_real_time_5_min_ex_ante(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, use_daily_requests: bool = False) pandas.DataFrame[source]#
- get_as_mcp_real_time_5_min_ex_post_final(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, use_daily_requests: bool = False) pandas.DataFrame[source]#
- get_as_mcp_real_time_5_min_ex_post_prelim(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, use_daily_requests: bool = False) pandas.DataFrame[source]#
- get_as_mcp_real_time_hourly_ex_post_final(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, use_daily_requests: bool = False) pandas.DataFrame[source]#
- get_as_mcp_real_time_hourly_ex_post_prelim(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, use_daily_requests: bool = False) pandas.DataFrame[source]#
- get_day_ahead_cleared_demand_daily(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_day_ahead_cleared_demand_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_day_ahead_cleared_generation_physical_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_day_ahead_cleared_generation_virtual_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_day_ahead_generation_fuel_type_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_day_ahead_net_scheduled_interchange_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_day_ahead_offered_generation_ecomax_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_day_ahead_offered_generation_ecomin_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_interchange_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_lmp_day_ahead_hourly_ex_ante(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, **kwargs) pandas.DataFrame[source]#
- get_lmp_day_ahead_hourly_ex_post(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, **kwargs) pandas.DataFrame[source]#
- get_lmp_real_time_5_min_ex_ante(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, **kwargs) pandas.DataFrame[source]#
- get_lmp_real_time_5_min_ex_post_final(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, **kwargs) pandas.DataFrame[source]#
- get_lmp_real_time_5_min_ex_post_prelim(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, **kwargs) pandas.DataFrame[source]#
- get_lmp_real_time_hourly_ex_post_final(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, **kwargs) pandas.DataFrame[source]#
- get_lmp_real_time_hourly_ex_post_prelim(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, **kwargs) pandas.DataFrame[source]#
- get_look_ahead_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, publish_time: str | pandas.Timestamp | None = None) pandas.DataFrame[source]#
Get look-ahead hourly data combining medium-term load forecast and outage forecast. Look-ahead data is only available for future dates (today and beyond). Historical look-ahead data is not supported.
Returns DataFrame with columns: Interval Start, Interval End, Publish Time, Region, MTLF, Outage This matches the output of MISO().get_look_ahead_hourly().
- get_medium_term_load_forecast_daily(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, publish_time: str | pandas.Timestamp | None = None) pandas.DataFrame[source]#
- get_medium_term_load_forecast_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, publish_time: str | pandas.Timestamp | None = None) pandas.DataFrame[source]#
- get_medium_term_load_forecast_hourly_aggregated(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False, publish_time: str | pandas.Timestamp | None = None) pandas.DataFrame[source]#
Get medium term load forecast aggregated from individual zones (Z1-Z10) to LRZ aggregates and pivoted with zones as columns.
Returns columns: Interval Start, Interval End, Publish Time, LRZ1 MTLF, LRZ2_7 MTLF, LRZ3_5 MTLF, LRZ4 MTLF, LRZ6 MTLF, LRZ8_9_10 MTLF, MISO MTLF
- get_outage_forecast(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
Get hourly outage forecast. The API only returns hourly data for today and future days. Historical outage forecast data is not supported.
Note: Outage forecast is only available for future dates (today and beyond).
- get_pricing_nodes(date: str | pandas.Timestamp | None = 'latest', end: pandas.Timestamp | None = None, verbose: bool = False) pandas.DataFrame[source]#
Retrieve MISO pricing nodes for a specific date or date range.
MISO pricing nodes change quarterly on March 1st, June 1st, September 1st, and December 1st. New pricing nodes become effective on these dates, some pricing nodes are retired/removed and some nodes change names/node ids.
- Parameters:
date – The date for which to retrieve pricing nodes. If None, defaults to “latest”. Can be a pd.Timestamp or “latest”.
end – Optional end date for a date range. If provided, retrieves pricing nodes for all quarterly updates between date and end.
verbose – If True, prints additional information during data retrieval.
- get_real_time_cleared_demand_daily(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- get_real_time_cleared_demand_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
- abstractmethod get_real_time_cleared_generation_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#
NOTE: This function is not ready for use yet. MISO Real-Time Cleared Generation API returns wrong timestamp. The timestamps are off by 5 hours, seems to be a timezone issue, UTC instead of EST.
- get_real_time_committed_generation_ecomax_hourly(date: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp], end: str | pandas.Timestamp | tuple[pandas.Timestamp, pandas.Timestamp] | None = None, verbose: bool = False) pandas.DataFrame[source]#