oneapi
Sign in
Financiar v1 / RiscCredit

External debt

Romania's external debt under the BPM6 methodology, in two cuts of the same figure — by maturity with debtors and creditors, or by institutional sector with maturities and instruments — plus the net variant. In May 2026: 230,913.5 million euro.

The two cuts tie exactly: long term + short term gives the same total as gross debt by sector, verified on every common month with a maximum deviation of 0.1 — in May 2026, 183,922.2 + 46,991.3 = 230,913.5. The check is computed on every request, in identitati.control_intre_taieturi.

The quarterly figure is an end-of-quarter stock. Compared with the monthly series on the source's own label, not one of the common quarters matches, with deviations of up to 8,815; shifted by two months, they all match. Quarterly periods carry data_referinta, and the check uses it.

The hierarchy sits in different places in the two cuts. For scadente the name carries it — DE6L_DP is not prefixed by DE6L_DTML, so a code-based rule would leave twelve series without a parent. For sectoare the code carries it: nine series resolve only that way. _meta.ierarhie_din says which.

The maturity cut mixes a stock with a flow: „External debt" is a balance, „Debt service" is the payments made in the period. Same unit, different natures, so every position carries natura.

The tolerance comes from each class's measured rounding step: gross debt publishes one decimal, net debt two. The same family, two precisions.

Net debt is a discontinued series, stopped in 2018-Q3, even though it has exactly the same 59 codes as the gross one.

GET
https://oneapi.ro/api/financiar/v1/datorie-externa

Query parameters

NameTypeDescriptionAccepted values
dimensiuneoptional string | null Optional, defaults to sectoare. Or scadente — the same total, a different breakdown. sectoarescadente
tipoptional string | null Optional, defaults to bruta. neta exists only by sector, quarterly, and stops in 2018-Q3. brutaneta
frecventaoptional string | null Optional; defaults to lunar, and to trimestrial for net debt, since it does not exist otherwise. lunartrimestrial
de_laoptional string | null Optional, YYYY-MM or YYYY-Tn. e.g. 2024-06-15
pana_laoptional string | null Optional, YYYY-MM or YYYY-Tn. e.g. 2024-06-15
nivel_maxoptional integer | null Optional, 1–4. nivel_max=1 leaves only the totals. 1 – 4

How it behaves

  • Romania's external debt under the BPM6 methodology, in two cuts of the same figure — by maturity with debtors and creditors, or by institutional sector with maturities and instruments — plus the net variant. In May 2026: 230,913.5 million euro.
  • The two cuts tie exactly, which is why this is one route with a parameter and not two. long term + short term gives the same total as gross debt by sector: verified across every common month, maximum deviation 0.1. In May 2026, 183,922.2 + 46,991.3 = 230,913.5. The control is computed on every request, in identitati.control_intre_taieturi.
  • The quarterly series is an end-of-quarter stock. Compared with the monthly series on the source label, not one of the shared quarters matches, with gaps of up to 8,815; shifted by two months, all of them do. Quarter 2024-Q2 is 196,934.3, the June figure, not April's (188,119). Quarterly periods carry data_referinta, and the control uses it.
  • This is the module's third route where the rule appears, after the investment position and direct investment stocks. Every quarterly stock series from the NBR is dated at period end, even though the label shows the start.
  • The hierarchy lives in different places in the two cuts, and the route declares which. For scadente the name carries it: DE6L_DP is not prefixed by DE6L_DTML, so the code rule would leave twelve series without a parent. For sectoare the code carries it: nine series resolve only that way. Zero disagreements in either where both rules answer, so each is right in its own place — _meta.ierarhie_din says which was used.
  • The maturity cut mixes a stock with a flow. "External debt, long term" is a balance; "Debt service, long term" is the payments made during the period. Same unit, different natures, so each position carries natura — they do not add together.
  • The tolerance comes from the per-figure rounding error, measured on the class. Gross debt publishes one decimal (deviations are exclusively −0.1, 0 and +0.1), so 0.05 per figure; the net series publishes two, so 0.005. Same family, two precisions.
  • Three months do not close, all in the maturity cut: 2010-11 and 2013-09 by 0.4, and 2024-03 by 7.9 against 146,279 — that is 0.005%. They are reported in identitati.descompunere.abateri, with the total and the component sum.
  • Net debt is a closed series, ending in 2018-Q3, though it carries exactly the same 59 codes as the gross one. The cross-cut control does not apply to it: it measures something else.
  • A node may be checked only on part of the periods, and then it says so. When a component is not published, the sum cannot be formed: in net debt the Central Bank is missing in 2007-Q1 → 2012-Q4, so TDEN6T_D and four other nodes are checked only from 2013. They appear in identitati.descompunere.verificate_partial, with the skipped periods and the missing components.
  • "III. External debt (I+II)" is a root, not a parent. It sits next to I and II, as the source publishes it; the relationship written in its name is checked separately, in identitati.totaluri_din_denumire, and closes within the class tolerance.

