v1

latestOpenAPI 3.1.02026-07-2639148131.7 KB
stats

Time-weighted historical collateral deposits per holder

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.

post/markets/collateral/holders/historical

Request body

mintstring required
pdasboolean
rangeEndinteger required
rangeStartinteger required

Response

Historical collateral holder summary

collateralMintstring required
rangeEndinteger required
rangeStartinteger required
userDepositSecondsobject required