curl --request POST \
--url https://tars.loopscale.com/v1/markets/collateral/holders/historical \
--header 'Content-Type: application/json' \
--data '
{
"mint": "<string>",
"rangeEnd": 123,
"rangeStart": 123,
"pdas": true
}
'import requests
url = "https://tars.loopscale.com/v1/markets/collateral/holders/historical"
payload = {
"mint": "<string>",
"rangeEnd": 123,
"rangeStart": 123,
"pdas": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mint: '<string>', rangeEnd: 123, rangeStart: 123, pdas: true})
};
fetch('https://tars.loopscale.com/v1/markets/collateral/holders/historical', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tars.loopscale.com/v1/markets/collateral/holders/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mint' => '<string>',
'rangeEnd' => 123,
'rangeStart' => 123,
'pdas' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tars.loopscale.com/v1/markets/collateral/holders/historical"
payload := strings.NewReader("{\n \"mint\": \"<string>\",\n \"rangeEnd\": 123,\n \"rangeStart\": 123,\n \"pdas\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tars.loopscale.com/v1/markets/collateral/holders/historical")
.header("Content-Type", "application/json")
.body("{\n \"mint\": \"<string>\",\n \"rangeEnd\": 123,\n \"rangeStart\": 123,\n \"pdas\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/collateral/holders/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"mint\": \"<string>\",\n \"rangeEnd\": 123,\n \"rangeStart\": 123,\n \"pdas\": true\n}"
response = http.request(request)
puts response.read_body[
{
"collateralMint": "<string>",
"rangeEnd": 123,
"rangeStart": 123,
"userDepositSeconds": {}
}
]{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}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.
curl --request POST \
--url https://tars.loopscale.com/v1/markets/collateral/holders/historical \
--header 'Content-Type: application/json' \
--data '
{
"mint": "<string>",
"rangeEnd": 123,
"rangeStart": 123,
"pdas": true
}
'import requests
url = "https://tars.loopscale.com/v1/markets/collateral/holders/historical"
payload = {
"mint": "<string>",
"rangeEnd": 123,
"rangeStart": 123,
"pdas": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mint: '<string>', rangeEnd: 123, rangeStart: 123, pdas: true})
};
fetch('https://tars.loopscale.com/v1/markets/collateral/holders/historical', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tars.loopscale.com/v1/markets/collateral/holders/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mint' => '<string>',
'rangeEnd' => 123,
'rangeStart' => 123,
'pdas' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tars.loopscale.com/v1/markets/collateral/holders/historical"
payload := strings.NewReader("{\n \"mint\": \"<string>\",\n \"rangeEnd\": 123,\n \"rangeStart\": 123,\n \"pdas\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tars.loopscale.com/v1/markets/collateral/holders/historical")
.header("Content-Type", "application/json")
.body("{\n \"mint\": \"<string>\",\n \"rangeEnd\": 123,\n \"rangeStart\": 123,\n \"pdas\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/collateral/holders/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"mint\": \"<string>\",\n \"rangeEnd\": 123,\n \"rangeStart\": 123,\n \"pdas\": true\n}"
response = http.request(request)
puts response.read_body[
{
"collateralMint": "<string>",
"rangeEnd": 123,
"rangeStart": 123,
"userDepositSeconds": {}
}
]{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}