oneapi
Sign in
Financiar v1 / RiscCredit

External debt, the BPM5 archive

The methodology the NBR abandoned in 2014, in the same two cuts as the current route: by sector (quarterly, since 2001-Q4) and by maturity (monthly, since December 2004).

The gain in history is uneven: the sector cut goes back 21 quarters further than the BPM6 series, the maturity cut only 37 months.

It does not splice onto the current series, and short-term debt is the most divergent. The BPM5/BPM6 ratio is 0.933–0.999 on long-term debt, 0.828–1.000 on short-term and 0.916–1.017 on the quarterly total. The comparison is computed on every request, in identitati.comparatie_bpm6.

The source of the hierarchy mirrors that of its successor: the name for maturities, the code for sectors — there the names are flat. _meta.ierarhie_din says which was used.

How the total is composed cannot be seen from the code: gross total debt = gross debt + intercompany direct investment, written out explicitly because the prefix makes all three series roots.

The same source inconsistency appears in both methodologies: the maturity class does not close in 2010-11 and 2013-09, the same months and the same −0.4 deviation fail in the BPM6 class too (which has one more open month, 2024-03, after the archive ends).

The cross-check between the two cuts closes in 27 of 39 quarters. The large deviations are in 2008 — 527.1, 1,067.1 and 1,259.2 in the first three quarters, a revision applied to one cut and not to the other —; the other nine are below 2. perechi_deschise lists them all, largest first.

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

Query parameters

NameTypeDescriptionAccepted values
dimensiuneoptional string | null Optional, defaults to sectoare. Or scadente. Each has a single frequency at source, so there is no parameter for it. sectoarescadente
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. 2014-T2e.g. 2014-08
nivel_maxoptional integer | null Optional, 1–4. 1 – 4

How it behaves

  • External debt under the BPM5 methodology, retired by the NBR in 2014, in the same two cuts as the current route: by sector (quarterly, 2001-Q4 → 2014-Q2, 52 series) and by maturity (monthly, December 2004 → August 2014, 27 series).
  • The gain in history is real but uneven: the sector cut reaches back 21 quarters beyond the BPM6 series, the maturity cut only 37 months.
  • It does not splice onto the current series, and short-term debt is the most divergent. Across the overlap, the BPM5/BPM6 ratio is 0.933–0.999 for long-term, 0.828–1.000 for short-term and 0.916–1.017 for the quarterly total. The comparison is computed on every request, in identitati.comparatie_bpm6; it is not an identity and is not meant to close.
  • The source of the hierarchy mirrors its successor's. The maturity cut takes it from the name, as /datorie-externa?dimensiune=scadente does; the sector cut from the code, because there the names are flat. One more confirmation that the rule belongs to the class, not the family — _meta.ierarhie_din says which was used.
  • The total's composition is not visible from the code. total gross external debt = gross external debt + intercompany direct investment — verified, the gap between the first two is exactly the intercompany series, 21,229.4 million in 2014-Q2. The code prefix makes all three series roots, so the identity is written out explicitly.
  • The same source inconsistency appears in both methodologies. The maturity cut fails to close in 2010-11 and 2013-09, both by −0.4 — the same months and the same deviation fail in the BPM6 class too (which has one more open month, 2024-03, after the archive ends). The inconsistency survived the change of methodology. Otherwise, the sector cut closes on every node, including gross debt as the sum of the four sectors (TDET_GG, TDET_NBR, TDET_BK, TDET_XS), a link neither the code nor the name gives, which is declared explicitly.
  • The cross-cut control runs on quarters, because it ties a quarterly series to a monthly one: the sector total at the quarter's label, the maturity total at its last month. Aligned that way, 27 of 39 close within the derived tolerance of ±0.15; on the same label none would. The large gaps are in 2008 — 527.1, 1,067.1 and 1,259.2 in the first three quarters, a revision applied to one cut and not the other —; the other nine are below 2. perechi_deschise lists them all, largest first.
  • Each class's first observation stands alone in its year — December 2004 for maturity, Q4 2001 for sectors — after which the rhythm becomes uniform.
  • The tolerance comes from the per-figure rounding error: both classes publish one decimal, so 0.05 per figure and (k+1) × 0.05 for a sum of k components.

What it is for

  • Romania's external debt before EU accession, which the current series does not cover.
  • How private debt grew between 2001 and 2007.
  • The sector structure — government, banks, other sectors — through the 2000s.

Response structure

