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"
    }
  ]
}
  • coupon is the coupon rate of the loan.
  • initalOwner is the wallet address of the initial owner of the loan.
  • lendTimestamp is the timestamp of the lend transaction.
  • lendTransactionHash is the transaction hash of the lend transaction.
  • maturityTimestamp is the timestamp of the maturity of the loan.
  • partnerFeeBPS is the partner fee in basis points (BPS).
  • partnerId is the partner ID of the loan.
  • principal is the principal amount of the loan.
  • status is the status of the loan (e.g. “Active”, “Claimed”).
  • tokenId is the token ID of the loan.