Skip to main content
Analyze electricity market prices from multiple market sessions (day-ahead, intraday sessions 1–3).

Setup

from esios import ESIOSClient

client = ESIOSClient()

Key market price indicators

IDDescription
600Spot price (OMIE day-ahead)
612Intraday session 1
613Intraday session 2
614Intraday session 3
ids = [600, 612, 613, 614]

Fetch all market prices for España

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
Returns a DataFrame with one column per market session:
                           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]

Daily average prices

df_daily = df.resample("D").mean().round(1)
df_daily
Returns daily averages:
                           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
...

Price spread analysis

The spread between intraday sessions and the day-ahead price:
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)",
)

Export to CSV

df.to_csv("market_prices.csv")

Next steps

Build docs developers (and LLMs) love