oneapi
Sign in
Financiar v1 / Calcul

Real interest rate (ex-post)

What an interest rate was actually worth, once inflation is taken out.

The exact formula, not the subtraction: (1 + nominal) / (1 + inflation) − 1. The difference is not negligible when inflation is high, which is exactly when the figure matters: in December 2022, with 3M ROBOR at 7.66% and inflation at 16.37%, subtraction gives −8.71% while the formula gives −7.49% — 1.23 points of exaggerated loss. The response also carries the subtraction figure, with the difference beside it: it is the one everybody computes, and hidden it would keep circulating.

EX-POST only. The comparison is against the inflation that HAPPENED, not an expected one — that would require forecasts, which we do not have. A real rate computed with an invented inflation would look identical and be something else.

The pair sits on the same horizon: the nominal rate of the requested month against inflation over the twelve months ending in that same month. An annual interest rate is set against annual inflation.

The CPI is published with roughly two months' delay, so the current month has nothing to be compared with — the answer is a 404 with the last month covered, not an extrapolation.

GET
https://oneapi.ro/api/financiar/v1/calcul/dobanda-reala

Query parameters

NameTypeDescriptionAccepted values
lunarequired string Required, YYYY-MM. The month of the nominal rate and the end of the inflation window. e.g. 2024-06
rataoptional string | null One of our series: ircc, politica, robor1m, robor3m, robor6m, robor12m. Excludes nominala. irccpoliticarobor1mrobor3mrobor6mrobor12m
nominalaoptional string | null Your own rate, percent per annum. Excludes rata. e.g. 7
categorieoptional string | null total (default), alimentare, nealimentare or servicii. totalalimentarenealimentareservicii

How it behaves

  • What an interest rate was actually worth once inflation is taken out.
  • The exact formula, not subtraction: (1 + nominal) / (1 + inflation) − 1. The difference is not negligible when inflation is high, which is exactly when the figure matters. In December 2022, with ROBOR 3M at 7.57% and inflation at 16.37%, subtraction gives −8.80% while the formula gives −7.56%: 1.24 points of overstated loss. Against that month's food inflation (22.05%), the gap rises to 2.62 points.
  • prin_scadere holds the usual approximation, with the difference beside it. It is the figure everyone computes — hidden, it would travel on; in plain sight, with the deviation written out, it does not.
  • Ex-post only. The comparison is against inflation that HAPPENED, not against expected inflation. The ex-ante variant needs inflation forecasts, which we do not have; computed with an invented figure it would look identical and be something else. meta.fel declares it on every response.
  • The pairing is on the same horizon: the nominal rate of the requested month against inflation over the TWELVE months ending in that same month. An annual rate is set against annual inflation; any other horizon would compare different things.
  • The nominal rate comes either from one of our series (robor1m…robor12m, ircc, politica) or from the client (nominala) — the latter covers a deposit of your own, where the rate is in the contract, not in public series. When it comes from a series, nominala.sursa states exactly which day or which quarter.
  • The Romanian CPI is published about two months late, so the current month has nothing to be compared against: the response is a 404 with the number of months found and the last covered month, not an extrapolation.
  • The inflation category can be changed (alimentare, nealimentare, servicii) when the contract or the question calls for it. The default is the full basket.
  • HICP is not offered as an alternative to the national CPI. They are different baskets and methodologies, and a switch between them would invite the comparison that cannot be made — the same reason /ipc and /hicp are separate routes.

What it is for

  • How much a deposit actually lost during the high-inflation years.
  • Comparing an interest rate received against the real inflation of the period.
  • Checking a calculation done by simple subtraction.

Response structure

FieldTypeDescription
data.luna string The month the data refers to.
data.nominala.valoare string The nominal rate used, percent per annum.
data.nominala.sursa object Where it comes from: the quote day for ROBOR, the quarter for IRCC, or data_de_client.
data.nominala.sursa.index string
data.nominala.sursa.trimestru string The quarter the value refers to.
data.inflatie.procent string Inflation over the 12 months ending in the requested month.
data.inflatie.orizont string
data.inflatie.de_la string Start of the covered interval.
data.inflatie.pana_la string End of the covered interval, inclusive.
data.inflatie.categorie string Category in the source classification.
data.inflatie.luni_folosite integer How many monthly indices entered the product. Fewer than 12 means the request is refused.
data.reala string The real rate, exact formula, two decimals.
data.reala_exacta string The same value unrounded, for chained calculations.
data.prin_scadere.valoare string The nominal − inflation approximation.
data.prin_scadere.diferenta_fata_de_exact string How far the approximation is off. It grows with inflation.
meta.sursa string The official source the data comes from, with its licence where one is required.
meta.formula string
meta.fel string
meta.nota_scadere string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_orizont string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.fara_date data is null and this says why: either we do not hold the 12 CPI months ending in the requested month (the reason gives the last published month), or the requested rate series has no values that month. No figure is returned off fewer than 12 months — it would be plausible and wrong.
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/calcul/dobanda-reala?luna=2024-06&rata=ircc
{
    "data": {
        "luna": "2024-06",
        "nominala": {
            "valoare": "5.90",
            "sursa": {
                "index": "ircc",
                "trimestru": "2024-T2"
            }
        },
        "inflatie": {
            "procent": "4.94",
            "orizont": "12 luni",
            "de_la": "2023-06",
            "pana_la": "2024-06",
            "categorie": "total",
            "luni_folosite": 12
        },
        "reala": "0.91",
        "reala_exacta": "0.9138107339",
        "prin_scadere": {
            "valoare": "0.96",
            "diferenta_fata_de_exact": "-0.05"
        }
    },
    "meta": {
        "sursa": "BNR (rate nominale) + INS prin modulul Ins (IPC).",
        "formula": "reala = (1 + nominala/100) / (1 + inflatie/100) − 1, exprimată în procente.",
        "fel": "ex_post — se compară cu inflaţia care s-a întâmplat, nu cu una aşteptată. Pentru ex-ante ar trebui prognoze, pe care nu le avem.",
        "nota_scadere": "`prin_scadere` e aproximarea uzuală `nominala − inflatie`. E dată tocmai ca diferenţa să se vadă: creşte odată cu inflaţia şi trece de un punct peste 15%.",
        "nota_orizont": "Inflaţia e pe 12 luni încheiate în luna cerută — acelaşi orizont ca o rată anuală. Alt orizont ar compara lucruri diferite."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareMalformed month; missing, doubled or unknown rate; non-existent category.
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": "Malformed month; missing, doubled or unknown rate; non-existent category.",
        "detalii": {
            "luna": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}