oneapi
Sign in
Financiar v1 / TitluriStat

Yield at a requested maturity

The sovereign yield at a maturity that has no published point — „what is it at 7 years?" — obtained by interpolating between the neighbouring points.

The method is linear, and the route claims nothing else. Measured across all 3,929 days, reconstructing published points from their more distant neighbours: the mean error is 0.06–0.15 points, with maxima of 0.43–0.81. Those are gaps 2–7 times larger than the real ones, so between adjacent points the error is far smaller — but the figures show that the curve has curvature, and linear is an approximation. That is why metoda is declared and both neighbouring points come in the response, in intre: anyone wanting a different model has somewhere to start.

Nothing is extrapolated. Above 10 years or below 6 months, the answer is a 404 with in_afara_curbei and the range covered — extrapolating a yield curve beyond its last point is unsound, and a plausible but unfounded number is exactly what we avoid.

A published point requested exactly comes back as it is, with interpolat: false, not recomputed.

Bid and ask are interpolated separately, so a spread at the requested maturity comes out too.

GET
https://oneapi.ro/api/financiar/v1/titluri-stat/randament

Query parameters

NameTypeDescriptionAccepted values
maturitaterequired string Required. Three unambiguous spellings: 84 (months), 7Y (years), 18M (months). Between 6 months and 10 years. e.g. 7Ye.g. 18Me.g. 3M
dataoptional string | null Optional, YYYY-MM-DD. Defaults to the latest published fixing. Cannot be in the future. e.g. 2024-06-14

How it behaves

  • The Romanian sovereign yield at a maturity that has no published point. The NBR publishes five points — 6 months, 12 months, 3, 5 and 10 years; this route answers "what is it at 7 years?" by interpolating between neighbours.
  • The method is linear, and the route claims nothing more. Measured across all 3,929 days, reconstructing every published point from its more distant neighbours: the mean error is 0.06 points at 12 months, 0.16 at 3 years, 0.14 at 5 years, with maxima of 0.43, 0.56 and 0.81. Those are gaps 2–7 times wider than the real ones, so between adjacent points the error is far smaller — but the figures show plainly that the curve has curvature, and linear interpolation remains an approximation.
  • That is why metoda is declared in the response and intre carries both neighbouring points in full. Anyone who wants a different model — spline, Nelson-Siegel — has somewhere to start, without fetching the curve separately.
  • No extrapolation. Below 6 months or beyond 10 years the answer is 404 in_afara_curbei, with the covered range. Extending a yield curve past its last point is unreliable, and a plausible but unfounded number is exactly what we avoid.
  • A maturity that has a published point is returned as is, with interpolat: false and metoda: null — the fixing value, not a recomputed one. And it keeps the curve's own label: 12 months is 12M, not 1Y.
  • Bid and ask are interpolated separately, so the requested maturity gets its own spread. As everywhere in this family, bid > ask: these are yields, not prices.
  • A day without a publication gets the previous fixing, at most 10 days back, returned in ultima. Interpolation always uses points from the SAME day.

What it is for

  • Discounting a cash flow whose maturity falls between published points.
  • Pricing a corporate bond by adding a spread to the sovereign yield at the same maturity.
  • Building a fixed-step curve, point by point, for your own model.

Response structure

FieldTypeDescription
data.luni integer The requested maturity, in months.
data.maturitate_ceruta string Its label. When it matches a published point, the curve's own label (12M, not 1Y).
data.data string
data.data_ceruta string The date the client asked for, before alignment to a day that has data.
data.exact_ziua boolean true only if the day returned is the day requested.
data.zile_inapoi integer How many days back the last fixing was found.
data.unitate string Always procent_pe_an.
data.interpolat boolean false means a published value, not a computed one.
data.metoda string liniara when interpolated, null when the point is published.
data.bid string The bid yield at the requested maturity. HIGHER than ask.
data.ask string The ask yield at the requested maturity.
data.mid string The average of bid and ask.
data.spread string bid − ask, in percentage points. Already positive.
data.intre.stanga object The published point immediately below the requested maturity, in full. null when nothing was interpolated.
data.intre.stanga.maturitate string
data.intre.stanga.denumire string The name, exactly as the source publishes it.
data.intre.stanga.luni integer Number of months covered.
data.intre.stanga.bid string
data.intre.stanga.ask string
data.intre.stanga.mid string
data.intre.stanga.spread string
data.intre.dreapta object The published point immediately above. null when nothing was interpolated.
data.intre.dreapta.maturitate string
data.intre.dreapta.denumire string The name, exactly as the source publishes it.
data.intre.dreapta.luni integer Number of months covered.
data.intre.dreapta.bid string
data.intre.dreapta.ask string
data.intre.dreapta.mid string
data.intre.dreapta.spread string
meta.sursa string The official source the data comes from, with its licence where one is required.
meta.metoda string
meta.nota_vecini string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_extrapolare string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.curba string
meta.fara_date string data is null and this says why. The maturity is below 6 months or above 10 years; the response gives the covered range and the published points.
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/titluri-stat/randament?maturitate=7Y&data=2024-06-14
{
    "data": {
        "luni": 84,
        "maturitate_ceruta": "7Y",
        "data": "2024-06-14",
        "data_ceruta": "2024-06-14",
        "exact_ziua": true,
        "zile_inapoi": 0,
        "unitate": "procent_pe_an",
        "interpolat": true,
        "metoda": "liniara",
        "bid": "6.71",
        "ask": "6.47",
        "mid": "6.59",
        "spread": "0.24",
        "intre": {
            "stanga": {
                "maturitate": "5Y",
                "denumire": "cinci ani",
                "luni": 60,
                "bid": "6.59",
                "ask": "6.35",
                "mid": "6.47",
                "spread": "0.24"
            },
            "dreapta": {
                "maturitate": "10Y",
                "denumire": "zece ani",
                "luni": 120,
                "bid": "6.89",
                "ask": "6.66",
                "mid": "6.78",
                "spread": "0.23"
            }
        }
    },
    "meta": {
        "sursa": "BNR — fixing titluri de stat (baza de date interactivă).",
        "metoda": "Interpolare LINIARĂ între punctele adiacente. Măsurat pe toată seria, curba are curbură reală: reconstruind puncte publicate din vecini mai îndepărtaţi, eroarea medie e 0,06–0,15 puncte. Între adiacente e mult mai mică, dar rămâne o aproximare.",
        "nota_vecini": "`intre` conţine ambele puncte vecine, întregi — cine vrea alt model de interpolare porneşte de acolo.",
        "nota_extrapolare": "Curba acoperă 6 luni – 10 ani. În afara ei nu se extrapolează.",
        "curba": "Toate punctele publicate ale zilei: /financiar/v1/titluri-stat/fixing."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitNo fixing applies at the requested date.
422validareMalformed maturity, or a malformed or future date.
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 maturity, or a malformed or future date.",
        "detalii": {
            "maturitate": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}