> ## Documentation Index
> Fetch the complete documentation index at: https://ormaprotocol.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/vaults — List All Tracked Lending Facilities

> Returns all tracked lending facilities sorted worst-first by credit grade. No parameters. Each item includes NAV, grade, loan counts, and oracle status.

Use this endpoint to get a ranked list of every facility Orma is tracking, ordered from the most credit-stressed to the healthiest. Because the list sorts by `gradeNumeric` rather than by NAV divergence, a manager who has declared no losses still appears at the top when the score says their book is distressed — the very scenario this service exists to surface.

## Parameters

This endpoint takes no parameters.

## Request

```bash theme={null}
curl -s http://localhost:8787/api/vaults
```

## Response

```json theme={null}
{
  "serverTime": "2026-09-12T22:20:22Z",
  "ledgerIndex": 5263343,
  "vaults": [
    {
      "vaultId": "24EAA01AD4CE70D8ABB4ACB4255DC4C216B8AF3B9E7315DB8052BFC1E5810089",
      "label": "Kestrel Bridge Financing II",
      "owner": "rD26gw5goDqU784caePMoA82givcJBjStk",
      "pseudoAccount": "rP3Z27Qb2HXg8ArLZ6VQkkjwYCWpmadN49",
      "asset": { "kind": "XRP", "currency": "XRP", "issuer": null, "mptIssuanceId": null },
      "vaultKind": "ClosedEnded",
      "phase": "Investment",
      "grade": "B",
      "gradeNumeric": 26,
      "trend": "stable",
      "assetsTotal": "10500000",
      "assetsAvailable": "10500000",
      "lossUnrealized": "0",
      "navNaive": "0.210000",
      "navCorrect": "0.210000",
      "navDivergenceBps": 0,
      "redemptionAt": "2026-09-13T15:08:35Z",
      "secondsToRedemption": 60494,
      "loanCount": 2,
      "distressedLoanCount": 2,
      "oraclePublished": true
    },
    {
      "vaultId": "864C5A2DDCED78C6198B0703169D533B747A56E5F9398D832033F79E37E8C835",
      "label": "Meridian Trade Finance I",
      "owner": "rHsMnLiHvvQ4r68M6yN6zUEiYGUXNWkHnJ",
      "pseudoAccount": "rBXqNaT2DbnGkV1wFhCNz7n3TgmXQkfhm5",
      "asset": { "kind": "XRP", "currency": "XRP", "issuer": null, "mptIssuanceId": null },
      "vaultKind": "ClosedEnded",
      "phase": "Investment",
      "grade": "AA",
      "gradeNumeric": 89,
      "trend": "stable",
      "assetsTotal": "51000000",
      "assetsAvailable": "41000000",
      "lossUnrealized": "10000000",
      "navNaive": "1.000000",
      "navCorrect": "0.803922",
      "navDivergenceBps": 1961,
      "redemptionAt": "2026-09-13T15:05:25Z",
      "secondsToRedemption": 60273,
      "loanCount": 1,
      "distressedLoanCount": 1,
      "oraclePublished": true
    }
  ]
}
```

<Note>
  The Kestrel row is the case the whole system exists to catch: `lossUnrealized: "0"`, divergence zero, NAV reporting `0.210000` on both naive and correct readings — and two distressed loans behind it. `gradeNumeric: 26` is the score's memory of realised capital destruction, which no NAV reading carries. Meridian ranks below Kestrel despite a divergence of 1961 basis points because it *declared* its loss and holds cash against every remaining claim.
</Note>

## Response Fields

<ResponseField name="serverTime" type="string">
  ISO 8601 ledger close time. Not the server wall clock — two fields in the same response come from the same ledger.
</ResponseField>

<ResponseField name="ledgerIndex" type="number">
  The ledger sequence number this snapshot was read from.
</ResponseField>

<ResponseField name="vaults" type="array">
  All tracked facilities, sorted by `gradeNumeric` ascending (worst first).

  <Expandable title="Vault item fields">
    <ResponseField name="vaultId" type="string">
      64-character uppercase hex. The ledger object ID of the `Vault` entry.
    </ResponseField>

    <ResponseField name="label" type="string">
      Human-readable facility name derived from the vault's metadata.
    </ResponseField>

    <ResponseField name="owner" type="string">
      XRPL address of the vault manager.
    </ResponseField>

    <ResponseField name="vaultKind" type="string">
      `"OpenEnded"` or `"ClosedEnded"`. Closed-ended vaults have a fixed redemption date; open-ended ones do not.
    </ResponseField>

    <ResponseField name="phase" type="string">
      Current lifecycle phase: `"Subscription"`, `"Investment"`, or `"Redemption"`.
    </ResponseField>

    <ResponseField name="grade" type="string">
      Letter grade from `"AAA"` to `"D"` derived from the six-dimension credit score.
    </ResponseField>

    <ResponseField name="gradeNumeric" type="number">
      Integer representation of the grade used for sorting. Higher is better (`AAA` = 100, `D` = 0). The list sorts ascending, so lower values appear first.
    </ResponseField>

    <ResponseField name="trend" type="string">
      Direction of `navCorrect` since the previous poll: `"improving"`, `"stable"`, or `"deteriorating"`.
    </ResponseField>

    <ResponseField name="assetsTotal" type="string">
      Total assets in drops as a decimal string. This is the `AssetsTotal` field read directly from the `Vault` ledger object.
    </ResponseField>

    <ResponseField name="assetsAvailable" type="string">
      Liquid assets available for redemption, in drops.
    </ResponseField>

    <ResponseField name="lossUnrealized" type="string">
      Declared but unrealised loss in drops. `"0"` when the ledger omits `LossUnrealized` (its type default). See [contract 2](/api/overview#2-absent-means-zero).
    </ResponseField>

    <ResponseField name="navNaive" type="string">
      NAV computed as `assetsTotal / sharesOutstanding` — what a tool reading only `AssetsTotal` would report.
    </ResponseField>

    <ResponseField name="navCorrect" type="string">
      NAV computed as `(assetsTotal - lossUnrealized) / sharesOutstanding` — the recoverable value per unit.
    </ResponseField>

    <ResponseField name="navDivergenceBps" type="number">
      Basis-point gap between `navNaive` and `navCorrect`, rounded half-up to the nearest integer. Zero until a loss is declared.
    </ResponseField>

    <ResponseField name="redemptionAt" type="string">
      ISO 8601 timestamp of the scheduled redemption boundary. `null` for open-ended vaults.
    </ResponseField>

    <ResponseField name="secondsToRedemption" type="number">
      Seconds until `redemptionAt`, computed against ledger close time. Goes negative once the redemption date has passed.
    </ResponseField>

    <ResponseField name="loanCount" type="number">
      Total number of loans in the broker's book.
    </ResponseField>

    <ResponseField name="distressedLoanCount" type="number">
      Number of loans that are overdue, impaired, or in default.
    </ResponseField>

    <ResponseField name="oraclePublished" type="boolean">
      `true` if an XLS-47 Oracle object for this vault is currently live on-chain.
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  `trend` is `"stable"` until the API has seen a vault at least twice during its current process lifetime, because the previous NAV is recorded only by the vault detail route. A consumer polling the list alone will see `"stable"` for every vault indefinitely. Poll `/api/vaults/:vaultId` for any facility where the trend direction matters.
</Note>