What it is for

  • Public against private external debt, month by month.
  • How much of the debt is short term — the vulnerability indicator, alongside reserves.
  • Debt service: what is actually paid in each period.

Response structure

FieldTypeDescription
data.dimensiune string The dimension the values are broken down by.
data.tip string intreprinderi or unitati_locale — two different concepts, never summed.
data.frecventa string How often the source publishes the series (daily, monthly, quarterly, yearly).
data.metodologie string Always BPM6.
data.de_la string Start of the interval the response covers.
data.pana_la string End of the interval the response covers, inclusive.
data.unitate string The unit of the values. Read it before plotting or adding them up.
data.filtre array The filters actually applied, as the route understood them — useful when a value was normalised.
data.perioade[].perioada string The period the value refers to.
data.perioade[].luna_sursa string The month as the source labels it, before normalisation.
data.pozitii[].cod string Code from the source code list — the key you filter on.
data.pozitii[].eticheta string Display label for the value — the readable version of the code next to it.
data.pozitii[].cale array Path through the hierarchy, from the root down to the current item.
data.pozitii[].nivel integer Level in the classification hierarchy — the deeper, the more detailed.
data.pozitii[].parinte null The parent position's code, from the source declared in meta.ierarhie_din.
data.pozitii[].natura string stoc or flux. Only the maturity cut mixes them; by sector everything is a stock.
data.pozitii[].unitate string Unit of measure of the values. Read it before plotting or summing them.
data.pozitii[].perioade_publicate integer How many periods the source actually published.
data.pozitii[].valori object The values of the series, by period.
data.identitati.descompunere.identitate string The identity being checked — which sum must equal which total.
data.identitati.descompunere.noduri_cu_copii integer How many nodes in the hierarchy have at least one descendant.
data.identitati.descompunere.noduri_inchise integer How many hierarchy nodes closed within tolerance.
data.identitati.descompunere.verificari integer How many combinations were checked.
data.identitati.descompunere.toleranta_regula string
data.identitati.descompunere.abateri array The nodes that do not close, with their periods and figures.
data.identitati.descompunere.noduri_verificate_partial integer
data.identitati.descompunere.verificate_partial array The nodes with periods where a component is missing, so the sum could not be formed: how many, between which periods, which components.
data.identitati.totaluri_din_denumire[] array Totals written in the name as the sum of other roots — "III. (I+II)" —, checked in every period.
data.identitati.totaluri_din_denumire[].total string
data.identitati.totaluri_din_denumire[].formula string
data.identitati.totaluri_din_denumire[].componente array The components that add up to the total.
data.identitati.totaluri_din_denumire[].toleranta string How much deviation is accepted before the identity counts as unclosed — the source rounding, not an error.
data.identitati.totaluri_din_denumire[].perioade_verificate integer
data.identitati.totaluri_din_denumire[].perioade_inchise integer
data.identitati.totaluri_din_denumire[].abatere_maxima string Largest deviation found between the sum of components and the total.
data.identitati.control_intre_taieturi object The maturity total against the sector total, at luna_referinta. Absent for net debt.
data.identitati.control_intre_taieturi.identitate string The identity being checked — which sum must equal which total.
data.identitati.control_intre_taieturi.toleranta string How much deviation is accepted before the identity counts as unclosed — the source rounding, not an error.
data.identitati.control_intre_taieturi.perechi_verificate integer
data.identitati.control_intre_taieturi.perechi_inchise integer How many checked pairs closed within tolerance.
data.identitati.control_intre_taieturi.nota_datare string
data.identitati.control_intre_taieturi.perechi[].perioada string The period the value refers to.
data.identitati.control_intre_taieturi.perechi[].luna_referinta string
data.identitati.control_intre_taieturi.perechi[].pe_scadente string
data.identitati.control_intre_taieturi.perechi[].pe_sectoare string
data.identitati.control_intre_taieturi.perechi[].abatere string The measured difference between the two quantities compared.
data.identitati.control_intre_taieturi.perechi[].se_inchide boolean Whether the check closed within tolerance.
meta.sursa string The official source the data comes from, with its licence where one is required.
meta.acoperire.de_la string The first period we have data for.
meta.acoperire.pana_la string The last period we have data for.
meta.perioade integer Periods for which values exist.
meta.pozitii_totale integer How many positions match the filters, beyond the current page.
meta.pozitii_returnate integer How many positions this response actually returned.
meta.ierarhie_din string
meta.nota_ierarhie string How to read the classification hierarchy and which levels must not be added together.
meta.nota_control string Which control check was run on the values in the response.
meta.nota_totaluri string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_toleranta string Where the tolerance comes from and why it is not zero.
meta.nota_null string Why some values are missing: the source did not publish, did not compute, or suppressed them.
data.perioade[].data_referinta Only at quarterly frequency: the end of the quarter, when the stock is measured.
meta.fara_date data is null and this says why. No values in the database for the requested combination. The interval falls outside the coverage, which differs by combination.
meta.fara_date_cod The short, STABLE word for the reason, for clients that branch on it in code: fara_date is prose and may be rephrased, this is not.

