Skip to main content
POST
/
markets
/
collateral
/
holders
/
historical
Time-weighted historical collateral deposits per holder
curl --request POST \
  --url https://tars.loopscale.com/v1/markets/collateral/holders/historical \
  --header 'Content-Type: application/json' \
  --data '
{
  "mint": "So11111111111111111111111111111111111111112",
  "rangeStart": 1735689600,
  "rangeEnd": 1738368000,
  "pdas": false
}
'
[
  {
    "collateralMint": "So11111111111111111111111111111111111111112",
    "rangeStart": 1735689600,
    "rangeEnd": 1738368000,
    "userDepositSeconds": {
      "9xQe...borrower1": 2678400,
      "Bz4k...borrower2": 1339200
    }
  }
]

Body

application/json
mint
string
required

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.

Example:

"So11111111111111111111111111111111111111112"

rangeStart
integer<int64>
required

Window start, unix seconds. Events before this timestamp are collapsed into a single starting-balance bucket at rangeStart.

Example:

1735689600

rangeEnd
integer<int64>
required

Window end, unix seconds. Must be >= rangeStart. Events with eventTime == rangeEnd contribute zero seconds (boundary).

Example:

1738368000

pdas
boolean
default:false

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.

collateralMint
string
required

Echo of the request mint.

rangeStart
integer<int64>
required

Echo of the request rangeStart.

rangeEnd
integer<int64>
required

Echo of the request rangeEnd.

userDepositSeconds
object
required

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.