oneapi
Sign in
Financiar v1 / CursIstoricPerioada

Average rate in old lei

The official NBR average in ROL for a month (?luna=YYYY-MM, 1991–2005) or a year (?an=YYYY, 1985–2005). The period is required: the series ended at redenomination, so there is no current period. Monthly: 1991-01 → 2005-06 for the dollar, 1999-01 onwards for the euro; eighty-five of those months predate the daily series, which starts on 1998-01-05. Every figure also comes in new lei, divided by 10,000.

GET
https://oneapi.ro/api/financiar/v1/curs-istoric/mediu

Query parameters

NameTypeDescriptionAccepted values
lunaoptional string | null A month, YYYY-MM, between 1991-01 and 2005-06. Not sent together with an. e.g. 2000-06
anoptional integer | null A year, YYYY, between 1985 and 2005. 1985 – 2005
valutalistoptional text Optional, USD or EUR, comma-separated. Without it, both. e.g. USD

How it behaves

  • The official central-bank average in old lei for a month (?luna=YYYY-MM, 1991-01 → 2005-06) or a year (?an=YYYY, from 1985). One of them is required: the series ended at redenomination, so there is no current period to default to.
  • The monthly average exchange rate in old lei, as published by the NBR. The dollar from 1991-01, the euro from 1999-01, both through 2005-06 — the last month before the denomination.
  • Eighty-five of these months predate the daily series, which begins on 1998-01-05. For them the published figure is the only source that exists, not merely the only one here: it cannot be recomputed from anything. verificare.disponibila is false, with the reason spelled out, rather than simply absent.
  • From 1998 onward the response also carries the average recomputed from the daily ROL quotations, the number of banking days that went into it, and the difference — checked, and it closes.
  • Every figure also comes as echivalent_ron, divided by 10,000: the denomination rate of 1 July 2005. That is what lets the two eras, four orders of magnitude apart, sit on one chart.
  • A route separate from /curs-mediu, just as /curs-istoric is separate from /curs: a different unit, a different monetary era, a different set of currencies. By period, in old lei, the source publishes only the dollar and the euro — the daily quotations cover thirty currencies, at /curs-istoric/interval.
  • The annual average exchange rate in old lei. The dollar from 1985 — the deepest date in the whole module — the euro from 1999, both through 2005.
  • It is the average of the twelve published monthly averages, not of the daily quotations: the same convention as in the new-leu era. Checked on the years with all components — 14 out of 14 for the dollar, 6 out of 6 for the euro. The components come back in construita_din, with their recomputed average and the difference.
  • For years before 1991 the monthly components do not exist, and construita_din.disponibila is false with the reason given. Fourteen years — 1985–1998 for the dollar — have not even a monthly series beneath them.
  • The year 2005 is a case apart, and the route flags it rather than composing it. The leu was denominated on 1 July, so only six months exist in old lei; but the annual figure published in ROL covers the whole year — it is the new-leu average expressed in old lei. Measured: 29,136.55 against 2.9137 × 10,000, the gap being the rounding of the fourth decimal. The average of the six ROL months would give 28,522.38, 614 lei less. Anyone composing the year from its components would land on a different figure than the official one.
  • The numbers tell the story by themselves: 17.14 lei to the dollar in 1985, 76.47 in 1991, 1,655 in 1994, above 32,000 in 2004.

What it is for

  • Deflating a sum from the 1990s at its own month's rate.
  • Reconstructing an old contract denominated in dollars.
  • The long series of the leu's decline, from before any daily series.
  • Long series of the leu's depreciation, from 1985 onward.
  • Converting an old annual balance sheet at the year's official average rate.
  • The starting point of any long-run inflation analysis.

Response structure

FieldTypeDescription
data.perioada string The period the value refers to.
data.de_la string Start of the interval the response covers.
data.pana_la string End of the interval the response covers, inclusive.
data.epoca string
data.fel string
data.unitate string The unit of the values. Read it before plotting or adding them up.
data.valute[].valuta string ISO 4217 currency code.
data.valute[].eticheta string Display label for the value — the readable version of the code next to it.
data.valute[].valoare string The published figure, in old lei per one unit of currency.
data.valute[].echivalent_ron string The same figure in new lei, divided by 10,000.
data.valute[].verificare object The average recomputed from the daily quotations, with the day count and the difference — or the reason no witness exists.
data.valute[].verificare.disponibila boolean
data.valute[].verificare.metoda string
data.valute[].verificare.zile_cotate integer
data.valute[].verificare.calculat string
data.valute[].verificare.diferenta string
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.nota_martor string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_denominare string The 2005 denomination (1 new leu = 10,000 old lei) and what it means for comparisons.
meta.zilnic string
meta.epoca_urmatoare string
meta.fara_date data is null and this says why. The quote exists at the source, but our import is behind; the response says how far our data goes.
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/curs-istoric/mediu?luna=2000-06&valuta=USD
{
    "data": {
        "perioada": "2000-06",
        "de_la": "2000-06-01",
        "pana_la": "2000-06-30",
        "epoca": "ROL",
        "fel": "mediu",
        "unitate": "ROL pentru o unitate de valută",
        "valute": [
            {
                "valuta": "USD",
                "eticheta": "dolarul SUA",
                "valoare": "21030.640000",
                "echivalent_ron": "2.103064",
                "verificare": {
                    "disponibila": true,
                    "metoda": "media aritmetică a cotaţiilor zilnice",
                    "zile_cotate": 22,
                    "calculat": "21030.63",
                    "diferenta": "0.01"
                }
            }
        ]
    },
    "meta": {
        "sursa": "BNR — cursul de schimb, serii lunare în lei vechi (clasa 703).",
        "acoperire": {
            "de_la": "1991-01",
            "pana_la": "2005-06"
        },
        "nota_martor": "Media oficială e media aritmetică a cotaţiilor zilnice. Cotaţiile în lei vechi încep în 1998-01-05; pentru lunile de dinainte valoarea publicată e singura sursă, iar `verificare` o spune.",
        "nota_denominare": "`echivalent_ron` e cifra împărţită la 10.000, rata denominării din 2005-07-01.",
        "zilnic": "Cotaţiile zi cu zi ale aceleiaşi luni: /financiar/v1/curs-istoric/interval?de_la=2000-06-01&pana_la=2000-06-30",
        "epoca_urmatoare": "Din iulie 2005, în lei noi: /financiar/v1/curs-mediu?luna=AAAA-LL."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404dupa_denominareThe month is later than 2005-06; the response points to /curs-mediu. negasit — the requested currency has no value that month (the euro does not exist before 1999).
422validareA missing period, luna and an sent together, a month outside 1991–2005 or a year outside 1985–2005; for periods after redenomination, /curs-mediu. valuta_necunoscuta — by period only USD and EUR are published.
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": "A missing period, luna and an sent together, a month outside 1991–2005 or a year outside 1985–2005; for periods after redenomination, /curs-mediu. valuta_necunoscuta — by period only USD and EUR are published.",
        "detalii": {
            "luna": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}