Get historical collateral holders
Returns, for each holder, the integral of their collateral balance over the requested time window — expressed as deposit-seconds (decimal-adjusted collateral units multiplied by seconds held). Useful for time-weighted depositor rewards, retroactive incentive splits, etc.
Event sources folded in:
- AddCollateral (+amount, decimal-adjusted)
- RemoveCollateral (−amount)
- Liquidate (−sum of collateralTransfers[] matching the target mint where toLiquidator = true; the row’s top-level amount is principal repaid and is ignored for collateral accounting)
Events with eventTime < rangeStart are collapsed into a single bucket at rangeStart so they establish the starting balance for the window. Events at exactly rangeEnd contribute zero seconds.
The mint filter is applied against loan_events_v1.asset_identifier for Add/Remove events and against per-transfer assetMint inside Liquidate metadata. For single-mint collateral these are equal; for CLP/LP collateral, asset_identifier is the pool id — callers should pass the pool id, not an underlying token mint.
Body
Collateral identifier to query. For standard SPL tokens this is the token mint; for CLP/LP positions it is the pool id (whatever is stored as asset_identifier on the loan event). Unknown mints return an empty result rather than an error.
"So11111111111111111111111111111111111111112"
Window start, unix seconds. Events before this timestamp are collapsed into a single starting-balance bucket at rangeStart.
1735689600
Window end, unix seconds. Must be >= rangeStart. Events with eventTime == rangeEnd contribute zero seconds (boundary).
1738368000
Controls the holder identity in the response keys: false (default) — aggregate by loans.borrower (wallet). true — aggregate by loan address (le.loan). Each loan is a separate holder.
Response
Array containing a single entry for the requested mint. Returned as an array (rather than a bare object) for parity with the active /collateral/holders endpoint, which fans out across multiple mints.
Echo of the request mint.
Echo of the request rangeStart.
Echo of the request rangeEnd.
Map of holder → integral of balance over the window. Units: decimal-adjusted token units × seconds. Keys: borrower wallet when pdas=false, loan address when pdas=true. Holders whose integrated value is within f64::EPSILON of zero are omitted.