Switzerland EPEX Day-Ahead Historical Price API

Switzerland EPEX Day-Ahead Historical Price API

You need to programmatically pull historical day-ahead power prices for Switzerland and turn them into a clean, queryable timeseries you can chart, cache, or feed into risk, pricing, or P&L models. By the end of this post, you will be able to call the Energy API timeseries endpoint for the Switzerland EPEX Day-Ahead symbol, validate the response structure, and reliably parse units, dates, and base currency for downstream use.

What you are integrating: Switzerland EPEX Day-Ahead (EPEX_CH_DA)

This guide focuses on a single Energy API symbol that represents Switzerland’s day-ahead electricity price:

Illustration: Switzerland EPEX Day-Ahead Historical Price API
  • Symbol name: Switzerland EPEX Day-Ahead
  • Symbol code: EPEX_CH_DA
  • Unit: EUR/MWh
  • Authentication: api_key query parameter (use the literal placeholder YOUR_API_KEY in examples)

All examples use the Energy API timeseries endpoint and focus only on this symbol. Do not pass base=USD when you also need TTF_GAS or EUA_CO2; keep the defaults so you can read values directly in EUR/MWh. No MCP host is required. For pricing and access, Starter is $19.99/mo with a 7-day trial and 50 calls. To get keys, use Register. Read endpoint details in the Documentation.

Endpoint and parameters you will call

You will fetch historical daily values with GET /api/v1/timeseries using three required query parameters: start, end, and symbols, plus api_key for auth:

  • start: YYYY-MM-DD (inclusive)
  • end: YYYY-MM-DD (inclusive)
  • symbols: comma-separated list (use EPEX_CH_DA for Switzerland)
  • api_key: your API key as a query parameter (use YOUR_API_KEY in examples)

The API returns a normalized payload that includes a base currency, rates keyed by symbol, per-symbol date references, and per-symbol currency references. You will primarily use the rates.EPEX_CH_DA field and its associated date and currency.

Official cURL you can copy-paste

Below is the official sample request. Keep the structure exactly as shown; replace YOUR_API_KEY only when you run it.

curl -G "https://energy-api.com/api/v1/timeseries" --data-urlencode "start=2026-01-01" --data-urlencode "end=2026-03-31" --data-urlencode "symbols=EPEX_CH_DA" --data-urlencode "api_key=YOUR_API_KEY"

Understanding the response schema

Use the response fields as follows:

  • success: boolean request status.
  • date: API-level date context (see docs for interpretation).
  • base: base currency across values in the payload (EUR).
  • rates: map of symbol to numeric value.
  • dates: map of symbol to its effective date.
  • currencies: map of symbol to its currency string (EUR).
  • base_filter_note: nullable metadata; can be used to understand filtering behavior.

Copy the official JSON below to validate your parser; field names and shapes matter when you serialize into your models. This example demonstrates the exact structure you’ll receive from the endpoint (from the docs):

Official sample JSON from the docs (schema reference)

{
"success": true,
"date": "2026-10-18",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 76.2848
},
"dates": {
"OMIE_ES_DA": "2026-10-18"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null
}

In your production code, substitute EPEX_CH_DA for your Swiss day-ahead consumption, but keep the shape identical to this sample.

Switzerland EPEX Day-Ahead: real response example

The following is a real payload for the Switzerland EPEX Day-Ahead symbol. Use these exact values to test your parsing and validate mapping to your domain models. Do not alter dates, symbol codes, or numbers in this section.

{"success":true,"date":"2026-10-17","base":"EUR","rates":{"EPEX_CH_DA":217.9379},"dates":{"EPEX_CH_DA":"2026-10-17"},"currencies":{"EPEX_CH_DA":"EUR"},"base_filter_note":null}

From this payload, read:

  • rates.EPEX_CH_DA as the numeric value in EUR/MWh.
  • dates.EPEX_CH_DA as the effective date of that value.
  • currencies.EPEX_CH_DA should be EUR, matching the base.

Field-by-field mapping for timeseries ingestion

When building your collector, normalize each record to a schema like: symbol, date, value, unit, currency, base. Populate as follows:

  • symbol: "EPEX_CH_DA"
  • date: from dates.EPEX_CH_DA
  • value: from rates.EPEX_CH_DA
  • unit: "EUR/MWh" (from catalog facts; not a response field)
  • currency: from currencies.EPEX_CH_DA
  • base: from base

Use idempotent upserts keyed by (symbol, date) so repeated fetches do not duplicate records. This helps when you fetch overlapping ranges, e.g., rolling 90-day windows.

Python example: fetch and parse Switzerland EPEX Day-Ahead

This Python snippet calls the same endpoint as the cURL above, parses the fields you will use, and normalizes into simple records you can insert into a database or a Pandas DataFrame. Keep the endpoint URL, query parameter names, and field names exactly as shown.

import requests
from urllib.parse import urlencode

BASE_URL = "https://energy-api.com/api/v1/timeseries"

def fetch_epex_ch_da(start_date, end_date, api_key):
params = {
"start": start_date,
"end": end_date,
"symbols": "EPEX_CH_DA",
"api_key": api_key,
}
url = f"{BASE_URL}?{urlencode(params)}"
resp = requests.get(url, timeout=30)
resp.raise_for_status()
data = resp.json()
if not data.get("success", False):
raise RuntimeError("API indicated unsuccessful response")

base = data.get("base")
rates = data.get("rates", {})
dates = data.get("dates", {})
currencies = data.get("currencies", {})

