Setup
Key market price indicators
| ID | Description |
|---|---|
| 600 | Spot price (OMIE day-ahead) |
| 612 | Intraday session 1 |
| 613 | Intraday session 2 |
| 614 | Intraday session 3 |
Powered by Mintlify
Auto-generate your docs
Analyze electricity market prices from multiple market sessions
from esios import ESIOSClient
client = ESIOSClient()
| ID | Description |
|---|---|
| 600 | Spot price (OMIE day-ahead) |
| 612 | Intraday session 1 |
| 613 | Intraday session 2 |
| 614 | Intraday session 3 |
ids = [600, 612, 613, 614]
handle = client.indicators.get(600)
spain_id = handle.resolve_geo("España")
df = client.indicators.compare(
ids,
start="2025-01-01",
end="2025-01-07",
geo_ids=[spain_id],
)
df
Precio mercado SPOT Diario Precio mercado SPOT Intradiario Sesión 1 ...
datetime
2025-01-01 00:00:00+01:00 134.49 129.89 ...
...
[672 rows × 4 columns]
df_daily = df.resample("D").mean().round(1)
df_daily
Precio mercado SPOT Diario Precio mercado SPOT Intradiario Sesión 1 ...
datetime
2025-01-01 00:00:00+01:00 100.9 99.9
2025-01-02 00:00:00+01:00 134.0 134.4
...
first_col = df.columns[0]
spread = df.subtract(df[first_col], axis=0)
spread.drop(columns=[first_col]).plot(
figsize=(14, 5),
title="Intraday vs Day-Ahead Spread (€/MWh)",
)
df.to_csv("market_prices.csv")