Vooluhinna API
Vooluhinna andmed on avatud ka masinloetavalt: tasuta JSON API ilma võtme ja registreerimiseta. Saadaval on Nord Poolis selgunud EE hinnapiirkonna päev-ette tunnihinnad ning meie mudeli tõenäosuslik hinnaprognoos (p10/p50/p90) avaliku akna ulatuses.
API on mõeldud integratsioonideks — koduautomaatika, laadimise ajastamine, dashboardid. Vastused on CORS-iga avatud, nii et ka brauserirakendus saab otse pärida.
Kiirstart
curl https://vooluhind.ee/api/v1/forecast
Näidisvastus (lühendatud):
{
"zone": "EE",
"currency": "EUR",
"now": 1786371234,
"madeAt": 1786347000,
"lastRefresh": 1786368000,
"freeUntil": 1786554000,
"gated": true,
"backtest": { "mae": 18.4, "baselineMae": 27.9, "skill": 0.34, "horizonH": 24 },
"docs": "https://vooluhind.ee/en/api",
"dayAhead": [
{ "ts": 1786374000, "startsAt": "2026-08-10T15:00:00.000Z", "eurMwh": 91.4, "eurKwh": 0.1115 }
],
"forecast": [
{ "ts": 1786377600, "startsAt": "2026-08-10T16:00:00.000Z",
"p10": 62.1, "p50": 95.3, "p90": 148.7,
"p10Kwh": 0.0758, "p50Kwh": 0.1163, "p90Kwh": 0.1814 }
]
}Põhimõisted
- Ühikud
- eurMwh ja p10/p50/p90 on EUR/MWh ilma käibemaksuta (turu ühik). eurKwh ja p*Kwh on EUR/kWh koos 22% käibemaksuga (tarbija ühik). Võrgutasu ja aktsiis ei sisaldu kunagi.
- Ajatemplid
- ts on unix-sekundid UTC tunni alguses; startsAt on sama hetk ISO 8601 kujul. Tunnid on UTC järgi — Eesti kohalik aeg on UTC+2/+3.
- Avalik aken (freeUntil)
- Prognoosi serveeritakse kuni freeUntil-ini: selgunud börsitunnid + 48 h mudeli prognoosi, maksimaalselt 72 h ette. Mudel ise ulatub kaugemale — kui gated on true, on pikem prognoos olemas ja saadaval kokkuleppel: info@vooluhind.ee.
- Vahemälu ja piirangud
- Vastuseid puhverdatakse servavahemälus ~60 s; tihedam pärimine ei anna värskemat infot. Andmed liiguvad kord ööpäevas (~14:00 Eesti aja järgi, kui Nord Pool avaldab järgmise päeva hinnad) ja iga tund prognoosi osas. Hoia kliendid tublisti alla 10 päringu/s.
- Viitamine
- Andmete taasavaldamisel viita allikale: „Vooluhind (vooluhind.ee)“. Andmed on informatiivsed ja mitteametlikud.
Lõpp-punktid
Viitedokumentatsioon on genereeritud OpenAPI spetsifikatsioonist ja on inglise keeles.
GET/api/v1/forecast
Upcoming prices: settled day-ahead + model forecast
The integration endpoint. Returns settled Nord Pool EE day-ahead prices from the current hour forward, and the model's p10/p50/p90 forecast for strictly-future hours up to `freeUntil`. Where both cover an hour, the settled price is authoritative. Takes no query parameters — any query string is rejected with 400.
Vastuse väljad ForecastResponse
| Väli | Tüüp | Kirjeldus |
|---|---|---|
| zone | "EE" | Nord Pool bidding zone the data covers. |
| currency | "EUR" | |
| now | integer | When this response was computed, unix seconds UTC. |
| madeAt | integer | null | When the served forecast run was produced, unix seconds UTC. Null when no forecast exists yet. |
| lastRefresh | integer | null | When the data pipeline last ingested, unix seconds UTC. |
| freeUntil | integer | Last forecast hour served publicly, unix seconds UTC: the newest settled day-ahead hour + 48 h of model lead, capped at 72 h from now. The model's further hours are withheld — available on request. |
| gated | boolean | True when the model holds forecast hours past freeUntil (a longer forecast exists). |
| backtest | Backtest | null | Accuracy of the served model from a walk-forward backtest. Null while unavailable. |
| docs | string | URL of the human documentation for this API. |
| dayAhead | DayAheadHour[] | Settled Nord Pool day-ahead prices from the current hour forward, ascending by ts. Authoritative where present. |
| forecast | ForecastHour[] | Model forecast for strictly-future hours up to freeUntil, ascending by ts. Overlaps the settled tail of dayAhead; prefer the settled price where both exist. |
GET/api/series
Dashboard series: price history + continuous forecast
The payload behind the vooluhind.ee dashboard, exposed as the machine-readable dataset distribution. Includes up to 14 days of price history and the continuous past→future forecast series (for past hours: what the model predicted at the time). Shaped for the site's own chart — for integrations prefer /api/v1/forecast, whose shape is versioned.
Parameetrid
days(query, optional) — History window in days, 2–14 (values outside are clamped; default 14). Must match ^\d{1,2}$ — anything else is rejected with 400.
Vastuse väljad SeriesResponse
| Väli | Tüüp | Kirjeldus |
|---|---|---|
| now | integer | When this response was computed, unix seconds UTC. |
| lastRefresh | integer | null | Last pipeline ingest, unix seconds UTC. |
| madeAt | integer | null | When the served forecast run was produced, unix seconds UTC. |
| actuals | SeriesActual[] | Hourly settled prices over the requested history window, plus settled future hours. |
| forecast | SeriesForecastPoint[] | Continuous past→future forecast series: for each past hour, the freshest forecast made before it; for future hours, the latest run, up to freeUntil. |
| backtest | Backtest | null | Accuracy of the served model from a walk-forward backtest. Null while unavailable. |
| freeUntil | integer | Last forecast hour served publicly, unix seconds UTC. |
| gated | boolean | True when a longer forecast exists past freeUntil. |
Andmetüübid
Väljade tabelid on genereeritud samast OpenAPI spetsifikatsioonist, mida serveerib /api/openapi.json.
DayAheadHour
One settled market hour.
| Väli | Tüüp | Kirjeldus |
|---|---|---|
| ts | integer | Hour start, unix seconds UTC. |
| startsAt | string | Hour start, ISO 8601 UTC (same instant as ts). |
| eurMwh | number | Settled day-ahead price, EUR/MWh, excl. VAT. |
| eurKwh | number | Same price, EUR/kWh incl. 22% VAT, rounded to 4 dp. |
ForecastHour
One forecast hour. p50 is the model's conditional median; p10/p90 bound an 80% uncertainty interval that widens with horizon.
| Väli | Tüüp | Kirjeldus |
|---|---|---|
| ts | integer | Hour start, unix seconds UTC. |
| startsAt | string | Hour start, ISO 8601 UTC (same instant as ts). |
| p10 | number | 10th percentile, EUR/MWh, excl. VAT. |
| p50 | number | Median forecast, EUR/MWh, excl. VAT. |
| p90 | number | 90th percentile, EUR/MWh, excl. VAT. |
| p10Kwh | number | p10 as EUR/kWh incl. 22% VAT, rounded to 4 dp. |
| p50Kwh | number | p50 as EUR/kWh incl. 22% VAT, rounded to 4 dp. |
| p90Kwh | number | p90 as EUR/kWh incl. 22% VAT, rounded to 4 dp. |
Backtest
Walk-forward backtest of the served model.
| Väli | Tüüp | Kirjeldus |
|---|---|---|
| mae | number | Mean absolute error of the model, EUR/MWh. |
| baselineMae | number | MAE of the seasonal-naive baseline (price one week earlier), EUR/MWh. |
| skill | number | 1 − mae/baselineMae — the fraction of baseline error the model removes. |
| horizonH | integer | Forecast horizon the numbers were measured at, hours ahead. |
SeriesActual
One settled market hour in the dashboard series.
| Väli | Tüüp | Kirjeldus |
|---|---|---|
| ts | integer | Hour start, unix seconds UTC. |
| eurMwh | number | Settled price, EUR/MWh, excl. VAT. |
| eurKwh | number | Same price, EUR/kWh incl. 22% VAT, rounded to 4 dp. |
SeriesForecastPoint
One hour of the dashboard forecast series (no ISO twin — use ts).
| Väli | Tüüp | Kirjeldus |
|---|---|---|
| ts | integer | Hour start, unix seconds UTC. |
| p10 | number | 10th percentile, EUR/MWh, excl. VAT. |
| p50 | number | Median forecast, EUR/MWh, excl. VAT. |
| p90 | number | 90th percentile, EUR/MWh, excl. VAT. |
| p10Kwh | number | p10 as EUR/kWh incl. 22% VAT. |
| p50Kwh | number | p50 as EUR/kWh incl. 22% VAT. |
| p90Kwh | number | p90 as EUR/kWh incl. 22% VAT. |
OpenAPI spetsifikatsioon
Kogu API on kirjeldatud OpenAPI 3.1 spetsifikatsioonina — impordi see Postmani, Insomniasse või genereeri klient oma keelde:
https://vooluhind.ee/api/openapi.json (OpenAPI 3.1, v1.0.0)