How to store snapshots of ENTSO-E data, so you can see exactly what it showed on a given day
Published
Store every raw ENTSO-E API response exactly as it arrived, with the time you fetched it, the query that produced it and a SHA-256 hash of the bytes, then index the snapshots by data item, area and delivery day so that any two fetches of the same day can be compared. ENTSO-E corrects, backfills and overwrites published values, and a repeat request returns only the current one, so the snapshot you saved is the only record of what it showed on the day.
An archive starts the day you start it. Nothing it did not fetch can be recovered later, by you or by anyone else. For the week the API goes down, keep a fallback to the File Library ready and record which source each snapshot came from.
ENTSO-E answers with today's values, not the ones it showed before
The Transparency Platform answers every request with the values it holds now. When a TSO corrects a figure, or publishes a day that was missing, the old answer is gone: the same query returns the new one, and nothing in it says what the earlier answer was. In Voltstack's capture from 23 Sep to 28 Oct 2026, at least 2,423 of 3,674 quarter-hours of Spain's surplus imbalance price, 2,456 of 3,677 of its deficit price and 1,606 of 3,274 of Austria's surplus price were corrected after Voltstack first read them.
| Series | Quarter-hours first seen | Corrected, at least | Share, a minimum |
|---|---|---|---|
| Spain imbalance price, surplus (A04) | 3,674 | 2,423 | 66% |
| Spain imbalance price, deficit (A05) | 3,677 | 2,456 | 67% |
| Austria imbalance price, surplus (A04) | 3,274 | 1,606 | 49% |
Window 23 Sep 2026 to 28 Oct 2026, 14:02 UTC. Every count is a minimum: imbalance prices were re-read for only about three days after delivery, so later corrections are not in it. Working paper doi:10.5281/zenodo.23749147, change records doi:10.5281/zenodo.23749094.
Backfill is the other half. When we looked on 14 Sep 2026, the day-ahead answer for DE-LU delivery day 13 Sep carried no SDAC series; by 23 Sep ENTSO-E had published one. A table refreshed on 23 Sep holds that day's SDAC prices and gives no sign that they were missing on the 14th. Only a snapshot from the 14th shows it.
Keep each response as it came, and index it
- Fix your queries. One request per data item, area and delivery day, with the window in UTC, sent the same way every time. Two fetches compare only if they asked the same question.
- Store the raw bytes unchanged. That is XML for most data items, a ZIP archive for imbalance prices (A85) and unit outages (A77, A80), and an acknowledgement document when there is no data. Keep the acknowledgement too: “nothing published yet” is part of what it showed on the day. Parse later, from the stored bytes, so a parser bug fixed next month can be run again over the whole archive.
- Record each fetch. The time you fetched it, in UTC from your own clock; the query parameters, sorted, with the token left out; the HTTP status; the content type; the size; a SHA-256 hash of the body; and the source, Web API or File Library. Keep failed answers as well: a run of 503 rows is your record that the API was down.
- Name each file by its hash. The hash proves later that the file is the one you fetched, and a byte-identical answer costs one manifest row and no new file. Do not count on that saving: each answer carries a document
mRIDand acreatedDateTime, which can differ between two fetches of unchanged values. - Fetch recent days again. A single fetch per day catches nothing that changes afterwards. Re-read the last few delivery days on every run, and imbalance prices for weeks rather than days.
- Index the points. Parse each stored answer into rows of data item, area, interval, value, the time you saw it and the hash of the file it came from, and write a row only when the value differs from the newest one you hold.
- Never update or delete a row. The archive is append-only, or it is not an archive.
Steps 2 to 4 in Python
The token comes from an environment variable and is never written to the manifest. The parser that turns the stored XML and ZIP answers into points is in the ENTSO-E API guide, with the traps that come with it.
import hashlib
import json
import os
import sqlite3
from datetime import datetime, timezone
from pathlib import Path
import requests
API = "https://web-api.tp.entsoe.eu/api"
TOKEN = os.environ["ENTSOE_TOKEN"]
ROOT = Path("entsoe-archive")
ROOT.mkdir(parents=True, exist_ok=True)
db = sqlite3.connect(ROOT / "manifest.sqlite")
db.execute(
"""CREATE TABLE IF NOT EXISTS fetch (
fetched_at TEXT NOT NULL,
source TEXT NOT NULL,
query TEXT NOT NULL,
status INTEGER NOT NULL,
content_type TEXT,
size INTEGER NOT NULL,
sha256 TEXT NOT NULL
)"""
)
def snapshot(**params):
"""Fetch once, keep the bytes as they came, and record the fetch."""
fetched_at = datetime.now(timezone.utc).isoformat(timespec="seconds")
r = requests.get(API, params={"securityToken": TOKEN, **params}, timeout=60)
body = r.content
digest = hashlib.sha256(body).hexdigest()
path = ROOT / "raw" / digest[:2] / digest
if not path.exists():
path.parent.mkdir(parents=True, exist_ok=True)
path.write_bytes(body)
db.execute(
"INSERT INTO fetch VALUES (?, ?, ?, ?, ?, ?, ?)",
(fetched_at, "web-api", json.dumps(params, sort_keys=True),
r.status_code, r.headers.get("Content-Type"), len(body), digest),
)
db.commit()
return r.status_code, digest
# The same query every time, so that fetches of one delivery day compare.
status, digest = snapshot(
documentType="A85",
controlArea_Domain="10YES-REE------0",
periodStart="202611042300",
periodEnd="202611052300",
)Step 6, and the two questions the archive answers
With one row per change, “what did it show at a past moment” is the newest row at or before that moment, and “what changed” is every interval with more than one row:
CREATE TABLE point (
data_item TEXT NOT NULL,
area TEXT NOT NULL,
interval_start TEXT NOT NULL,
value REAL,
seen_at TEXT NOT NULL,
sha256 TEXT NOT NULL,
PRIMARY KEY (data_item, area, interval_start, seen_at)
);
-- What did ENTSO-E show for each quarter-hour at 07:00 UTC on 5 Nov 2026?
SELECT p.interval_start, p.value
FROM point p
WHERE p.data_item = 'A85 A04' AND p.area = '10YES-REE------0'
AND p.seen_at = (
SELECT max(q.seen_at) FROM point q
WHERE q.data_item = p.data_item AND q.area = p.area
AND q.interval_start = p.interval_start
AND q.seen_at <= '2026-11-05T07:00:00+00:00'
);
-- Which points changed after they were first seen?
SELECT data_item, area, interval_start,
min(seen_at) AS first_seen, max(seen_at) AS last_changed, count(*) AS versions
FROM point
GROUP BY data_item, area, interval_start
HAVING count(*) > 1;Compare two fetches of the same delivery day
- Compare the parsed points, not the hashes. A different
mRID,createdDateTimeor point order changes the hash without changing a value, so different hashes do not by themselves mean that anything changed. The hash tells you which stored file each value came from. - Same hash: the answers are identical, byte for byte, and nothing changed between the two fetches.
- Compare the values with a small threshold, so that a change in the last decimal is not counted as a correction.
- Keep the status the document carries beside your own time. Imbalance price documents are marked intermediate or final; a correction to an intermediate figure is expected, one to a final figure is news.
How to keep getting ENTSO-E data if the API goes down for a week
It happens. The Web API answered 503 from the evening of 30 Aug 2026 until 2 Sep, when ENTSO-E rolled back a failed move to new infrastructure, and our monitoring saw it down again for about 27 hours on 7 and 8 Sep.
- Build the File Library fallback before you need it. The File Library serves the same data items as bulk CSV files at
fms.tp.entsoe.eu, with its own login (your account email and password, not the API token) and its own limit of 100 requests a minute. ENTSO-E said it kept working through the first outage, and it kept serving monthly extracts. - Store the File Library answer as its own snapshot, with the source marked. It is a different product with its own timing, so a value from it is not the value the API would have shown at the same moment.
- Alert on stale data, not only on failed requests. An answer can succeed and still be empty or old; check the newest interval you hold against the clock.
- Come back slowly. The limit is 400 requests a minute per token, and going over it brings a ban of about ten minutes. When the API returned on 8 Sep 2026, our own retries went over the limit at once, and the first answer after the outage was the ban. Fetch the missed days again through a gate that spaces the requests.
- Mark the gap honestly. What you fetch after the outage is what ENTSO-E shows after the outage. Your archive holds no snapshot from the days it was down, and it should say so rather than file the later fetch under the earlier date.
What such an archive cannot do
- It starts the day you start it. The API keeps no earlier value, so nothing before your first fetch can be filled in, and a day that was backfilled before you started reads as if it had always been complete.
- Outage filings are a partial exception. Older versions of one outage come back on a request that names its
mRID, one outage at a time. No single request rebuilds the outage list as it stood on a past morning. - First fetch is not first publication. A value may have been public, and changed, between two of your fetches. The archive shows what it showed when you looked, as often as you looked.
- It catches only what it re-reads. A correction made after you stop fetching a day is not in it.
Keeping a copy is not the same as republishing it
ENTSO-E's free re-use list covers imbalance prices, cross-border physical flows and the day-ahead load forecast under CC BY 4.0, but not day-ahead prices, actual total load or actual generation per type, which need the owner's agreement. Check the list for each data item before the archive leaves your desk; the ENTSO-E API guide sets it out item by item.
If you need the days before your archive starts
Since 23 Sep 2026 Voltstack has kept ENTSO-E day-ahead prices, imbalance prices and cross-border flows as it first read them, and its hourly figures for generation and load from the same date. It has kept outage messages since 14 Jul 2026, and holds nothing kept this way from before those dates. We cannot fill in anything earlier either. If those dates cover what you need, ask for early access.
Request early access →Frequently asked questions
What's the best way to store snapshots of ENTSO-E data so I can see exactly what it showed on a given day?
How do I keep getting ENTSO-E data if the API goes down for a week?
Can I recover what ENTSO-E showed before I started keeping snapshots?
Does ENTSO-E change data after it is published?
More on ENTSO-E data
Disclaimer: This guide is produced by Voltstack Intelligence for information only and is not investment advice. The outage dates and the File Library behaviour are as we saw and read them in August and September 2026; ENTSO-E may change either. Corrections to research@voltstack.energy.
Sources: ENTSO-E Transparency Platform (https://transparency.entsoe.eu/), its Web API and File Library, CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) for the items on its free re-use list. Corrections measured from Voltstack's capture, 23 Sep 2026 to 28 Oct 2026: working paper doi:10.5281/zenodo.23749147 and dataset doi:10.5281/zenodo.23749094, both CC BY 4.0. No prices are printed on this page.