oneapi
Sign in
Energie v1 / Piaţa de energie

The cheapest hours of a day

The extremes of one day on Romanian time: the cheapest and the most expensive interval, the weighted average and the cheapest (and dearest) window of N consecutive hours — the prosumer's "when do I run the washing machine" question.

GET
https://oneapi.ro/api/energie/v1/piata/preturi/extreme

Query parameters

NameTypeDescriptionAccepted values
zonaoptional string | null The EIC code of the bidding zone. Defaults to Romania. The only zone imported today is 10YRO-TEL------P; any other value returns 422, not an empty series. The list is in /piata/acoperire, under zone_ofertare. 10YRO-TEL------P
dataoptional string | null The day, YYYY-MM-DD, on Romanian time. Defaults to today. e.g. 2026-09-10
oreoptional integer | null The window length, between 1 and 12 consecutive hours. Defaults to 1. 1 – 12

How it behaves

  • Answers "when is power cheapest today" directly, without fetching the 96 quarter-hours and computing it yourself: the minimum and maximum interval, the day average and the window of ore consecutive hours with the lowest and the highest average.
  • The day is on Romanian time, not UTC as in /piata/preturi/zilnic: moments carry the local offset (+03:00 in summer). On the day the clocks change the day has 23 or 25 hours, and ore_zi says so.
  • Windows are computed on quarter-hours: in the older hourly series an hour counts as four quarters with the same price. A window never skips an unpublished interval — it must be consecutive; if the day has gaps it can come back null.
  • The market price is not the bill. It is the day-ahead (PZU) price, without transmission and distribution tariffs, taxes and the supplier margin. It shows WHEN energy is cheap, not what a kWh costs at the socket. It can be negative.
  • Tomorrow is published around 14:00 Romanian time. A day not yet published returns 404 zi_nepublicata.

What it is for

  • Schedule an electric car charge or a water heater in tomorrow's 3 cheapest hours.
  • Show in a prosumer app "power is cheapest today between 13:00 and 16:00".
  • Move a flexible industrial load out of the evening's most expensive window.

Response structure

All fields below live inside data.

FieldTypeDescription
zi string Ziua, AAAA-LL-ZZ, pe ora României.
minim object The cheapest interval: de_la, pana_la (Romanian time), rezolutie_min, pret_eur_mwh. On a tie, the first in the day.
minim.pret_eur_mwh number Cel mai mic preţ al zilei.
fereastra.cea_mai_ieftina object The ore consecutive hours with the lowest average: de_la, pana_la, medie_eur_mwh. null if the day does not have that many published hours in a row.
fereastra.cea_mai_ieftina.de_la string Începutul ferestrei celei mai ieftine, ISO 8601 cu decalaj local.
fus string The time zone the day is bounded in: Europe/Bucharest.
intervale integer How many published intervals fall in the day.
ore_acoperite integer How many hours the published intervals cover.
ore_zi integer How many hours the day has: 24, or 23/25 when the clocks change.
zi_completa boolean Whether the day is fully published.
medie_ponderata_eur_mwh number The day average, weighted by interval duration.
maxim object The most expensive interval, in the same shape.
ore_cu_pret_negativ integer How many hours of the day had a negative price.
fereastra.ore integer The requested window length, in hours.
fereastra.cea_mai_scumpa object The ore consecutive hours with the highest average, in the same shape.
observatie string How to read the day and what the price does not include.
sursa object ENTSO-E Transparency Platform, with the mandatory attribution.

Response examples

GEThttps://oneapi.ro/api/energie/v1/piata/preturi/extreme?data=2026-09-08
{
    "data": {
        "zona": "10YRO-TEL------P",
        "zi": "2026-09-08",
        "fus": "Europe/Bucharest",
        "intervale": 96,
        "ore_acoperite": 24,
        "ore_zi": 24,
        "zi_completa": true,
        "medie_ponderata_eur_mwh": 177.98,
        "minim": {
            "de_la": "2026-09-08T13: 45: 00+03: 00",
            "pana_la": "2026-09-08T14: 00: 00+03: 00",
            "rezolutie_min": 15,
            "pret_eur_mwh": 14.29
        },
        "maxim": {
            "de_la": "2026-09-08T19: 45: 00+03: 00",
            "pana_la": "2026-09-08T20: 00: 00+03: 00",
            "rezolutie_min": 15,
            "pret_eur_mwh": 327
        },
        "ore_cu_pret_negativ": 0,
        "fereastra": {
            "ore": 1,
            "cea_mai_ieftina": {
                "de_la": "2026-09-08T14: 15: 00+03: 00",
                "pana_la": "2026-09-08T15: 15: 00+03: 00",
                "medie_eur_mwh": 22.83
            },
            "cea_mai_scumpa": {
                "de_la": "2026-09-08T19: 45: 00+03: 00",
                "pana_la": "2026-09-08T20: 45: 00+03: 00",
                "medie_eur_mwh": 304.27
            }
        },
        "observatie": "Ziua e pe ora României (23 sau 25 de ore la schimbarea orei), nu pe UTC ca `/piata/preturi/zilnic`. Preţurile sunt ale pieţei pentru ziua următoare (PZU), fără tarife de reţea, taxe şi marja furnizorului: arată CÂND e energia ieftină, nu cât plăteşte un consumator casnic. Pot fi negative.",
        "sursa": {
            "nume": "ENTSO-E Transparency Platform",
            "url": "https://transparency.entsoe.eu",
            "atribuire": "Date din ENTSO-E Transparency Platform.",
            "licenta": "Reutilizare permisă cu ATRIBUIRE obligatorie către Transparency Platform. Drepturile nu sunt sublicențiabile.",
            "observatie": "Zona `piata` e seria oficială europeană; zona `sen` e instantaneul Transelectrica. Au surse, pași și definiții diferite — cifrele lor nu se compară direct."
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404zi_nepublicataThe day has no published prices: it is in the future or in a gap of the history.
422validaredata is not YYYY-MM-DD, ore is outside 1–12 or zona is not covered.
429cota_depasitaThe plan's monthly quota has been exceeded (see Retry-After).

All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.

{
    "eroare": {
        "cod": "validare",
        "mesaj": "data is not YYYY-MM-DD, ore is outside 1–12 or zona is not covered.",
        "detalii": {
            "zona": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}