---
title: "Aggregated NBFI + bank debt holdings per country (5-sector sum)"
method: GET
path: "/api/v1/cross/total-nbfi/by-country/{slug}"
tags: ["Hedge Fund Intelligence"]
---

# Aggregated NBFI + bank debt holdings per country (5-sector sum)

`GET /api/v1/cross/total-nbfi/by-country/{slug}`

Sums S122 banks + S123 MMF + S124 investment funds + S128 insurance + S129 pension debt holdings per period for one country. Cross-store join across W6 SHSS S124 and D SHSS multi-sector helpers - composes their public APIs without a separate ingest path or schema bump.

MIN-anchored upper period bound + best-effort fill below ensures per-sector publication skew does not produce a sawtooth right-edge or strict-all-5 history truncation. Each row's `n_sectors_with_data` field surfaces how many sectors contributed to that period's total.

`include_breakdown=false` drops per-sector values from each row (smaller payload, less transparency). Cached 5 minutes via cache_async_lock_for double-check (mirror of /cross/transatlantic).

## Path parameters

- `slug` string, required — Country slug: 2-char lowercase, EA-21 ISO code (`at`, `de`, `fr`, `lu`, `ie` etc.) or `u2` for euro-area aggregate.

## Query parameters

- `include_breakdown` boolean — Include per-sector `breakdown` field on each row (default true). Set false for ~80% smaller payload.
- `periods` integer — Max number of periods returned (most recent first).

## Response `200`

Aggregated NBFI/bank debt holdings timeseries for one country with MIN-anchored upper period bound + per-sector breakdown by default.

- EnvelopeTotalNbfiByCountry
  - `data` TotalNbfiByCountry, required — Aggregated total NBFI/bank debt holdings timeseries for one country.
    - `country` string, required
    - `name` string, required
    - `upper_period` string, required — MIN-anchored upper bound across sectors with data: the latest period for which at least one sector has data, capped by the earliest sector latest. Rows below this period are best-effort fills (n_sectors_with_data may vary).
    - `coverage` TotalNbfiCoverage, required — Latest period each sector has data through for the requested country. None when the sector has no data for this country.
      - `S122_banks` string, nullable
      - `S123_mmf` string, nullable
      - `S124_funds` string, nullable
      - `S128_insurance` string, nullable
      - `S129_pension` string, nullable
    - `data_partial` boolean, required — True iff at least one of the 5 required sectors is unavailable globally (upstream store unloaded / partial ingest / schema drift). When True, totals are computed from available sectors only; consumers should treat the aggregate as degraded rather than authoritative.
    - `missing_sectors` string[], required — Consumer-facing labels of sectors with NO data globally (e.g. S128_insurance). Empty list means all 5 required sectors are loaded. Distinguishes upstream-source failure from legitimate country no-data (which shows up as n_sectors_with_data < 5 in individual rows).
    - `rows_count` integer, required — Number of rows in the rows list (capped at periods query param, default 20, max 60).
    - `rows` TotalNbfiRow[], required
      - `period` string, required — Quarter in YYYY-Q[1-4] format.
      - `total_eur_mn` number, required — Sum of available sector values in EUR millions.
      - `n_sectors_with_data` integer, required — How many of the 5 sectors (S122/S123/S124/S128/S129) contributed to total_eur_mn for this period.
      - `breakdown` TotalNbfiBreakdown — Per-sector EUR mn value for a single period. Keys are stable sector labels: `S122_banks`, `S123_mmf`, `S124_funds`, `S128_insurance`, `S129_pension`. A sector is omitted if no data exists for that (country, period) tuple.
        - `S122_banks` number, nullable
        - `S123_mmf` number, nullable
        - `S124_funds` number, nullable
        - `S128_insurance` number, nullable
        - `S129_pension` number, nullable
  - `meta` SugraMeta, required — Metadata attached to every /api/v1/* response envelope.
    - `endpoint` string, required — Requested endpoint path.
    - `data_time` string, required — ISO 8601 UTC timestamp of the source data, not of the request.
    - `response_time` string, required — ISO 8601 UTC timestamp when this response was produced.
    - `provider` string, required — API name and version.
    - `source` string, nullable — Identifier of the primary upstream source used for this response.
    - `attribution` string, nullable — Human-readable attribution mandated by an upstream source (e.g. a securities regulator or self-regulatory organization). Present only on responses whose source requires the owner and source to be clearly identified. Do not remove or alter it when using the response.
    - `fallback_used` boolean, nullable — True when the primary source failed and a fallback produced the data.
    - `fallback_chain` string[], nullable — Ordered list of sources attempted, in the order they were tried.
    - `cached` boolean, nullable — True when this response was served from the internal cache.
    - `stale` boolean, nullable — True when the cached response was returned after the upstream rate-limited or errored. Clients can use this to detect degraded data.

## Other responses

- `401` — Missing or invalid `x-api-key` header.
- `422` — Validation Error
- `429` — Daily rate limit exceeded. Check `X-RateLimit-Reset` for the next window.
- `503` — Upstream source is temporarily unavailable. Retry after a short delay.

---

[API](https://skmtc.net/sugra/apis/sugra-api.md) · [All operations](https://skmtc.net/sugra/apis/sugra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sugra/sugra-api/revisions/4e2740743eb4/schema)
