curl --request POST \
--url https://tars.loopscale.com/v1/markets/loans/info \
--header 'Content-Type: application/json' \
--data '
{
"loanAddresses": [
"<string>"
],
"lenders": [
"<string>"
],
"borrowers": [
"<string>"
],
"filterType": 123,
"principalMints": [
"<string>"
],
"orderFundingType": 123,
"page": 123,
"pageSize": 123,
"sortDirection": 123,
"sortType": 123,
"collateralMints": [
"<string>"
],
"excludeCollateralIdentifiers": [
"<string>"
],
"excludePrincipalMints": [
"<string>"
],
"assetTypes": 123
}
'[
{
"totalCount": 123,
"loanInfos": [
{
"loan": {
"id": 123,
"address": "<string>",
"bump": 123,
"loanStatus": 123,
"nonce": 123,
"borrower": "<string>",
"startTime": 123,
"closed": "<unknown>",
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
},
"loanType": 123,
"ledgers": [
{
"id": 123,
"ledgerIndex": 123,
"loan": "<string>",
"status": 123,
"strategy": "<string>",
"principalMint": "<string>",
"marketInformation": "<string>",
"apy": 123,
"principalDue": 123,
"principalRepaid": 123,
"interestPerSecond": 123,
"lastInterestUpdateTime": 123,
"interestOutstanding": 123,
"durationType": 123,
"duration": 123,
"startTime": 123,
"endTime": 123,
"weights": [
123
],
"ltvRatios": [
123
],
"lqtRatios": [
123
],
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
}
],
"pastLedgers": [
{
"id": 123,
"ledgerIndex": 123,
"loan": "<string>",
"status": 123,
"strategy": "<string>",
"principalMint": "<string>",
"marketInformation": "<string>",
"apy": 123,
"principalDue": 123,
"principalRepaid": 123,
"interestPerSecond": 123,
"lastInterestUpdateTime": 123,
"interestOutstanding": 123,
"durationType": 123,
"duration": 123,
"startTime": 123,
"endTime": 123,
"weights": [
123
],
"ltvRatios": [
123
],
"lqtRatios": [
123
],
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
}
],
"collateral": [
{
"id": 123,
"loan": "<string>",
"index": 123,
"assetType": 123,
"assetIdentifier": "<string>",
"assetMint": "<string>",
"amount": 123,
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
}
],
"events": [
{
"id": 123,
"loan": "<string>",
"assetIdentifier": "<string>",
"assetMint": "<string>",
"amount": 123,
"originalLender": "<string>",
"newLender": "<string>",
"action": 123,
"actionMetadata": {},
"eventTime": 123,
"usdPrice": 123,
"eventTxn": "<string>"
}
],
"matrixUpdates": [
{
"id": 123,
"loan": "<string>",
"ledgerIndex": 123,
"weights": [
123
],
"ltvRatios": [
123
],
"lqtRatios": [
123
],
"timestamp": 123,
"txnSignature": "<string>",
"writeVersion": 123
}
],
"collateralYield": [
{
"id": 123,
"collateralMint": "<string>",
"collateralApy": 123,
"collateralTimestamp": 123
}
]
}
]
}
]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 '
{
"loanAddresses": [
"<string>"
],
"lenders": [
"<string>"
],
"borrowers": [
"<string>"
],
"filterType": 123,
"principalMints": [
"<string>"
],
"orderFundingType": 123,
"page": 123,
"pageSize": 123,
"sortDirection": 123,
"sortType": 123,
"collateralMints": [
"<string>"
],
"excludeCollateralIdentifiers": [
"<string>"
],
"excludePrincipalMints": [
"<string>"
],
"assetTypes": 123
}
'[
{
"totalCount": 123,
"loanInfos": [
{
"loan": {
"id": 123,
"address": "<string>",
"bump": 123,
"loanStatus": 123,
"nonce": 123,
"borrower": "<string>",
"startTime": 123,
"closed": "<unknown>",
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
},
"loanType": 123,
"ledgers": [
{
"id": 123,
"ledgerIndex": 123,
"loan": "<string>",
"status": 123,
"strategy": "<string>",
"principalMint": "<string>",
"marketInformation": "<string>",
"apy": 123,
"principalDue": 123,
"principalRepaid": 123,
"interestPerSecond": 123,
"lastInterestUpdateTime": 123,
"interestOutstanding": 123,
"durationType": 123,
"duration": 123,
"startTime": 123,
"endTime": 123,
"weights": [
123
],
"ltvRatios": [
123
],
"lqtRatios": [
123
],
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
}
],
"pastLedgers": [
{
"id": 123,
"ledgerIndex": 123,
"loan": "<string>",
"status": 123,
"strategy": "<string>",
"principalMint": "<string>",
"marketInformation": "<string>",
"apy": 123,
"principalDue": 123,
"principalRepaid": 123,
"interestPerSecond": 123,
"lastInterestUpdateTime": 123,
"interestOutstanding": 123,
"durationType": 123,
"duration": 123,
"startTime": 123,
"endTime": 123,
"weights": [
123
],
"ltvRatios": [
123
],
"lqtRatios": [
123
],
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
}
],
"collateral": [
{
"id": 123,
"loan": "<string>",
"index": 123,
"assetType": 123,
"assetIdentifier": "<string>",
"assetMint": "<string>",
"amount": 123,
"lastInteractedTime": 123,
"lastInteractedTxn": "<string>",
"writeVersion": 123
}
],
"events": [
{
"id": 123,
"loan": "<string>",
"assetIdentifier": "<string>",
"assetMint": "<string>",
"amount": 123,
"originalLender": "<string>",
"newLender": "<string>",
"action": 123,
"actionMetadata": {},
"eventTime": 123,
"usdPrice": 123,
"eventTxn": "<string>"
}
],
"matrixUpdates": [
{
"id": 123,
"loan": "<string>",
"ledgerIndex": 123,
"weights": [
123
],
"ltvRatios": [
123
],
"lqtRatios": [
123
],
"timestamp": 123,
"txnSignature": "<string>",
"writeVersion": 123
}
],
"collateralYield": [
{
"id": 123,
"collateralMint": "<string>",
"collateralApy": 123,
"collateralTimestamp": 123
}
]
}
]
}
]Filter type enum (0 = Active, 1 = Closed, 2 = Refinance Eligible, 3 = Time Based Liquidation Eligible)
Funding type enum (0 = Term loan, 2 = Loop)
Pagination number
Pagination size, (max 1000)
Sort direction enum (0 = asc, 1 = desc)
Sort type enum (0 = Next Payment Due, 1 = End Time, 2 = Start Time, 3 = Principal Amount, 4 = Health)
List of collateral mints
List of collateral identifiers to hide
List of principal mints to hide
Enum for asset type to include (0 = Normal Token, 1 = Staked Solana, 2 = Orca CLMM, 3 = Raydium CLMM, 4 = Meteora DLMM)
List of loan data
Number of loans contained in query
Show child attributes
Show child attributes
Loopscale internal loan ID
Onchain PDA
Onchain bump for deriving the PDA efficiently
A loans current status enum (0 = Active, 3 = Locked)
Onchain iterator in the event multiple loans for the same borrower are started at the same timestamp
Public key of the wallet initializing the loan and with full authority over assets supplied.
The date at which the onchain
Toggle for whether or not the loan still exists onchain.
Timestamp of the last time the indexed loan state was picked up
Transaction the Loopscale indexer last picked up
Number write on the last interacted transaction this is (Used for indexing)
Loan type enum (0 = Term loan, 2 = Loop)
Current ledgers in use by the Loan
Show child attributes
Loopscale internal ledger ID
Each loan may have up to five ledgers, this is the fixed index in that array of ledgers
Parent loan of the ledger
Enum of ledger's status (0 = Uninitialized, 2 = Active, 3 = Liquidated)
Lender account that this ledger is borrowing from.
Mint of the token borrowed
Public key of the market information account defining the LTV, oracle, and liquidation ratio of the ledger
Active interest rate for the loan, recorded in cBPS (1/100th of a basis point), compounding annually.
Total principal originated, this number is only ever incremented. Defined in principal mint lamports.
Total principal repaid, this number is only ever incremented. Defined in principal mint lamports.
The amount of interest being accrued every second to the loan. Defined as (apy * (principal_due - principal_repaid) / SECONDS_PER_YEAR). Defined in principal mint lamports, 18 digits of precision.
Timestamp of the last time interest was cranked.
Amount of unpaid interest accrued since the previous crank. Defined in principal mint lamports. Total ledger outstanding balance can be computed as (principal_due - principal_repaid) + (interest_per_second * (current_time - last_interest_update_time)) + interest_outstanding.
Enum of the units the ledgers duration is denominated in (0 - Days, 1 - Weeks, 2 - Months, 3 - Minutes, 4 - Years)
Loan duration denominated in durationType
The timestamp at which this ledgers term starts
The timestamp at which this ledgers term ends
The portion of a loans collateral assigned to this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
The agreed upon max loan-to-value per collateral for to this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
The agreed upon liquidation ratio per collateral for this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
Timestamp of the last time the indexed ledger state was picked up
Transaction the Loopscale indexer last picked up
Number write on the last interacted transaction this is (Used for indexing)
Ledgers that may have been closed onchain, but an indexed copy remains.
Show child attributes
Loopscale internal ledger ID
Each loan may have up to five ledgers, this is the fixed index in that array of ledgers
Parent loan of the ledger
Enum of ledger's status (0 = Uninitialized, 2 = Active, 3 = Liquidated)
Lender account that this ledger is borrowing from.
Mint of the token borrowed
Public key of the market information account defining the LTV, oracle, and liquidation ratio of the ledger
Active interest rate for the loan, recorded in cBPS (1/100th of a basis point), compounding annually.
Total principal originated, this number is only ever incremented. Defined in principal mint lamports.
Total principal repaid, this number is only ever incremented. Defined in principal mint lamports.
The amount of interest being accrued every second to the loan. Defined as (apy * (principal_due - principal_repaid) / SECONDS_PER_YEAR). Defined in principal mint lamports, 18 digits of precision.
Timestamp of the last time interest was cranked.
Amount of unpaid interest accrued since the previous crank. Defined in principal mint lamports. Total ledger outstanding balance can be computed as (principal_due - principal_repaid) + (interest_per_second * (current_time - last_interest_update_time)) + interest_outstanding.
Enum of the units the ledgers duration is denominated in (0 - Days, 1 - Weeks, 2 - Months, 3 - Minutes, 4 - Years)
Loan duration denominated in durationType
The timestamp at which this ledgers term starts
The timestamp at which this ledgers term ends
The portion of a loans collateral assigned to this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
The agreed upon max loan-to-value per collateral for to this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
The agreed upon liquidation ratio per collateral for this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
Timestamp of the last time the indexed ledger state was picked up
Transaction the Loopscale indexer last picked up
Number write on the last interacted transaction this is (Used for indexing)
Show child attributes
Loopscale internal loan collateral ID
Loan this collateral is deposited to.
The index in the collateral array this asset is recorded in.
Enum of collateral asset's type (0 = Normal Token, 2 = Orca Whirlpool, 3 = Raydium CLMM, 4 = Meteora DLMM)
The onchain category for the asset. (Equivalent to assetMint for assetType = 0)
The specific asset mint supplied
The amount of this collateral asset supplied (in lamports)
Timestamp of the last time the indexed collateral state was picked up
Transaction the Loopscale indexer last picked up
Number write on the last interacted transaction this is (Used for indexing)
Show child attributes
Loopscale internal event ID
Loan this event is related to.
The onchain category for the asset. (Equivalent to assetMint for assetType = 0)
The specific asset mint supplied
Amount of the corresponding asset being transferred (lamports)
In the event of a ledger sale, this would be the lender selling the ledger
In the event of a ledger sale, this would be the lender receiving the ledger
Enum of the action this event represents (0 - Add Collateral, 1 - Remove Collateral, 2 - Borrow Principal, 3 - Repay Principal, 4 - Refinance Ledger, 5 - Sell Ledger, 6 - Liquidate
Optional object of additional data depending on action type
Timestamp of the last time the indexed collateral state was picked up
Price of the asset at the time of the event (optional)
Transaction the event was transmitted in
Show child attributes
Loopscale internal event ID
Loan this event is related to.
Index of the ledger this update applied to
The portion of a loans collateral assigned to this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
The agreed upon max loan-to-value per collateral for to this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
The agreed upon liquidation ratio per collateral for this ledger, length of 5. Denominated in cBPS (1/100th of a basis point).
Timestamp of the last time the indexed collateral state was picked up
Transaction the Loopscale indexer last picked up
Number write on the last interacted transaction this is (Used for indexing)