Financiar v1 / Curs
Exchange rate series over an interval
The quotations for 1–5 currencies between two dates, grouped by currency. Days with no publication (weekends, holidays) do not appear in the series; meta.zile_publicate says how many points there actually are. The interval is limited to 366 days — exceeding it is rejected, not silently truncated.
GET
https://oneapi.ro/api/financiar/v1/curs/interval
Query parameters
NameTypeDescriptionAccepted values
de_larequired
string
Required,
YYYY-MM-DD. Cannot be in the future.
e.g. 2024-06-15e.g. 2024-06-01
pana_laoptional
string | null
Optional, defaults to the current day. May be in the future — it is aligned to today.
e.g. 2024-06-15e.g. 2024-06-30e.g. 2024-06-14
valutalistoptional
text
Required, 1–5 codes:
?valuta=EUR,USD or ?valuta[]=EUR&valuta[]=USD.
e.g. EURe.g. USD
How it behaves
- Quotes for one to five currencies, between
de_laandpana_la, grouped by currency. - Days without publication do not appear in the series — weekends and holidays are missing.
meta.zile_publicatesays how many points the response actually holds, so an average computed over the series is known to be computed over what. - The multiplier is declared once per series, not on every point: it is constant across the whole history of each currency (verified on all 40).
- The interval is capped at 366 calendar days — a year plus a day, so that "the last 12 months" fits in a leap year too. Exceeding it returns 422 with the number of days requested; the series is never silently truncated.
- The bounds are aligned to the actual coverage rather than refused: a
de_labefore 2005-01-03 rises to the first day in the database, and apana_lain the future drops to the current day. Whatever was adjusted appears inmeta.ajustat. - The 366-day ceiling is checked AFTER alignment: a request from 2004 to June 2005 spans 517 requested days but only 149 within coverage, so it passes.
What it is for
- Charting the evolution of the exchange rate.
- The average rate over a month or a quarter.
- Comparing two or three currencies over the same interval.
Response structure
FieldTypeDescription
data.de_la
string
Start of the interval the response covers.
data.pana_la
string
End of the interval the response covers, inclusive.
data.moneda_baza
string
The currency the rates are quoted against.
data.serii
array
The series in the response.
meta.sursa
string
The official source the data comes from, with its licence where one is required.
meta.valute
integer
Currencies covered by the response.
meta.zile_publicate
integer
The total number of quotes in the response, across all series.
meta.zile_interval
integer
The length of the interval actually used, in calendar days.
meta.necotate
array
Requested currencies that have no quote at all in the interval.
data.serii[].multiplicator
integer
How many units of currency
valoare covers, for the whole series (1 or 100).
data.serii[].valori[].valoare
string
The figure published by NBR.
data.serii[].valori[].valoare_unitara
string
RON for ONE unit, already divided by the multiplier.
meta.ajustat
Which bounds were aligned to the coverage (
de_la, pana_la). Absent when nothing was adjusted.
meta.fara_date
data is null and this says why. The interval lies entirely before the first day in the database.
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/interval?de_la=2024-06-15&valuta=EUR&pana_la=2024-06-15
{
"data": {
"de_la": "2024-06-15",
"pana_la": "2024-06-15",
"moneda_baza": "RON",
"serii": []
},
"meta": {
"sursa": "Banca Naţională a României",
"valute": 0,
"zile_publicate": 0,
"zile_interval": 1,
"necotate": [
"EUR"
]
}
}
GEThttps://oneapi.ro/api/financiar/v1/curs/interval?de_la=2024-06-15&valuta=EUR&pana_la=2024-06-30
{
"data": {
"de_la": "2024-06-15",
"pana_la": "2024-06-30",
"moneda_baza": "RON",
"serii": [
{
"valuta": "EUR",
"multiplicator": 1,
"valori": [
{
"data": "2024-06-17",
"valoare": "4.9768",
"valoare_unitara": "4.9768"
}
]
}
]
},
"meta": {
"sursa": "Banca Naţională a României",
"valute": 1,
"zile_publicate": 9,
"zile_interval": 16
}
}
GEThttps://oneapi.ro/api/financiar/v1/curs/interval?de_la=2024-06-01&pana_la=2024-06-14&valuta[]=USD
{
"data": {
"de_la": "2024-06-01",
"pana_la": "2024-06-14",
"moneda_baza": "RON",
"serii": [
{
"valuta": "USD",
"multiplicator": 1,
"valori": [
{
"data": "2024-06-03",
"valoare": "4.5922",
"valoare_unitara": "4.5922"
}
]
}
]
},
"meta": {
"sursa": "Banca Naţională a României",
"valute": 1,
"zile_publicate": 10,
"zile_interval": 14
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | validare | interval_prea_lung (over 366 days), de_la in the future, pana_la before de_la, more than 5 currencies, or an invalid currency code. |
| 429 | cota_depasita | The 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 (over 366 days), de_la in the future, pana_la before de_la, more than 5 currencies, or an invalid currency code.",
"detalii": {
"de_la": [
"The value sent does not satisfy the parameter rule."
]
}
}
}