Lending markets allow users to deposit assets and earn interest or borrow against them. Unlike yield markets where returns come from DeFi strategies, lending markets generate returns through borrower interest payments and optional protocol rewards.
Our Markets API already contains lots of information that you would manually collect via multiple API calls throughout protocols and providers, such as:
- basic protocol information (one call contains multiple protocols),
- deposit and borrow APY information,
- token information,
- protocol rewards,
- LTV and liquidation parameters,
- actions (deposit, withdraw, borrow, repay), etc.
Supported Protocols
Our Markets API provides unified access to lending markets across multiple protocols: If you want more information on the protocols that are supported, please refer to the Supported Protocols Section page.Lending vs Yield
Lending markets differ from yield markets in how they generate returns and what functionality they offer. Below is a comparison of the two:Data Structure
Below is an example of a lending market response from the Markets API. Based on customer demand, we may add more fields to the response in the future. For the latest data structure, please have a look at our Markets API Reference page.Please note that we do our best to design our APIs to be non-breaking. It is
recommended to filter the response and only include the fields / types you
need to ensure it won’t break your application if new fields are added over
time.
Lending Markets Data Structure
Practical Example
In order to better understand how the API works, let’s walk through an example response for the Kamino USDS Main Market below:API Response for Kamino USDS Main Market
Understanding the Response
What you can see here is the original response from the API. As mentioned in the introduction section, this response is powerful enough to drive full-fledged dashboards and applications. Let’s break it down into its components:-
Market Identity:
id: Unique identifier combining protocol and reserve addresstype: Market category (alwayslendingfor lending markets)provider: Protocol information for branding in your UItoken: Full token information including address, symbol, decimals and iconwebsiteUrl: Direct link to the market on the protocol’s website
-
Deposit APY Breakdown:
depositApy(5.46%) — Total combined deposit yield including rewardsbaseDepositApy(1.38%) — Core yield from borrower interestbaseDepositApy30d(1.16%) — Historical 30-day averagebaseDepositApy90d(1.95%) — Historical 90-day averagebaseDepositApy180d(2.65%) — Historical 180-day averagerewardsarray (4.09% USDS) — Additional incentive tokens for depositors
-
Borrow APY Breakdown:
borrowApy(4.48%) — Total cost to borrow (can be reduced by rewards)baseBorrowApy(4.48%) — Base borrowing costbaseBorrowApy30d(4.57%) — Historical 30-day averagebaseBorrowApy90d(5.17%) — Historical 90-day averagebaseBorrowApy180d(5.96%) — Historical 180-day average
-
Market Metrics:
totalDeposit/totalDepositUsd: This market holds $22.4M USDS in depositstotalBorrow/totalBorrowUsd: $8.7M USDS currently borrowedmaxDeposit: Maximum deposit cap (150M)maxBorrow: Maximum borrow cap (140M)
totalDepositUsdandtotalBorrowUsdare USD values, the rest are native token units. -
Risk Parameters:
maxLtv(80%) — Maximum loan-to-value ratio for borrowingliquidationLtv(90%) — LTV threshold that triggers liquidationliquidationPenalty— Penalty applied during liquidation (when available)
-
Actions: The
actionsobject contains Blink URLs fordeposit,withdraw,borrow,repay, and optionallyrepayWithCollateralandclaimRewardsdepending on the protocol. -
Additional Data: The
additionalDataobject contains protocol-specific metadata. In this example, we have the following additional data for the Kamino USDS Main Market:marketAddress: The address of the lending marketreserveAddress: The address of the reservemarketName: The name of the market
Protocol-Specific Additional Data
TheadditionalData field varies by provider. In our example, we have the following additional data for Kamino Lend:
Kamino Borrow
groupAddress in the additional data:
MarginFi
borrowToken field at the root level when the borrowed token differs from the collateral token:
Jupiter Borrow (with borrowToken)
additionalData field will continue to grow and be more powerful. If you need more information or want to check out what protocols are supported, please refer to the Supported Protocols page.