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

# Borrower Ledger Lender Portfolio

GET https://api.filesearch.dev/v2/datasets/odyssey/credit-analysis/ledger/lenders/{cik}/portfolio

A lender's marked positions for a period, lowest mark (most distressed)
first. One Query on the lender-index GSI; the thresholds are filters.

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

## Request

### Path parameters

- `cik` (integer, required) — SEC CIK of the BDC lender

### Query parameters

- `period` (string, required) — Filing period end YYYY-MM-DD
- `max_mark_pct` (double, optional, nullable) — Only positions marked below this % (e.g. 90)
- `min_principal_usd` (double, optional, nullable) — Only positions with principal >= this

## Response

### 200

Successful Response

- `lender_cik` (integer, required)
- `period` (string, required)
- `count` (integer, required)
- `positions` (list of LenderPosition, optional) — Lowest mark (most distressed) first
- `_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 V2DatasetsOdysseyCreditAnalysisLedgerLendersCikPortfolioGetResponsesContentApplicationJsonSchemaDetailsItems, required) — One entry per invalid field, with `type`, `loc` and `msg`.
- `path` (string, required)

## Types

### LenderPosition

One of a lender's marked positions (a borrower facility) in a period.

- `credit_id` (string, required)
- `facility_class` (string, required)
- `display_name` (string, optional, nullable)
- `mark_pct` (double, optional, nullable) — Fair value as % of principal (0-100)
- `principal_usd` (double, optional, nullable)
- `fair_value_usd` (double, optional, nullable)
- `citation` (LedgerCitation, optional, nullable) — SEC provenance for a single mark — the moat is the citation, not the data.

### 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)

### V2DatasetsOdysseyCreditAnalysisLedgerLendersCikPortfolioGetResponsesContentApplicationJsonSchemaDetailsItems

### LedgerCitation

SEC provenance for a single mark — the moat is the citation, not the data.

- `sec_accession` (string, required) — SEC accession number of the source filing
- `source_url` (string, optional, nullable) — Direct URL to the filing document

## Examples

**Response**

```json
{
  "lender_cik": 1287750,
  "period": "2026-03-31",
  "count": 36,
  "positions": [
    {
      "credit_id": "cred_7a5be4773010c2fe",
      "facility_class": "first_lien",
      "display_name": "Daylight Beta Parent LLC and CFCo",
      "mark_pct": 3.37,
      "principal_usd": 71200000,
      "fair_value_usd": 2400000,
      "citation": {
        "sec_accession": "0001628280-26-027688",
        "source_url": "https://www.sec.gov/ix?doc=/Archives/edgar/data/1287750/000162828026027688/arcc-20260331.htm"
      }
    },
    {
      "credit_id": "cred_1798896ba289fee7",
      "facility_class": "first_lien",
      "display_name": "PS Operating Company LLC and PS Op Holdings LLC",
      "mark_pct": 24.5,
      "principal_usd": 50200000,
      "fair_value_usd": 12300000,
      "citation": {
        "sec_accession": "0001628280-26-027688",
        "source_url": "https://www.sec.gov/ix?doc=/Archives/edgar/data/1287750/000162828026027688/arcc-20260331.htm"
      }
    }
  ],
  "_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/lenders/1287750/portfolio",
    params={"period": "2026-03-31", "max_mark_pct": 90, "min_principal_usd": 5000000},
    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/lenders/1287750/portfolio?period=2026-03-31&max_mark_pct=90&min_principal_usd=5000000`, {
    method: "GET",
    headers: { "Authorization": `Bearer ${API_KEY}` }
});
console.log(await response.json());
```