Skip to main content

Borrow & Lend

Borrow and lend assets

Get Market Information

Retrieve market-wide TVL metrics for deposits and borrows.
View Code

Get Reserve Supply and Borrow APY

Fetch historical supply APY and borrow APY data for a specific reserve over time.
View Code

Get Reserve Information

Check detailed metrics for all reserves including supply APY, borrow APY, deposit TVL, borrow TVL, and utilization rates.
A token can have several reserves: one variable-rate reserve plus fixed-rate ones, so each row shows its kind. Fixed-rate APYs depend on the slot duration passed to KaminoMarket.load. A hard-coded value such as 400 ms shows them at about half their real rate, because mainnet slots are closer to 210 ms.
View Code

Get Reserve Reward History

Fetches historical KLend reward metrics for a specific deposit and borrow reserve pair.
This endpoint returns KMNO reward incentives for specific deposit and borrow reserve combinations.
The endpoint only returns rows for windows when the pair had KMNO incentives. Other windows return an empty array.
View Code

Get User Obligation Info

Retrieve detailed obligation information including deposits, borrows, and health metrics.
View Code

Get All User Obligations

Retrieve all obligations for a user wallet, including different obligation types across the market.
View Code

Get All Obligations by Reserve

Retrieve all obligations that have deposits in a specific reserve. Useful for analyzing reserve utilization and user exposure.
This reads every obligation in the market. Public RPC endpoints reject it, so use a private RPC.
View Code

Get User Transaction History

Access all transaction history for a user’s wallet across deposits, borrows, repayments, and liquidations.
Results are grouped by obligation address. A market where the wallet has no obligation returns an empty object.
View Code