oneapi
Sign in
Financiar v1 / Serii

A series' statistics

Minimum, maximum, mean, median, quartiles, standard deviation and effective coverage, over an optional interval. Computed in the database: to answer „how volatile was it" you do not need seven thousand observations downloaded.

The mean alone lies on long series. Three-month ROBOR over its whole history has a mean of 20.64% and a median of 6.85% — the mean is dragged up by the 1990s, when rates went above 200% (the series maximum is 228.37%). Anyone asking for „the average ROBOR" gets a number that never described the market. That is why the median and the quartiles come alongside, not as an extra: on a skewed series they are the useful figure.

The sample deviation does not exist on a single point, and 145 series have exactly one: the formula divides by n − 1. It stays null — a zero there would say „a perfectly stable series", which is a different thing from „it cannot be computed". The population deviation comes alongside and is always defined.

The extremes come with the day they were reached on. An all-time high from 1997 reads differently from one set last month, and the figure alone does not say which is which.

521 series (8.8%) have no value at all. They get stare: fara_valori and null statistics, not a 404: the series exists in the catalogue, it simply never published anything. In the catalogue, numar_valori is null for them, not 0.

acoperire.serie gives the range of the whole series, and acoperire.in_interval the range actually reached — so that an interval requested wider than the series does not look like a series with gaps.

GET
https://oneapi.ro/api/financiar/v1/serii/{cod}/statistici

Path parameters

NameTypeDescriptionExample
codrequired string Series code in the NBR interactive database (e.g. AEDZ_DEN).

Query parameters

NameTypeDescriptionAccepted values
de_laoptional string | null Optional, YYYY-MM-DD. Defaults to the start of the series. e.g. 2020-01-01
pana_laoptional string | null Optional, YYYY-MM-DD. Defaults to the end of the series. e.g. 2023-12-31

How it behaves

  • Minimum, maximum, mean, median, quartiles, deviation and effective coverage, over an optional interval. Computed in the database: answering "how volatile was it" should not require downloading seven thousand observations.
  • The mean alone lies on long series. ROBOR 3M across its whole history has a mean of 20.64% and a median of 6.85% — the mean is dragged by the 1990s, when rates went past 200% (the series maximum is 228.37%, reached in March 1997). Anyone asking for "the ROBOR average" gets a number that never described the market. That is why the median and the quartiles come alongside, not as extras: on a skewed series they are the useful figure.
  • Sample deviation does not exist on a single point, and 145 series have exactly one: the formula divides by n − 1. It stays null — a zero there would say "perfectly stable series", which is not the same as "cannot be computed". deviatie_populatie comes alongside and is always defined.
  • Extremes come with the day they were reached. An all-time high from 1997 reads differently from one set last month, and the figure alone does not say which. When a value repeats, the first date it appeared on is given.
  • Two different kinds of emptiness, named differently. fara_valori means the series has NEVER published anything — 521 are like that, 8.8% of the catalogue, and their numar_valori is null, not 0. fara_valori_in_interval means the series has values, just not in the requested window. One name for both would send someone with a wrong interval away believing the data does not exist.
  • Nothing assumes a positive sign: 582 series carry at least one negative value. And nothing assumes an order of magnitude: CIPL_SRBO runs from 6.5 to 2,587,357.
  • acoperire.serie gives the whole series' range, acoperire.in_interval the range actually reached — so an interval wider than the series does not look like a series full of gaps.
  • A missing series gets the same 404 as /serii/{cod}, with the distinction between "does not exist" and "is a register, not a time series".

What it is for

  • How volatile a series has been, without downloading it.
  • The historical minimum and maximum, with the dates they were reached.
  • A quick summary before deciding which interval is worth fetching in full.

Response structure

FieldTypeDescription
data.cod string Code from the source code list — the key you filter on.
data.nume string The name, exactly as the source publishes it.
data.clasa string Class in the classification — the most detailed level.
data.unitate string The unit of the values. Read it before plotting or adding them up.
data.periodicitate string
data.de_la null Start of the interval the response covers.
data.pana_la null End of the interval the response covers, inclusive.
data.acoperire.serie object The whole series' range.
data.acoperire.serie.de_la null Start of the covered interval.
data.acoperire.serie.pana_la null End of the covered interval, inclusive.
data.acoperire.in_interval null The range actually reached within the requested window.
data.puncte integer How many observations entered the computation.
data.stare string are_valori, fara_valori (never anything) or fara_valori_in_interval.
data.minim null The minimum value, with the date it was reached.
data.maxim null The maximum value, with its date.
data.medie null The arithmetic mean. On skewed series, read it together with the median.
data.mediana null The middle value — resistant to historical extremes.
data.p25 null The lower quartile.
data.p75 null The upper quartile.
data.deviatie_populatie null Population standard deviation. Defined even on a single point (0).
data.deviatie_esantion null Sample deviation. null below two points — not 0.
data.prima null The first observation in the interval, chronologically.
data.ultima null The last observation in the interval.
meta.sursa string The official source the data comes from, with its licence where one is required.
meta.nota_fara_valori string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_acoperire string Why the total is a lower bound, in prose. meta.total_e_limita_de_jos is the word to switch on in code.
meta.valori string The values of the series, by period.

Response examples

GEThttps://oneapi.ro/api/financiar/v1/serii/AEDZ_DEN/statistici
{
    "data": {
        "cod": "AEDZ_DEN",
        "nume": "Monedă",
        "clasa": "Operaţiuni de piaţă monetară ale BNR - Active eligibile - diferenţe",
        "unitate": "(txt)",
        "periodicitate": "necunoscut",
        "de_la": null,
        "pana_la": null,
        "acoperire": {
            "serie": {
                "de_la": null,
                "pana_la": null
            },
            "in_interval": null
        },
        "puncte": 0,
        "stare": "fara_valori",
        "minim": null,
        "maxim": null,
        "medie": null,
        "mediana": null,
        "p25": null,
        "p75": null,
        "deviatie_populatie": null,
        "deviatie_esantion": null,
        "prima": null,
        "ultima": null
    },
    "meta": {
        "sursa": "Banca Naţională a României — baza de date interactivă.",
        "nota_fara_valori": "Seria există în catalog, dar n-a publicat NICIODATĂ vreo valoare. Sunt 521 aşa, 8,8% din catalog.",
        "nota_acoperire": "Un interval cerut mai larg decât seria nu înseamnă goluri: `acoperire.serie` spune cât acoperă seria în general.",
        "valori": "/financiar/v1/serii/AEDZ_DEN/valori"
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitThe code is not in the catalogue. nu_e_serie_temporala — the code belongs to a register class.
422validareA malformed code or date, or pana_la before de_la.
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 malformed code or date, or pana_la before de_la.",
        "detalii": {
            "cod": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}