curl --request POST \
--url https://tars.loopscale.com/v1/markets/loans/info \
--header 'Content-Type: application/json' \
--data '
{
"assetTypes": [
1
],
"borrowers": [
"<string>"
],
"collateralIdentifiers": [
"<string>"
],
"collateralMints": [
"<string>"
],
"excludeCollateralIdentifiers": [
"<string>"
],
"excludeCollateralMints": [
"<string>"
],
"excludePrincipalMints": [
"<string>"
],
"filterType": 1,
"includePnl": true,
"lenders": [
"<string>"
],
"loanAddresses": [
"<string>"
],
"loopVaultPrincipalCollateralPairs": [
{
"collateralAssetIdentifier": "<string>",
"principalAssetIdentifier": "<string>"
}
],
"orderFundingTypes": 1,
"page": 1,
"pageSize": 1,
"principalMints": [
"<string>"
],
"sortSide": 1,
"sortType": 1
}
'import requests
url = "https://tars.loopscale.com/v1/markets/loans/info"
payload = {
"assetTypes": [1],
"borrowers": ["<string>"],
"collateralIdentifiers": ["<string>"],
"collateralMints": ["<string>"],
"excludeCollateralIdentifiers": ["<string>"],
"excludeCollateralMints": ["<string>"],
"excludePrincipalMints": ["<string>"],
"filterType": 1,
"includePnl": True,
"lenders": ["<string>"],
"loanAddresses": ["<string>"],
"loopVaultPrincipalCollateralPairs": [
{
"collateralAssetIdentifier": "<string>",
"principalAssetIdentifier": "<string>"
}
],
"orderFundingTypes": 1,
"page": 1,
"pageSize": 1,
"principalMints": ["<string>"],
"sortSide": 1,
"sortType": 1
}
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({
assetTypes: [1],
borrowers: ['<string>'],
collateralIdentifiers: ['<string>'],
collateralMints: ['<string>'],
excludeCollateralIdentifiers: ['<string>'],
excludeCollateralMints: ['<string>'],
excludePrincipalMints: ['<string>'],
filterType: 1,
includePnl: true,
lenders: ['<string>'],
loanAddresses: ['<string>'],
loopVaultPrincipalCollateralPairs: [{collateralAssetIdentifier: '<string>', principalAssetIdentifier: '<string>'}],
orderFundingTypes: 1,
page: 1,
pageSize: 1,
principalMints: ['<string>'],
sortSide: 1,
sortType: 1
})
};
fetch('https://tars.loopscale.com/v1/markets/loans/info', 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/loans/info",
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([
'assetTypes' => [
1
],
'borrowers' => [
'<string>'
],
'collateralIdentifiers' => [
'<string>'
],
'collateralMints' => [
'<string>'
],
'excludeCollateralIdentifiers' => [
'<string>'
],
'excludeCollateralMints' => [
'<string>'
],
'excludePrincipalMints' => [
'<string>'
],
'filterType' => 1,
'includePnl' => true,
'lenders' => [
'<string>'
],
'loanAddresses' => [
'<string>'
],
'loopVaultPrincipalCollateralPairs' => [
[
'collateralAssetIdentifier' => '<string>',
'principalAssetIdentifier' => '<string>'
]
],
'orderFundingTypes' => 1,
'page' => 1,
'pageSize' => 1,
'principalMints' => [
'<string>'
],
'sortSide' => 1,
'sortType' => 1
]),
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/loans/info"
payload := strings.NewReader("{\n \"assetTypes\": [\n 1\n ],\n \"borrowers\": [\n \"<string>\"\n ],\n \"collateralIdentifiers\": [\n \"<string>\"\n ],\n \"collateralMints\": [\n \"<string>\"\n ],\n \"excludeCollateralIdentifiers\": [\n \"<string>\"\n ],\n \"excludeCollateralMints\": [\n \"<string>\"\n ],\n \"excludePrincipalMints\": [\n \"<string>\"\n ],\n \"filterType\": 1,\n \"includePnl\": true,\n \"lenders\": [\n \"<string>\"\n ],\n \"loanAddresses\": [\n \"<string>\"\n ],\n \"loopVaultPrincipalCollateralPairs\": [\n {\n \"collateralAssetIdentifier\": \"<string>\",\n \"principalAssetIdentifier\": \"<string>\"\n }\n ],\n \"orderFundingTypes\": 1,\n \"page\": 1,\n \"pageSize\": 1,\n \"principalMints\": [\n \"<string>\"\n ],\n \"sortSide\": 1,\n \"sortType\": 1\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/loans/info")
.header("Content-Type", "application/json")
.body("{\n \"assetTypes\": [\n 1\n ],\n \"borrowers\": [\n \"<string>\"\n ],\n \"collateralIdentifiers\": [\n \"<string>\"\n ],\n \"collateralMints\": [\n \"<string>\"\n ],\n \"excludeCollateralIdentifiers\": [\n \"<string>\"\n ],\n \"excludeCollateralMints\": [\n \"<string>\"\n ],\n \"excludePrincipalMints\": [\n \"<string>\"\n ],\n \"filterType\": 1,\n \"includePnl\": true,\n \"lenders\": [\n \"<string>\"\n ],\n \"loanAddresses\": [\n \"<string>\"\n ],\n \"loopVaultPrincipalCollateralPairs\": [\n {\n \"collateralAssetIdentifier\": \"<string>\",\n \"principalAssetIdentifier\": \"<string>\"\n }\n ],\n \"orderFundingTypes\": 1,\n \"page\": 1,\n \"pageSize\": 1,\n \"principalMints\": [\n \"<string>\"\n ],\n \"sortSide\": 1,\n \"sortType\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/loans/info")
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 \"assetTypes\": [\n 1\n ],\n \"borrowers\": [\n \"<string>\"\n ],\n \"collateralIdentifiers\": [\n \"<string>\"\n ],\n \"collateralMints\": [\n \"<string>\"\n ],\n \"excludeCollateralIdentifiers\": [\n \"<string>\"\n ],\n \"excludeCollateralMints\": [\n \"<string>\"\n ],\n \"excludePrincipalMints\": [\n \"<string>\"\n ],\n \"filterType\": 1,\n \"includePnl\": true,\n \"lenders\": [\n \"<string>\"\n ],\n \"loanAddresses\": [\n \"<string>\"\n ],\n \"loopVaultPrincipalCollateralPairs\": [\n {\n \"collateralAssetIdentifier\": \"<string>\",\n \"principalAssetIdentifier\": \"<string>\"\n }\n ],\n \"orderFundingTypes\": 1,\n \"page\": 1,\n \"pageSize\": 1,\n \"principalMints\": [\n \"<string>\"\n ],\n \"sortSide\": 1,\n \"sortType\": 1\n}"
response = http.request(request)
puts response.read_body{
"aggregate": {
"collateralUsd": 123,
"count": 1,
"dailyCollateralYieldUsd": 123,
"dailyInterestUsd": 123,
"dailyPrincipalYieldUsd": 123,
"interestAccruedUsd": 123,
"interestEarnedAllTimeUsd": 123,
"pendingYieldUsd": 123,
"principalUsd": 123,
"wAvgApy": 123,
"wAvgCollateralApy": 123,
"pnlUsd": 123,
"tokenUsdPnl": 123
},
"collateralMints": [
"<string>"
],
"items": [
{
"collateral": [
{
"amount": 1,
"assetIdentifier": "<string>",
"assetMint": "<string>",
"assetType": 1,
"index": 1,
"loan": "<string>",
"id": 1,
"lastInteractedTime": 1,
"lastInteractedTxn": "<string>",
"writeVersion": 1
}
],
"collateralYieldPct": 123,
"ledgers": [
{
"apy": 1,
"duration": 1,
"durationType": 1,
"endTime": 1,
"interestOutstanding": 1,
"interestPerSecond": 123,
"lastInteractedTime": 1,
"lastInteractedTxn": "<string>",
"lastInterestUpdatedTime": 1,
"ledgerIndex": 1,
"loan": "<string>",
"lqtRatios": [
1
],
"ltvRatios": [
1
],
"marketInformation": "<string>",
"principalDue": 1,
"principalMint": "<string>",
"principalRepaid": 1,
"startTime": 1,
"status": 1,
"strategy": "<string>",
"weights": [
1
],
"id": 1,
"isLoop": 123,
"writeVersion": 1
}
],
"loan": {
"address": "<string>",
"borrower": "<string>",
"bump": 1,
"closed": true,
"lastInteractedTime": 1,
"lastInteractedTxn": "<string>",
"loanStatus": 1,
"nonce": 1,
"startTime": 1,
"writeVersion": 1,
"id": 1
},
"loanType": 1,
"principalYieldPct": 123,
"collateralBreakdown": [
{
"assetIdentifier": "<string>",
"usd": 123
}
],
"collateralUsd": 123,
"collateralUsdRisk": 123,
"interestAccruedUsd": 123,
"pendingYieldUsd": 123,
"pnlUsd": 123,
"principalUsd": 123,
"principalUsdRisk": 123,
"pnl": {
"collateralPnl": 123,
"collateralPnlPctChange": 123,
"initialUserCollateralContribution": 123,
"initialUserCollateralContributionUsd": 123,
"markers": [
{
"date": 123,
"type": "rollover",
"metadata": {
"newCollateralMint": "<string>",
"previousCollateralMint": "<string>"
}
}
],
"netCollateralInflow": 123,
"netCollateralUsdInflow": 123,
"netPrincipalInflow": 123,
"netPrincipalUsdInflow": 123,
"pnlData": {
"dataPoints": [
{
"date": 123,
"collateralPrice": 123,
"collateralValueUsd": 123,
"isProjection": true,
"netCollateralTransferTokenAmount": 123,
"netCollateralTransferUsdAmount": 123,
"netPositionValueTokenAmount": 123,
"netPositionValueUsd": 123,
"principalValueUsd": 123,
"tokenPnl": 123,
"usdPnl": 123
}
]
},
"positionValueData": {
"dataPoints": [
{
"collateralMint": "<string>",
"date": 123,
"collateralTokenAmount": 123,
"collateralTokenAmountOfDebt": 123,
"collateralValueUsd": 123,
"isProjection": true,
"netPositionValueTokenAmount": 123,
"netPositionValueUsd": 123,
"principalValueUsd": 123
}
]
},
"rateHistoryData": {
"dataPoints": [
{
"collateralMint": "<string>",
"date": 123,
"borrowApy": 123,
"collateralApy": 123,
"isProjection": true,
"netApy": 123
}
]
},
"tokenUsdPnl": 123,
"usdPnl": 123,
"usdPnlPctChange": 123
}
}
],
"pageInfo": {
"page": 1,
"pageSize": 1,
"totalItems": 1,
"totalPages": 1
},
"principalMints": [
"<string>"
],
"snapshotTs": 123
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}Get loan info
Returns a list of loans filtered by request. Results support pagination.
curl --request POST \
--url https://tars.loopscale.com/v1/markets/loans/info \
--header 'Content-Type: application/json' \
--data '
{
"assetTypes": [
1
],
"borrowers": [
"<string>"
],
"collateralIdentifiers": [
"<string>"
],
"collateralMints": [
"<string>"
],
"excludeCollateralIdentifiers": [
"<string>"
],
"excludeCollateralMints": [
"<string>"
],
"excludePrincipalMints": [
"<string>"
],
"filterType": 1,
"includePnl": true,
"lenders": [
"<string>"
],
"loanAddresses": [
"<string>"
],
"loopVaultPrincipalCollateralPairs": [
{
"collateralAssetIdentifier": "<string>",
"principalAssetIdentifier": "<string>"
}
],
"orderFundingTypes": 1,
"page": 1,
"pageSize": 1,
"principalMints": [
"<string>"
],
"sortSide": 1,
"sortType": 1
}
'import requests
url = "https://tars.loopscale.com/v1/markets/loans/info"
payload = {
"assetTypes": [1],
"borrowers": ["<string>"],
"collateralIdentifiers": ["<string>"],
"collateralMints": ["<string>"],
"excludeCollateralIdentifiers": ["<string>"],
"excludeCollateralMints": ["<string>"],
"excludePrincipalMints": ["<string>"],
"filterType": 1,
"includePnl": True,
"lenders": ["<string>"],
"loanAddresses": ["<string>"],
"loopVaultPrincipalCollateralPairs": [
{
"collateralAssetIdentifier": "<string>",
"principalAssetIdentifier": "<string>"
}
],
"orderFundingTypes": 1,
"page": 1,
"pageSize": 1,
"principalMints": ["<string>"],
"sortSide": 1,
"sortType": 1
}
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({
assetTypes: [1],
borrowers: ['<string>'],
collateralIdentifiers: ['<string>'],
collateralMints: ['<string>'],
excludeCollateralIdentifiers: ['<string>'],
excludeCollateralMints: ['<string>'],
excludePrincipalMints: ['<string>'],
filterType: 1,
includePnl: true,
lenders: ['<string>'],
loanAddresses: ['<string>'],
loopVaultPrincipalCollateralPairs: [{collateralAssetIdentifier: '<string>', principalAssetIdentifier: '<string>'}],
orderFundingTypes: 1,
page: 1,
pageSize: 1,
principalMints: ['<string>'],
sortSide: 1,
sortType: 1
})
};
fetch('https://tars.loopscale.com/v1/markets/loans/info', 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/loans/info",
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([
'assetTypes' => [
1
],
'borrowers' => [
'<string>'
],
'collateralIdentifiers' => [
'<string>'
],
'collateralMints' => [
'<string>'
],
'excludeCollateralIdentifiers' => [
'<string>'
],
'excludeCollateralMints' => [
'<string>'
],
'excludePrincipalMints' => [
'<string>'
],
'filterType' => 1,
'includePnl' => true,
'lenders' => [
'<string>'
],
'loanAddresses' => [
'<string>'
],
'loopVaultPrincipalCollateralPairs' => [
[
'collateralAssetIdentifier' => '<string>',
'principalAssetIdentifier' => '<string>'
]
],
'orderFundingTypes' => 1,
'page' => 1,
'pageSize' => 1,
'principalMints' => [
'<string>'
],
'sortSide' => 1,
'sortType' => 1
]),
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/loans/info"
payload := strings.NewReader("{\n \"assetTypes\": [\n 1\n ],\n \"borrowers\": [\n \"<string>\"\n ],\n \"collateralIdentifiers\": [\n \"<string>\"\n ],\n \"collateralMints\": [\n \"<string>\"\n ],\n \"excludeCollateralIdentifiers\": [\n \"<string>\"\n ],\n \"excludeCollateralMints\": [\n \"<string>\"\n ],\n \"excludePrincipalMints\": [\n \"<string>\"\n ],\n \"filterType\": 1,\n \"includePnl\": true,\n \"lenders\": [\n \"<string>\"\n ],\n \"loanAddresses\": [\n \"<string>\"\n ],\n \"loopVaultPrincipalCollateralPairs\": [\n {\n \"collateralAssetIdentifier\": \"<string>\",\n \"principalAssetIdentifier\": \"<string>\"\n }\n ],\n \"orderFundingTypes\": 1,\n \"page\": 1,\n \"pageSize\": 1,\n \"principalMints\": [\n \"<string>\"\n ],\n \"sortSide\": 1,\n \"sortType\": 1\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/loans/info")
.header("Content-Type", "application/json")
.body("{\n \"assetTypes\": [\n 1\n ],\n \"borrowers\": [\n \"<string>\"\n ],\n \"collateralIdentifiers\": [\n \"<string>\"\n ],\n \"collateralMints\": [\n \"<string>\"\n ],\n \"excludeCollateralIdentifiers\": [\n \"<string>\"\n ],\n \"excludeCollateralMints\": [\n \"<string>\"\n ],\n \"excludePrincipalMints\": [\n \"<string>\"\n ],\n \"filterType\": 1,\n \"includePnl\": true,\n \"lenders\": [\n \"<string>\"\n ],\n \"loanAddresses\": [\n \"<string>\"\n ],\n \"loopVaultPrincipalCollateralPairs\": [\n {\n \"collateralAssetIdentifier\": \"<string>\",\n \"principalAssetIdentifier\": \"<string>\"\n }\n ],\n \"orderFundingTypes\": 1,\n \"page\": 1,\n \"pageSize\": 1,\n \"principalMints\": [\n \"<string>\"\n ],\n \"sortSide\": 1,\n \"sortType\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/loans/info")
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 \"assetTypes\": [\n 1\n ],\n \"borrowers\": [\n \"<string>\"\n ],\n \"collateralIdentifiers\": [\n \"<string>\"\n ],\n \"collateralMints\": [\n \"<string>\"\n ],\n \"excludeCollateralIdentifiers\": [\n \"<string>\"\n ],\n \"excludeCollateralMints\": [\n \"<string>\"\n ],\n \"excludePrincipalMints\": [\n \"<string>\"\n ],\n \"filterType\": 1,\n \"includePnl\": true,\n \"lenders\": [\n \"<string>\"\n ],\n \"loanAddresses\": [\n \"<string>\"\n ],\n \"loopVaultPrincipalCollateralPairs\": [\n {\n \"collateralAssetIdentifier\": \"<string>\",\n \"principalAssetIdentifier\": \"<string>\"\n }\n ],\n \"orderFundingTypes\": 1,\n \"page\": 1,\n \"pageSize\": 1,\n \"principalMints\": [\n \"<string>\"\n ],\n \"sortSide\": 1,\n \"sortType\": 1\n}"
response = http.request(request)
puts response.read_body{
"aggregate": {
"collateralUsd": 123,
"count": 1,
"dailyCollateralYieldUsd": 123,
"dailyInterestUsd": 123,
"dailyPrincipalYieldUsd": 123,
"interestAccruedUsd": 123,
"interestEarnedAllTimeUsd": 123,
"pendingYieldUsd": 123,
"principalUsd": 123,
"wAvgApy": 123,
"wAvgCollateralApy": 123,
"pnlUsd": 123,
"tokenUsdPnl": 123
},
"collateralMints": [
"<string>"
],
"items": [
{
"collateral": [
{
"amount": 1,
"assetIdentifier": "<string>",
"assetMint": "<string>",
"assetType": 1,
"index": 1,
"loan": "<string>",
"id": 1,
"lastInteractedTime": 1,
"lastInteractedTxn": "<string>",
"writeVersion": 1
}
],
"collateralYieldPct": 123,
"ledgers": [
{
"apy": 1,
"duration": 1,
"durationType": 1,
"endTime": 1,
"interestOutstanding": 1,
"interestPerSecond": 123,
"lastInteractedTime": 1,
"lastInteractedTxn": "<string>",
"lastInterestUpdatedTime": 1,
"ledgerIndex": 1,
"loan": "<string>",
"lqtRatios": [
1
],
"ltvRatios": [
1
],
"marketInformation": "<string>",
"principalDue": 1,
"principalMint": "<string>",
"principalRepaid": 1,
"startTime": 1,
"status": 1,
"strategy": "<string>",
"weights": [
1
],
"id": 1,
"isLoop": 123,
"writeVersion": 1
}
],
"loan": {
"address": "<string>",
"borrower": "<string>",
"bump": 1,
"closed": true,
"lastInteractedTime": 1,
"lastInteractedTxn": "<string>",
"loanStatus": 1,
"nonce": 1,
"startTime": 1,
"writeVersion": 1,
"id": 1
},
"loanType": 1,
"principalYieldPct": 123,
"collateralBreakdown": [
{
"assetIdentifier": "<string>",
"usd": 123
}
],
"collateralUsd": 123,
"collateralUsdRisk": 123,
"interestAccruedUsd": 123,
"pendingYieldUsd": 123,
"pnlUsd": 123,
"principalUsd": 123,
"principalUsdRisk": 123,
"pnl": {
"collateralPnl": 123,
"collateralPnlPctChange": 123,
"initialUserCollateralContribution": 123,
"initialUserCollateralContributionUsd": 123,
"markers": [
{
"date": 123,
"type": "rollover",
"metadata": {
"newCollateralMint": "<string>",
"previousCollateralMint": "<string>"
}
}
],
"netCollateralInflow": 123,
"netCollateralUsdInflow": 123,
"netPrincipalInflow": 123,
"netPrincipalUsdInflow": 123,
"pnlData": {
"dataPoints": [
{
"date": 123,
"collateralPrice": 123,
"collateralValueUsd": 123,
"isProjection": true,
"netCollateralTransferTokenAmount": 123,
"netCollateralTransferUsdAmount": 123,
"netPositionValueTokenAmount": 123,
"netPositionValueUsd": 123,
"principalValueUsd": 123,
"tokenPnl": 123,
"usdPnl": 123
}
]
},
"positionValueData": {
"dataPoints": [
{
"collateralMint": "<string>",
"date": 123,
"collateralTokenAmount": 123,
"collateralTokenAmountOfDebt": 123,
"collateralValueUsd": 123,
"isProjection": true,
"netPositionValueTokenAmount": 123,
"netPositionValueUsd": 123,
"principalValueUsd": 123
}
]
},
"rateHistoryData": {
"dataPoints": [
{
"collateralMint": "<string>",
"date": 123,
"borrowApy": 123,
"collateralApy": 123,
"isProjection": true,
"netApy": 123
}
]
},
"tokenUsdPnl": 123,
"usdPnl": 123,
"usdPnlPctChange": 123
}
}
],
"pageInfo": {
"page": 1,
"pageSize": 1,
"totalItems": 1,
"totalPages": 1
},
"principalMints": [
"<string>"
],
"snapshotTs": 123
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}{
"error": {
"code": 400,
"message": "Request could not be processed."
}
}Body
x >= 0loan borrower
Filters on loan_collateral.asset_mint, complementing
exclude_collateral_identifiers (which filters on asset_identifier).
For plain SPL collateral the two columns are equal; for LP/pool
collateral asset_identifier is the pool_id, so excluding by mint
alone won't catch those rows. Set both to cover both cases.
filter type enum
x >= 0When true, /loans/info runs the PnL pipeline against the page's loans
in parallel with the list-side pricing pass and stamps a
LoanPnlDetails onto each LoanSummaryItem. Off by default so the
dropdown/filter-edit calls that don't render PnL stay cheap.
loan lender
loan address
Show child attributes
Show child attributes
x >= 0x >= 0x >= 0principal
Sort direction: 0 = ascending, 1 = descending.
x >= 0Sort key (see LoanInfoSorting discriminants).
x >= 0Response
List of loan data
Filter-scoped aggregate over the full matched loan set. USD fields use the request's pinned oracle snapshot. APYs are returned in fractional form (0.085 = 8.5%), not cbps.
dailyInterestUsd, dailyCollateralYieldUsd, and dailyPrincipalYieldUsd
are role-neutral primitives. The FE composes role-specific composites:
- Borrower daily net carry:
dailyCollateralYieldUsd − dailyInterestUsd - Lender daily net carry:
dailyInterestUsd - Loop net daily yield:
dailyCollateralYieldUsd − dailyInterestUsd − dailyPrincipalYieldUsd(loops borrow yield-bearing principals like JLP/mSOL where the borrowed asset itself appreciates — that appreciation is a real cost on the debt leg captured bydailyPrincipalYieldUsd).
interestEarnedAllTimeUsd is currently always 0 on this endpoint —
closed loans have interest_outstanding = 0 so a SUM-by-mint approach can't
recover the realized interest. Lender lifetime interest should be sourced
from /strategy/infos (which uses strategy.cumulative_interest_accrued).
Borrower lifetime interest is not currently computable; revisit by parsing
loan_events_v1.action_metadata for RepayPrincipal events if needed.
pnlUsd is computed as collateralUsd − principalUsd − interestAccruedUsd − Σ netInflowUsd where net inflow is the borrower's net dollar contribution
from account_balance_changes (cached event-time USD). Reflects realized +
unrealized PnL combined.
Show child attributes
Show child attributes
Per-loan items (each flattens the loan snapshot + USD/risk fields).
Show child attributes
Show child attributes
Pagination envelope shared across paginated listing endpoints
(/loans/info, /strategy/infos, /loop/info/v2, /lending_vaults/user/v2).
totalItems / totalPages are filter-scoped, not page-scoped.
Show child attributes
Show child attributes