Response examples

GEThttps://oneapi.ro/api/financiar/v1/datorie-externa
{
    "data": {
        "dimensiune": "sectoare",
        "tip": "bruta",
        "frecventa": "lunar",
        "metodologie": "BPM6",
        "de_la": "2017-01",
        "pana_la": "2026-07",
        "unitate": "milioane EUR",
        "filtre": [],
        "perioade": [
            {
                "perioada": "2017-01",
                "luna_sursa": "2017-01"
            }
        ],
        "pozitii": [
            {
                "cod": "TDE6L_D",
                "eticheta": "I. Datoria externă",
                "cale": [
                    "I. Datoria externă"
                ],
                "nivel": 1,
                "parinte": null,
                "natura": "stoc",
                "unitate": "milioane EUR",
                "perioade_publicate": 115,
                "valori": {
                    "2017-01": "72141.3",
                    "2017-02": "72709.2",
                    "2017-03": "73786.9",
                    "2017-04": "74879.4",
                    "2017-05": "75164.7",
                    "2017-06": "76931.0",
                    "2017-07": "74958.6",
                    "2017-08": "74582.6",
                    "2017-09": "74681.5",
                    "2017-10": "73965.6",
                    "2017-11": "73520.9",
                    "2017-12": "73762.3",
                    "2018-01": "71654.7",
                    "2018-02": "74822.2",
                    "2018-03": "75664.4",
                    "2018-04": "74818.0",
                    "2018-05": "74503.0",
                    "2018-06": "73822.6",
                    "2018-07": "74219.3",
                    "2018-08": "74648.0",
                    "2018-09": "73988.5",
                    "2018-10": "74589.2",
                    "2018-11": "74510.9",
                    "2018-12": "73780.2",
                    "2019-01": "73126.6",
                    "2019-02": "74436.4",
                    "2019-03": "73959.9",
                    "2019-04": "76686.6",
                    "2019-05": "76902.2",
                    "2019-06": "78029.1",
                    "2019-07": "80152.9",
                    "2019-08": "81234.7",
                    "2019-09": "79683.8",
                    "2019-10": "80266.7",
                    "2019-11": "79188.8",
                    "2019-12": "77508.9",
                    "2020-01": "80447.4",
                    "2020-02": "82557.0",
                    "2020-03": "79382.4",
                    "2020-04": "78167.8",
                    "2020-05": "82832.4",
                    "2020-06": "83444.3",
                    "2020-07": "86765.4",
                    "2020-08": "86948.2",
                    "2020-09": "87796.1",
                    "2020-10": "89248.3",
                    "2020-11": "90581.1",
                    "2020-12": "95377.8",
                    "2021-01": "95734.4",
                    "2021-02": "93732.0",
                    "2021-03": "93310.5",
                    "2021-04": "103111.8",
                    "2021-05": "96666.6",
                    "2021-06": "97035.1",
                    "2021-07": "100325.2",
                    "2021-08": "103462.2",
                    "2021-09": "101253.4",
                    "2021-10": "100510.8",
                    "2021-11": "100260.3",
                    "2021-12": "101455.9",
                    "2022-01": "104266.9",
                    "2022-02": "102556.0",
                    "2022-03": "104121.9",
                    "2022-04": "102953.1",
                    "2022-05": "104886.3",
                    "2022-06": "103252.0",
                    "2022-07": "105579.7",
                    "2022-08": "105904.5",
                    "2022-09": "104722.4",
                    "2022-10": "106187.4",
                    "2022-11": "109329.9",
                    "2022-12": "110001.3",
                    "2023-01": "117120.3",
                    "2023-02": "118199.0",
                    "2023-03": "117745.1",
                    "2023-04": "118748.4",
                    "2023-05": "121808.5",
                    "2023-06": "124301.6",
                    "2023-07": "126387.6",
                    "2023-08": "125513.3",
                    "2023-09": "130391.4",
                    "2023-10": "130264.9",
                    "2023-11": "131194.1",
                    "2023-12": "135600.1",
                    "2024-01": "140189.3",
                    "2024-02": "142796.2",
                    "2024-03": "144401.5",
                    "2024-04": "141733.1",
                    "2024-05": "144756.2",
                    "2024-06": "148804.4",
                    "2024-07": "146517.8",
                    "2024-08": "147397.7",
                    "2024-09": "154849.6",
                    "2024-10": "152093.3",
                    "2024-11": "153224.3",
                    "2024-12": "154011.3",
                    "2025-01": "152606.8",
                    "2025-02": "157600.8",
                    "2025-03": "156246.5",
                    "2025-04": "158240.3",
                    "2025-05": "158314.6",
                    "2025-06": "160551.6",
                    "2025-07": "169253.0",
                    "2025-08": "170627.3",
                    "2025-09": "169867.4",
                    "2025-10": "174332.4",
                    "2025-11": "175963.8",
                    "2025-12": "176940.5",
                    "2026-01": "178256.5",
                    "2026-02": "178451.8",
                    "2026-03": "179218.3",
                    "2026-04": "180061.0",
                    "2026-05": "181239.9",
                    "2026-06": "182303.3",
                    "2026-07": "181207.0"
                }
            }
        ],
        "identitati": {
            "descompunere": {
                "identitate": "fiecare poziţie = suma copiilor ei direcţi",
                "noduri_cu_copii": 14,
                "noduri_inchise": 14,
                "verificari": 1610,
                "toleranta_regula": "(k+1) × 0.05 milioane pentru k componente, din eroarea de rotunjire per cifră măsurată pe clasă",
                "abateri": [],
                "noduri_verificate_partial": 0,
                "verificate_partial": []
            },
            "totaluri_din_denumire": [
                {
                    "total": "TDE6L_B",
                    "formula": "I+II",
                    "componente": [
                        "TDE6L_D",
                        "TDE6L_I"
                    ],
                    "toleranta": "0.1500",
                    "perioade_verificate": 115,
                    "perioade_inchise": 115,
                    "abatere_maxima": "0.1"
                }
            ],
            "control_intre_taieturi": {
                "identitate": "termen lung + termen scurt (pe scadenţe) = datoria brută (pe sectoare)",
                "toleranta": "0.1500",
                "perechi_verificate": 115,
                "perechi_inchise": 115,
                "nota_datare": "Comparaţia se face la `luna_referinta`. La frecvenţă trimestrială aceea e sfârşitul trimestrului: pe eticheta din sursă nu se potriveşte niciunul dintre trimestrele comune, decalat corect se potrivesc toate.",
                "perechi": [
                    {
                        "perioada": "2026-02",
                        "luna_referinta": "2026-02",
                        "pe_scadente": "229963.3",
                        "pe_sectoare": "229963.4",
                        "abatere": "0.1",
                        "se_inchide": true
                    }
                ]
            }
        }
    },
    "meta": {
        "sursa": "BNR — datoria externă, metodologia BPM6 (clasa 1747).",
        "acoperire": {
            "de_la": "2017-01",
            "pana_la": "2026-07"
        },
        "perioade": 115,
        "pozitii_totale": 59,
        "pozitii_returnate": 59,
        "ierarhie_din": "cod",
        "nota_ierarhie": "Ierarhia vine din cod la această tăietură. La `scadente` o poartă denumirea (`DE6L_DP` nu e prefixat de `DE6L_DTML`), la `sectoare` codul — fiecare regulă aplicată în locul greşit lasă poziţii fără părinte.",
        "nota_control": "115 din 115 perechi se închid. `termen lung + termen scurt` faţă de datoria brută pe sectoare, la luna de referinţă.",
        "nota_totaluri": "Totalul „III. (I+II)\" e rădăcină, ca în sursă, nu părinte al lui I şi II; relaţia din denumire se verifică în `identitati.totaluri_din_denumire`.",
        "nota_toleranta": "Toleranţa vine din eroarea de rotunjire per cifră, măsurată pe clasă (±0.05): datoria brută publică o zecimală, cea netă două.",
        "nota_null": "`null` într-o perioadă înseamnă că poziţia n-a fost publicată atunci, nu zero."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareinterval_prea_lung beyond 240 periods, a dimension, type or frequency outside the lists, or nivel_max outside 1–4. combinatie_inexistenta — the response lists the published combinations.
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": "interval_prea_lung beyond 240 periods, a dimension, type or frequency outside the lists, or nivel_max outside 1–4. combinatie_inexistenta — the response lists the published combinations.",
        "detalii": {
            "dimensiune": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}