> For a complete page index of the Captain API documentation, fetch https://docs.filesearch.dev/llms.txt?excludeSpec=true

# Borrower Ledger Trend

GET https://api.filesearch.dev/v2/datasets/odyssey/credit-analysis/ledger/borrowers/{credit_id}/trend

Multi-quarter mark/spread series for the borrower — a single precomputed
GetItem. Surfaces widening-spread (early-distress) trends over time.

Reference: https://docs.filesearch.dev/reference/datasets/odyssey/credit-analysis/borrower-ledger/borrower-ledger-trend

## Request

### Path parameters

- `credit_id` (string, required) — Borrower credit id (cred_...)

## Response

### 200

Successful Response

- `credit_id` (string, required)
- `display_name` (string, optional, nullable)
- `series` (list of TrendPoint, optional) — Oldest→newest
- `trend` (string, optional, nullable) — widening, narrowing, stable
- `_meta` (CoverageMeta, optional) — Dataset provenance / freshness, echoed on every response.

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `error` (string, required) — `VALIDATION_ERROR`.
- `message` (string, required)
- `details` (list of V2DatasetsOdysseyCreditAnalysisLedgerBorrowersCreditIdTrendGetResponsesContentApplicationJsonSchemaDetailsItems, required) — One entry per invalid field, with `type`, `loc` and `msg`.
- `path` (string, required)

## Types

### TrendPoint

One period's consensus mark for the borrower (for the widening-spread series).

- `period` (string, required)
- `n_lenders` (integer, required)
- `min_mark_pct` (double, optional, nullable) — Lowest lender mark this period (%)
- `max_mark_pct` (double, optional, nullable) — Highest lender mark this period (%)
- `spread_pts` (double, optional, nullable) — Max-min divergence (points)

### CoverageMeta

Dataset provenance / freshness, echoed on every response.

- `source` (string, optional, default: SEC BDC filings (public domain))
- `coverage` (string, optional, default: BDC filer registry)
- `freshness` (string, optional, default: as-filed 10-Q, ~4wk after quarter-end)
- `citations` (string, optional, default: per-mark SEC URL)

### V2DatasetsOdysseyCreditAnalysisLedgerBorrowersCreditIdTrendGetResponsesContentApplicationJsonSchemaDetailsItems

## Examples

**Response**

```json
{
  "credit_id": "cred_b88143025498e3f0",
  "display_name": "Isagenix International, LLC",
  "series": [
    {
      "period": "2022-09-30",
      "n_lenders": 3,
      "min_mark_pct": 54,
      "max_mark_pct": 85.69,
      "spread_pts": 31.69
    },
    {
      "period": "2022-12-31",
      "n_lenders": 3,
      "min_mark_pct": 47.68,
      "max_mark_pct": 87.85,
      "spread_pts": 40.17
    }
  ],
  "trend": "widening",
  "_meta": {
    "source": "SEC BDC filings (public domain)",
    "coverage": "BDC filer registry",
    "freshness": "as-filed 10-Q, ~4wk after quarter-end",
    "citations": "per-mark SEC URL"
  }
}
```

**SDK Code**

```python Python REST
import requests

BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"

headers = {"Authorization": f"Bearer {API_KEY}"}

response = requests.get(
    f"{BASE_URL}/v2/datasets/odyssey/credit-analysis/ledger/borrowers/cred_b88143025498e3f0/trend",
    headers=headers,
    timeout=60.0
)
print(response.json())
```

```typescript TypeScript REST
const BASE_URL = "https://api.filesearch.dev";
const API_KEY = "your_api_key";

const response = await fetch(`${BASE_URL}/v2/datasets/odyssey/credit-analysis/ledger/borrowers/cred_b88143025498e3f0/trend`, {
    method: "GET",
    headers: { "Authorization": `Bearer ${API_KEY}` }
});
console.log(await response.json());
```