oneapi
Sign in
Energie v1 / Piaţa de energie

Cross-border physical flows

The physical flows on each border, with imports, exports and the computed balance. Use vecin for a single border, directie for one direction only.

GET
https://oneapi.ro/api/energie/v1/piata/schimburi

Query parameters

NameTypeDescriptionAccepted values
de_laoptional string | null Start of the window. Defaults to 7 days ago. e.g. 2026-09-01
pana_laoptional string | null End of the window. Defaults to now. e.g. 2026-09-06
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
vecinoptional string | null The country code of a border: HU, BG, RS, UA, MD. max 2 car.
directieoptional string | null import or export. importexport
per_paginaoptional text Intervals per page, up to 2000. e.g. 500
paginaoptional text The page, counted from 1. e.g. 1

How it behaves

  • The history has a gap, and it is visible at /piata/acoperire. The series starts in 2015, but the historical import is still in progress: about 28-30 months are currently missing (2015-03 → 2017-08). A request falling inside the gap returns 200 with an empty list — which does NOT mean the market had no activity, but that the period has not been imported yet. The goluri field in the coverage route lists exactly which months are missing, computed from the data, so it shrinks on its own as the history fills in.
  • Physical flows across the five borders of the zone — Hungary, Bulgaria, Serbia, Ukraine and the Republic of Moldova — in both directions.
  • The source publishes no balance, but two positive series per border. The balance is computed here (import − export) and comes with directie_neta spelled out, so you never depend on a sign. This differs from the sen zone, where Transelectrica publishes an already-signed balance for each of the 24 physical interconnection points.
  • The resolution differs from border to border. Hungary publishes quarter-hourly, the rest hourly — which is why the series cannot be summed interval by interval, and why the aggregates in pe_granita and sold are computed on energy (power × duration), where the step no longer matters.
  • pe_granita and sold are computed over the whole window and all borders, regardless of the page filters — otherwise the balance would depend on what you asked to see.

What it is for

  • See which countries energy came from and which it went to, over a day or a month.
  • Close the balance: generation and load are not equal, and the difference is exactly the exchange.
  • Track whether the country was a net importer over a period, and by how much.

Response structure

FieldTypeDescription
data.serie[].valoare_mw number Fluxul fizic, putere medie pe interval, mereu pozitiv.
data.serie[].directie string import sau export.
data.pe_granita[].sold_mwh number Soldul graniţei: import − export.
data.sold.directie_neta string import, export ori echilibru.
data.filtru_vecin null The border the series was filtered on, if one was requested.
data.filtru_directie null The direction the series was filtered on, if one was requested.
data.pe_granita[].vecin string The country code of the border.
data.pe_granita[].vecin_denumire string The neighbour name.
data.pe_granita[].vecin_eic string The EIC code of the neighbouring zone — the real identity, since a country can have several bidding zones.
data.pe_granita[].rezolutie_min integer The step this border publishes at. It differs from border to border.
data.pe_granita[].import_mwh number Energy that entered through the border over the window.
data.pe_granita[].export_mwh number Energy that left through the border over the window.
data.pe_granita[].import_putere_medie_mw number Average import power, weighted by duration.
data.pe_granita[].export_putere_medie_mw number Average export power, weighted by duration.
data.pe_granita[].directie_neta string The sign spelled out: import, export or echilibru.
data.pe_granita[].intervale integer How many intervals entered the aggregate, across both directions.
data.sold.import_mwh number Total energy into the zone, across all borders.
data.sold.export_mwh number Total energy out of the zone.
data.sold.sold_mwh number The zone balance: import − export.
data.serie[].moment string Start of the interval, in UTC.
data.fara_date null Present (non-null) ONLY when the series is empty, and says WHY: motiv is dupa_acoperire (the window is past the last imported point), inainte_de_acoperire, or gol_in_acoperire (a hole inside the history). acoperire gives the real ends of the series. ⚠️ An empty series does NOT mean the market had no activity.
data.serie[].rezolutie_min integer Interval duration, in minutes.
data.serie[].vecin string The country code of the border.
data.serie[].vecin_denumire string The neighbour name.
data.serie[].vecin_eic string The EIC code of the neighbouring zone.
data.observatie string Why the flow is per direction rather than a balance, and why the series cannot be summed interval by interval.
data.sursa object ENTSO-E Transparency Platform, with the required attribution.
meta.paginare.pagina integer Current page, counted from 1.
meta.paginare.per_pagina integer How many records a page holds.
meta.paginare.total integer Total matching records, beyond the current page.
meta.paginare.pagini integer How many pages the list has.

Response examples

GEThttps://oneapi.ro/api/energie/v1/piata/schimburi
{
    "data": {
        "zona": "10YRO-TEL------P",
        "de_la": "2026-09-29 20: 39: 53",
        "pana_la": "2026-10-06 20: 39: 53",
        "filtru_vecin": null,
        "filtru_directie": null,
        "fara_date": null,
        "pe_granita": [
            {
                "vecin": "BG",
                "vecin_denumire": "Bulgaria",
                "vecin_eic": "10YCA-BULGARIA-R",
                "rezolutie_min": 60,
                "import_mwh": 133302.2,
                "export_mwh": 15671.3,
                "import_putere_medie_mw": 1101.7,
                "export_putere_medie_mw": 129.5,
                "intervale": 242,
                "sold_mwh": 117630.9,
                "directie_neta": "import"
            }
        ],
        "sold": {
            "import_mwh": 159706.9,
            "export_mwh": 84351.4,
            "sold_mwh": 75355.5,
            "directie_neta": "import"
        },
        "serie": [
            {
                "moment": "2026-09-29T20: 45: 00+03: 00",
                "rezolutie_min": 15,
                "vecin": "HU",
                "vecin_denumire": "Ungaria",
                "vecin_eic": "10YHU-MAVIR----U",
                "directie": "export",
                "valoare_mw": 144.089
            }
        ],
        "observatie": "Fluxul fizic e publicat pe DIRECŢIE, nu ca sold: fiecare graniţă are două serii, ambele pozitive, iar soldul se calculează (import − export). Rezoluţia diferă de la o graniţă la alta — Ungaria publică la sfert de oră, restul la oră — deci seriile NU se pot aduna interval cu interval; agregarea din `pe_granita` şi `sold` se face pe energie.",
        "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."
        }
    },
    "meta": {
        "paginare": {
            "pagina": 1,
            "per_pagina": 500,
            "total": 1602,
            "pagini": 4
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareThe requested border does not exist, or the direction is not import/export.
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": "The requested border does not exist, or the direction is not import/export.",
        "detalii": {
            "de_la": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}