API and SDK Reference

The LoanDetails type represents the details of a NiftyApes loan object.

type LoanDetails = {
  buyerNftId: string;
  sellerNftId: string;
  remainingPrincipal: string;
  minimumPrincipalPerPeriod: string;
  periodInterestRateBps: number;
  periodDuration: number;
  periodEndTimestamp: number;
  periodBeginTimestamp: number;
};

These properties provide comprehensive details about the loan transaction, which can be used for various purposes such as tracking loan repayment progress, calculating interest, and determining the status of the loan.

buyerNftId

A string representing the unique identifier of the NFT (Non-Fungible Token) that is being used as collateral by the borrower in this loan transaction.

sellerNftId

A string representing the unique identifier of the NFT that is being sold by the lender in this loan transaction.

remainingPrincipal

A string representing the remaining principal amount of the loan that needs to be paid back by the borrower.

minimumPrincipalPerPeriod

A string representing the minimum amount of principal that needs to be paid back by the borrower in each loan period.

periodInterestRateBps

: A number representing the interest rate for each loan period, expressed in basis points (bps).

periodDuration

A number representing the duration of each loan period in seconds.

periodEndTimestamp

A number representing the Unix timestamp (in seconds) for the end of the current loan period.

periodBeginTimestamp

A number representing the Unix timestamp (in seconds) for the beginning of the current loan period.