Loan Transactions (fetchLendTransactions)
This method fetches all lend transactions for a given wallet address.
import { SupportedChainIds } from "@parabolfi/core";
import { ParabolServer } from "@parabolfi/server";
const parabolServer = new ParabolServer({
apiKey: process.env.PARABOL_API_KEY,
});
const chain = SupportedChainIds.ZKSYNC;
const walletAddress = "0x...";
const loans = await parabolServer.fetchLendTransactions(walletAddress, [chain]);ℹ️
If more than one chain is provided, the API will return all positions for all specified chains.
Response
{
"324": [
{
"coupon": "369",
"initalOwner": "0x4ea830109b8df82d4e05f1fa7780b27f8f6dc7d7",
"lendTimestamp": "1732498813",
"lendTransactionHash": "0xaf4bd75e87aec308d1c188da1ee74ee1410f131c420e4b9ce97a3b581e2a2cd3",
"maturityTimestamp": "1732856400",
"partnerFeeBPS": "0",
"partnerId": "0x0000000000000000000000000000000000000000000000000000000000000000",
"principal": "1200000000000000000000",
"status": "Active",
"tokenId": "46"
}
]
}couponis the coupon rate of the loan.initalOwneris the wallet address of the initial owner of the loan.lendTimestampis the timestamp of the lend transaction.lendTransactionHashis the transaction hash of the lend transaction.maturityTimestampis the timestamp of the maturity of the loan.partnerFeeBPSis the partner fee in basis points (BPS).partnerIdis the partner ID of the loan.principalis the principal amount of the loan.statusis the status of the loan (e.g. “Active”, “Claimed”).tokenIdis the token ID of the loan.