FieldTypeDescription
data.metodologie string Always BPM5. It is why these figures cannot be chained to /datorie-externa.
data.dimensiune string The dimension the values are broken down by.
data.frecventa string Set by the dimension: trimestrial for sectors, lunar for maturity.
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.perioade[].data_referinta string Only at quarterly frequency: the end of the quarter.
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 immediate parent in the hierarchy; null at the root.
data.pozitii[].natura string stoc or flux. The maturity cut mixes them, as its successor does.
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.abateri array The nodes that do not close, with their periods and figures.
data.identitati.control_intre_taieturi object The sector total against the maturity total, quarter by quarter. perechi_deschise lists what does not close.
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 string A note on how to read the data — a pitfall, a convention or a limit of the source.
data.identitati.control_intre_taieturi.perechi_deschise_numar integer
data.identitati.control_intre_taieturi.perechi_deschise[].trimestru string The quarter the value refers to.
data.identitati.control_intre_taieturi.perechi_deschise[].luna_referinta string
data.identitati.control_intre_taieturi.perechi_deschise[].pe_sectoare string
data.identitati.control_intre_taieturi.perechi_deschise[].pe_scadente string
data.identitati.control_intre_taieturi.perechi_deschise[].abatere string The measured difference between the two quantities compared.
data.identitati.control_intre_taieturi.perechi_deschise[].se_inchide boolean Whether the check closed within tolerance.
data.identitati.comparatie_bpm6 object Not an identity: BPM5 and BPM6 measure differently. It shows why the archive does not splice onto the current series.
data.identitati.comparatie_bpm6.nota string A note on how to read the data — a pitfall, a convention or a limit of the source.
data.identitati.comparatie_bpm6.perechi_comparate.TDET_TGED string
data.identitati.comparatie_bpm6.perioade_comune integer
data.identitati.comparatie_bpm6.raport_bpm5_bpm6.TDET_TGED.min string
data.identitati.comparatie_bpm6.raport_bpm5_bpm6.TDET_TGED.max string
data.identitati.comparatie_bpm6.ultimele[].perioada string The period the value refers to.
data.identitati.comparatie_bpm6.ultimele[].TDET_TGED.bpm5 string
data.identitati.comparatie_bpm6.ultimele[].TDET_TGED.bpm6 string
data.identitati.comparatie_bpm6.ultimele[].TDET_TGED.raport string The ratio between the two quantities compared.
data.identitati.compunere_total object The composition written out, because the code prefix does not give it.
data.identitati.compunere_total.identitate string The identity being checked — which sum must equal which total.
data.identitati.compunere_total.total string
data.identitati.compunere_total.componente array The components that add up to the total.
data.identitati.compunere_total.nota string A note on how to read the data — a pitfall, a convention or a limit of the source.
data.identitati.compunere_total.toleranta string How much deviation is accepted before the identity counts as unclosed — the source rounding, not an error.
data.identitati.compunere_total.perioade_verificate integer
data.identitati.compunere_total.perioade_inchise integer
data.identitati.compunere_total.abatere_maxima string Largest deviation found between the sum of components and the total.
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_bpm6 string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_ierarhie string How to read the classification hierarchy and which levels must not be added together.
meta.nota_identitate string How the identity above is checked and what it means when it does not close.
meta.nota_control string Which control check was run on the values in the response.
meta.nota_ritm string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_null string Why some values are missing: the source did not publish, did not compute, or suppressed them.
meta.fara_date string data is null and this says why. No BPM5 values in the database for the requested dimension. The interval falls outside the coverage; these series ended in 2014 and are no longer updated.
meta.fara_date_cod string 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/arhiva
{
    "data": {
        "metodologie": "BPM5",
        "dimensiune": "sectoare",
        "frecventa": "trimestrial",
        "de_la": "2001-T4",
        "pana_la": "2014-T2",
        "unitate": "milioane EUR",
        "filtre": [],
        "perioade": [
            {
                "perioada": "2001-T4",
                "luna_sursa": "2001-10",
                "data_referinta": "2001-12-31"
            }
        ],
        "pozitii": [
            {
                "cod": "TDET_TGED",
                "eticheta": "Datoria externă brută totală",
                "cale": [
                    "Datoria externă brută totală"
                ],
                "nivel": 1,
                "parinte": null,
                "natura": "stoc",
                "unitate": "milioane EUR",
                "perioade_publicate": 51,
                "valori": {
                    "2001-T4": "14787.6",
                    "2002-T1": "15239.1",
                    "2002-T2": "14950.1",
                    "2002-T3": "15729.7",
                    "2002-T4": "16199.7",
                    "2003-T1": "16352.7",
                    "2003-T2": "16394.1",
                    "2003-T3": "17849.4",
                    "2003-T4": "17835.3",
                    "2004-T1": "18949.8",
                    "2004-T2": "20054.1",
                    "2004-T3": "21351.0",
                    "2004-T4": "21505.0",
                    "2005-T1": "24255.0",
                    "2005-T2": "26766.0",
                    "2005-T3": "29204.0",
                    "2005-T4": "30913.6",
                    "2006-T1": "33028.5",
                    "2006-T2": "35131.1",
                    "2006-T3": "37369.4",
                    "2006-T4": "41196.1",
                    "2007-T1": "44499.8",
                    "2007-T2": "49094.7",
                    "2007-T3": "54063.1",
                    "2007-T4": "58628.7",
                    "2008-T1": "61027.1",
                    "2008-T2": "66635.7",
                    "2008-T3": "70552.4",
                    "2008-T4": "72354.4",
                    "2009-T1": "73187.1",
                    "2009-T2": "76679.7",
                    "2009-T3": "81062.6",
                    "2009-T4": "81205.4",
                    "2010-T1": "87144.9",
                    "2010-T2": "88838.5",
                    "2010-T3": "91129.7",
                    "2010-T4": "92458.3",
                    "2011-T1": "95057.4",
                    "2011-T2": "98701.4",
                    "2011-T3": "98694.1",
                    "2011-T4": "98723.5",
                    "2012-T1": "99791.6",
                    "2012-T2": "100044.2",
                    "2012-T3": "100158.5",
                    "2012-T4": "99680.6",
                    "2013-T1": "99707.0",
                    "2013-T2": "98032.9",
                    "2013-T3": "97606.0",
                    "2013-T4": "96600.2",
                    "2014-T1": "93238.0",
                    "2014-T2": "92958.0"
                }
            }
        ],
        "identitati": {
            "descompunere": {
                "identitate": "fiecare poziţie = suma copiilor ei direcţi",
                "noduri_cu_copii": 14,
                "noduri_inchise": 14,
                "verificari": 714,
                "abateri": []
            },
            "control_intre_taieturi": {
                "identitate": "datoria brută totală (pe sectoare, trimestrial) = termen lung + termen scurt (pe scadenţe, la ultima lună a trimestrului)",
                "toleranta": "0.1500",
                "perechi_verificate": 39,
                "perechi_inchise": 27,
                "nota": "Seria trimestrială se citeşte la eticheta ei, cea lunară la sfârşitul trimestrului. Abaterile mari sunt în 2008 — o revizuire aplicată la o tăietură şi nu la cealaltă —, restul sunt de ordinul unităţilor. `perechi_deschise` le dă pe toate, cele mai mari întâi.",
                "perechi_deschise_numar": 12,
                "perechi_deschise": [
                    {
                        "trimestru": "2008-T3",
                        "luna_referinta": "2008-09",
                        "pe_sectoare": "70552.4",
                        "pe_scadente": "69293.2",
                        "abatere": "1259.2",
                        "se_inchide": false
                    }
                ]
            },
            "comparatie_bpm6": {
                "nota": "Nu e o identitate şi nu trebuie să se închidă: BPM5 şi BPM6 sunt metodologii diferite. Cifrele arată de ce arhiva nu se lipeşte de seria curentă.",
                "perechi_comparate": {
                    "TDET_TGED": "TDE6T_B"
                },
                "perioade_comune": 30,
                "raport_bpm5_bpm6": {
                    "TDET_TGED": {
                        "min": "0.9161",
                        "max": "1.0166"
                    }
                },
                "ultimele": [
                    {
                        "perioada": "2013-T3",
                        "TDET_TGED": {
                            "bpm5": "97606.0",
                            "bpm6": "104773.4",
                            "raport": "0.9316"
                        }
                    }
                ]
            },
            "compunere_total": {
                "identitate": "datoria externă brută totală = datoria externă brută + investiţii directe intercompanii",
                "total": "TDET_TGED",
                "componente": [
                    "TDET_GED",
                    "TDET_DINV"
                ],
                "nota": "Scrisă explicit: prefixul codului face toate trei seriile rădăcini, deci compunerea nu se vede din cod.",
                "toleranta": "0.1500",
                "perioade_verificate": 51,
                "perioade_inchise": 51,
                "abatere_maxima": "0.1"
            }
        }
    },
    "meta": {
        "sursa": "BNR — arhiva datoriei externe, metodologia BPM5 (clasa 579).",
        "acoperire": {
            "de_la": "2001-T4",
            "pana_la": "2014-T2"
        },
        "perioade": 51,
        "pozitii_totale": 52,
        "pozitii_returnate": 52,
        "ierarhie_din": "cod",
        "nota_bpm6": "Arhiva nu se lipeşte de /datorie-externa. Pe cele 30 perioade comune, rapoartele BPM5/BPM6 sunt în `identitati.comparatie_bpm6.raport_bpm5_bpm6` — pe termenul scurt coboară până la 0,828.",
        "nota_ierarhie": "Ierarhia vine din cod la această tăietură, ca la succesoarea ei BPM6. Regula e a clasei, nu a familiei.",
        "nota_identitate": "14 din 14 noduri se închid, pe 714 verificări. Pe tăietura pe scadenţe, cele două luni care nu se închid — 2010-11 şi 2013-09, ambele cu −0,4 — pică şi în clasa BPM6: neconcordanţa a supravieţuit schimbării de metodologie. (BPM6 mai are o lună deschisă, 2024-03, cu 7,9 — după sfârşitul arhivei.)",
        "nota_control": "27 din 39 perechi se închid între cele două tăieturi. Abaterile mari sunt în 2008 (trei trimestre, până la 1.259,2); celelalte 9 sunt sub 2. Toate sunt în `identitati.control_intre_taieturi.perechi_deschise`, cele mai mari întâi.",
        "nota_ritm": "Prima observaţie a fiecărei clase e singură în anul ei — decembrie 2004 la scadenţe, T4 2001 la sectoare — apoi ritmul devine uniform.",
        "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 140 periods, a dimension outside the list, or nivel_max outside 1–4. dimensiune_necunoscuta.
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 140 periods, a dimension outside the list, or nivel_max outside 1–4. dimensiune_necunoscuta.",
        "detalii": {
            "dimensiune": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}