Markets API Rewards
Understanding APY Structure
The Markets API provides three types of APY data for each market:Base APY (Natural Protocol Yields)
This is the APY you’ll always get. It’s excluding the rewards.baseDepositApy- Interest earned from borrowers paying to use your deposited assetsbaseBorrowApy- Interest rate you pay to borrow assets from the protocol
Rewards (Extra Incentives)
This is the APY that comes on top of the base APY for doing a specific actions on the platform. These are funded by protocols/partners to drive specific behaviors.rewardsarray - Additional token incentives on top of base yields
Total APY (What You Actually Earn)
This is the APY including rewards.depositApy=baseDepositApy+ sum of all deposit reward APYsborrowApy=baseBorrowApy- sum of all borrow reward APYs (rewards reduce cost for borrowers)
Example: Real Market Analysis
Let’s walk through actual market data from Kamino to understand how rewards work:Deposit Rewards
Deposit rewards increase the yield of depositing an asset. You can earn either a single reward token or multiple tokens from one deposit action.Single Token Reward
This example shows a market with a single token reward for depositing USDC, in this case ADX tokens.- Depositors earn: 3.2% base + 7.21% ADX rewards = 10.41% total
- Borrowers pay: 13.63% (no rewards to reduce cost)
- Action needed: Deposit USDC to get ADX rewards
Multiple Token Rewards
Some markets offer multiple reward tokens for a single deposit action. Here’s a real example where depositing USDS earns both HUMA and USDS rewards:- Depositors earn: 0.79% base + 5.53% HUMA + 5.4% USDS = 11.71% total
- Borrowers pay: 1.99% (no rewards)
- Action needed: Just deposit USDS once to earn both HUMA and USDS rewards
- Calculation:
depositApy(11.71%) =baseDepositApy(0.79%) + HUMA APY (5.53%) + USDS APY (5.4%)
Multiple token rewards are also possible for borrow rewards. The same rules
apply as for deposit rewards.
Borrow Rewards
Borrow rewards reduce the cost of borrowing an asset.- Depositors earn: 7.39% (just the base staking yield, no extra rewards)
- Borrowers earn: 9.18% borrow cost - 5.98% JTO rewards = 3.2% net cost
- Action needed: Borrow jitoSOL to get JTO rewards
Markets with Both Deposit and Borrow Rewards
Some markets incentivize both sides: depositors AND borrowers in the same market. Here’s a real SOL market example:- Depositors earn: 5.96% base + 0.98% BLZE = 6.95% total
- Borrowers pay: 6.96% base - 0.31% BLZE = 6.65% net cost
- Both sides win: Depositors get higher yields, borrowers get lower costs
- Same reward token: Both depositors and borrowers earn BLZE tokens
Reading Reward Data
| Field | What it tells you |
|---|---|
type | Reward type: either "deposit" or "borrow" |
apy | Annual percentage yield for this reward token |
token | Token details: address, symbol, decimals, icon |
marketAction | Your action in the market to earn this reward: mostly matches type |
Claiming Rewards
Most protocols allow you to claim accumulated rewards at any time. Look for theclaimRewards action in the market data:
Positions API Rewards
The Positions API shows you the rewards you have already earned in your positions. Unlike the Markets API, which provides static information about available reward opportunities, the Positions API is wallet-specific, which means that you provide your wallet address and get back your actual accrued rewards.What the Positions API Shows
When you query the Positions API with your wallet address, you get:- Your actual accrued rewards - The real amounts of reward tokens you’ve earned. Even if you’ve withdrawn from a position, your rewards remain visible
- Nested market data - Current market information (including the reward rules from the Markets API) for convenience, so you don’t need a separate API call
- Open positions - The open positions you have in the market incl. market data, etc.
The “reward” Position Type (recommended)
When calling our Positions API, you will receive active positions, e.g. positions with the typeyield or lending and positions with the type reward that reflects the rewards you have earned from those positions.
The reward position type is an atomic tracking system that ensures your rewards are always visible, even after the main position was closed, which is why it’s recommended to use this type over the deprecated rewards array.
The Problem with the rewards array:
- The
rewardsarray is part of active positions - When you close a position (withdraw everything), the position amount becomes 0 and it no longer appears in the positions array
- But you might still have unclaimed rewards from that position (for example, Kamino season rewards that aren’t available to claim yet)
- Without the position in the array, those rewards would disappear from your view
reward position type:
The reward position type ensures that each reward is tracked separately, bringing you the following benefits:
- Your rewards are always visible, even after the main position is closed
- You never lose track of rewards you’re entitled to claim
- The system maintains a clear record of all your reward entitlements
- Nested data structure allows you to easily access the parent position and the reward token details
Example Reward Position
Here’s a complete reward position example for a Kamino Allez USDC yield position. Please note that we might add more fields to the reward position in the future, so please check the API Reference for the latest details.Reward Position Example Kamino Lend
| Field | Description |
|---|---|
id | Unique identifier for the reward position containing of the protocol, product, identifier, reward token, and reward provenance |
type | Always "reward" for reward positions |
token | The reward token you’ve earned (e.g., KMNO, JTO, HUMA, FAF) |
amount | Quantity of reward tokens accrued |
amountUsd | USD value of your rewards (optional) |
marketId | Which market generated this reward |
position | Reference to the parent position (type and id) that generated this reward |
market | Full nested market data including current APYs, available rewards, and claim actions |
Accessing Reward Positions
To work with reward positions in your code, filter the positions array by type:Linking to Parent Positions
Each reward position includes aposition field that references the parent position that generated it:
Nested Market Data
For your convenience, each position in the Positions API includes the current market data. This means you can display everything you need without making a separate call to the Markets API. The nestedmarket object includes:
- Current APY rates (
depositApy,borrowApy,baseDepositApy,baseBorrowApy) - Available rewards (the Markets API
rewardsarray with APY and token info) - Market details (token info, provider, website URL)
- Market actions (deposit, withdraw, borrow, repay Blink URLs)
The rewards Array (deprecated)
The old way of tracking rewards was through a rewards array within the lending and yield type positions:
Reward Position Example Kamino Lend
rewards array has a critical limitation: when you close a position (withdraw all funds), the position disappears from the array, and so do your unclaimed rewards. This is problematic because:
- Some protocols have delayed reward claiming (e.g., seasonal rewards)
- You could lose track of rewards you’re entitled to claim
- No way to see historical rewards from closed positions
rewards array, use the new reward position type which solves these problems:
| Aspect | Deprecated rewards Array | New reward Position Type |
|---|---|---|
| Availability | Only on active positions | Always visible, even after position closes |
| Token details | Just tokenAddress | Full token object (symbol, icon, decimals) |
| Market reference | No direct link | Includes marketId and full nested market data |
| Claim action | Must find separately | Included in nested market.actions.claimRewards |
| Parent position | Implicit (part of position) | Explicit position field linking to parent |