Zum Inhalt springen
GET /v1/history

One country's quarterly debt-to-GDP for a sector

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/debttogdp-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/debttogdp-api/v1/history" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/debttogdp-api/v1/history", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/debttogdp-api/v1/history");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/debttogdp-api/v1/history",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "count": 40,
        "sector": "government",
        "source": "BIS",
        "country": "US",
        "history": [
            {
                "period": "2015-Q4",
                "debt_to_gdp": 99.6
            },
            {
                "period": "2016-Q1",
                "debt_to_gdp": 102.6
            },
            {
                "period": "2016-Q2",
                "debt_to_gdp": 103.3
            },
            {
                "period": "2016-Q3",
                "debt_to_gdp": 103.2
            },
            {
                "period": "2016-Q4",
                "debt_to_gdp": 100.6
            },
            {
                "period": "2017-Q1",
                "debt_to_gdp": 99.6
            },
            {
                "period": "2017-Q2",
                "debt_to_gdp": 98.7
            },
            {
                "period": "2017-Q3",
                "debt_to_gdp": 99.2
            },
            {
                "period": "2017-Q4",
                "debt_to_gdp": 99.4
            },
            {
                "period": "2018-Q1",
                "debt_to_gdp": 99.1
            },
            {
                "period": "2018-Q2",
                "debt_to_gdp": 97.5
            },
            {
                "period": "2018-Q3",
                "debt_to_gdp": 96.7
            },
            {
                "period": "2018-Q4",
                "debt_to_gdp": 98.9
            },
            {
                "period": "2019-Q1",
                "debt_to_gdp": 100.5
            },
            {
                "period": "2019-Q2",
                "debt_to_gdp": 100.7
            },
            {
                "period": "2019-Q3",
                "debt_to_gdp": 103.7
            },
            {
                "period": "2019-Q4",
                "debt_to_gdp": 103.5
            },
            {
                "period": "2020-Q1",
                "debt_to_gdp": 110.7
            },
            {
                "period": "2020-Q2",
                "debt_to_gdp": 125.1
            },
            {
                "period": "2020-Q3",
                "debt_to_gdp": 127.3
            },
            {
                "period": "2020-Q4",
                "debt_to_gdp": 129.3
            },
            {
                "period": "2021-Q1",
                "debt_to_gdp": 125.4
            },
            {
                "period": "2021-Q2",
                "debt_to_gdp": 121.9
            },
            {
                "period": "2021-Q3",
                "debt_to_gdp": 119.3
            },
            {
                "period": "2021-Q4",
                "debt_to_gdp": 119.1
            },
            {
                "period": "2022-Q1",
                "debt_to_gdp": 113.9
            },
            {
                "period": "2022-Q2",
                "debt_to_gdp": 107
            },
            {
                "period": "2022-Q3",
                "debt_to_gdp": 102.1
  
…