# Build normalized records
records = []
# For the timeseries API, read the symbol directly by key
sym = "EPEX_CH_DA"
if sym in rates and sym in dates and sym in currencies:
records.append({
"symbol": sym,
"date": dates[sym], # e.g., "2026-10-17"
"value": rates[sym], # numeric value
"unit": "EUR/MWh", # from catalog facts
"currency": currencies[sym], # should be "EUR"
"base": base, # typically "EUR"
})
else:
# No data for the requested period (e.g., empty or not published)
pass

return records, data

if __name__ == "__main__":
# Replace with your own key at runtime
recs, raw = fetch_epex_ch_da("2026-01-01", "2026-03-31", "YOUR_API_KEY")
for r in recs:
print(r)

Practical integration notes you should not skip

  • Units and base: Values for EPEX_CH_DA are in EUR/MWh. The response base should be EUR; confirm via data.base and currencies.EPEX_CH_DA.
  • Time coverage: Day-ahead power markets are typically published daily. Not all markets align to the same calendar; if a particular date is missing, handle gaps gracefully and rely on dates.EPEX_CH_DA to confirm coverage.
  • Timezone: Dates arrive as YYYY-MM-DD without explicit timezone in the examples. Treat them as market-effective dates; if you need hourly alignment or time zones, consult the Documentation.
  • Caching: Cache by (symbol, start, end) for API responses and by (symbol, date) for normalized records. This minimizes duplicate parsing and downstream writes for overlapping windows.
  • Pagination: The provided endpoint and schema do not show pagination parameters. If you request long ranges, consider splitting by month or quarter, then upsert to your store.
  • Currency conversion: Do not pass base=USD when you also need TTF_GAS or EUA_CO2. Keep the default base to ensure consistent EUR semantics for EPEX_CH_DA.
  • Idempotency: Use database constraints or merge semantics on (symbol, date) to avoid duplicates.
  • Validation: Assert that currencies.EPEX_CH_DA == "EUR" and base == "EUR" before persisting, so all downstream analytics operate on consistent units.

Re-using the schema: verify with real Switzerland payload

Below is the same real EPEX_CH_DA example provided earlier. Keep this around as a unit test fixture to confirm your parser is stable against field names, casing, and numeric parsing rules.

{"success":true,"date":"2026-10-17","base":"EUR","rates":{"EPEX_CH_DA":217.9379},"dates":{"EPEX_CH_DA":"2026-10-17"},"currencies":{"EPEX_CH_DA":"EUR"},"base_filter_note":null}

How to query rolling ranges for dashboards

For dashboards that show recent windows (e.g., last 90 days), call the same endpoint with the current date and a computed start date. Persist only changed points. If you need to overlay Switzerland EPEX with related energy benchmarks, you can add more symbols to the same request; however, stay consistent with currency/base and do not introduce base=USD in the same query when also pulling TTF_GAS or EUA_CO2.

For example, a nightly job might:

  • Compute start = first day of the quarter, end = yesterday, symbols = EPEX_CH_DA
  • Fetch and normalize to records
  • Upsert by (symbol, date) into your warehouse
  • Invalidate dashboard cache keys tied to that symbol/date range

Testing checklist before production

  • Connectivity: Ensure your environment can reach https://energy-api.com over TLS.
  • Auth: Verify YOUR_API_KEY is passed as an api_key query parameter.
  • Parsing: Confirm your JSON parser reads success, base, rates, dates, currencies without renaming.
  • Validation: Assert currencies.EPEX_CH_DA == "EUR" and base == "EUR".
  • Idempotent writes: Upsert on (symbol, date), not append-only.
  • Monitoring: Alert if the date for EPEX_CH_DA lags more than your acceptable threshold, or if values are missing for expected dates.

Schema cross-check: documented shape vs. Switzerland symbol

Use the official docs sample below as a shape reference. While it references a different market symbol, the field names and structure are the same as your Switzerland EPEX Day-Ahead responses. Keep this handy during code reviews to ensure field names remain unchanged in your integration.

{
"success": true,
"date": "2026-10-18",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 76.2848
},
"dates": {
"OMIE_ES_DA": "2026-10-18"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null
}

Switzerland example fixture for your unit tests

Store the following example exactly as-is in your test suite to confirm your deserialization logic. It’s the same real response shown above, repeated here to make it easy to copy without scrolling.

{"success":true,"date":"2026-10-17","base":"EUR","rates":{"EPEX_CH_DA":217.9379},"dates":{"EPEX_CH_DA":"2026-10-17"},"currencies":{"EPEX_CH_DA":"EUR"},"base_filter_note":null}

FAQ

Q: Which symbol should I use for Switzerland day-ahead electricity?
EPEX_CH_DA. The currency is EUR and the unit is EUR/MWh.

Q: What fields are essential to build a historical timeseries?
For Switzerland EPEX Day-Ahead, read rates.EPEX_CH_DA (value), dates.EPEX_CH_DA (effective date), currencies.EPEX_CH_DA (currency), and base (global base currency, typically EUR).

Q: Can I request multiple symbols in one call?
Yes, pass them comma-separated to symbols. Keep base handling consistent, and do not pass base=USD when you also need TTF_GAS or EUA_CO2.

Q: How do I authenticate?
Include api_key=YOUR_API_KEY as a query parameter. Do not embed real keys in code you commit publicly.

Q: What about missing dates or non-publication days?
If a date is not present for a symbol, your parser should tolerate gaps and rely on dates.EPEX_CH_DA to confirm the effective date of the received value. For additional schedule details, see the Documentation.

Register and start your integration

Create your API key and run the cURL above in minutes. The Starter plan is $19.99/mo with a 7-day trial (50 calls), which is sufficient to wire up your initial ETL and dashboards for EPEX_CH_DA. Get your key here: Register. Then read the endpoint specifics in the Documentation and ship your timeseries collector.

Ready to get started?

Get your API key and start querying energy commodity prices in minutes.

Get API Key

Related posts