All position and pool data here is read from on-chain accounts using the Jupiter Lend Read SDK. No API calls are required.
Reading Earn data with the SDK
Use the Read SDK to list supported tokens, fetch pool details (supply rate, rewards, totals), and get a user’s position (shares, underlying assets, wallet balance). The SDK uses your RPC to read program accounts.Create a client
Create a
Client with an RPC URL or a Solana Connection. The client exposes lending, liquidity, and vault modules.Get all supported lending tokens
Get the list of all underlying token mints for Earn. Use these when you need to iterate over every market.
jlTokens (Jupiter Lend tokens) are receipt tokens you receive when you deposit into Earn. Each underlying asset (e.g. USDC) has a corresponding jlToken representing your share of the pool. Balances accrue interest and rewards; you burn them on withdraw to receive the underlying asset back.
Get lending token (pool) details
Fetch full pool-level data for one underlying mint: totals, supply rate, rewards rate, conversion rates, and decimals. Pass the underlying token mint (e.g. USDC), not the jlToken mint.
Rates:
supplyRate and rewardsRate are scaled by the SDK’s internal precision (e.g. 1e12). Use the same scaling when displaying APY or comparing with other sources.Get all token details at once
Fetch full pool details for every supported lending token. Use
getAllJlTokenDetails() when building a market list or token selector.Get user position for one asset
Get a user’s Earn position for a single underlying asset: jlToken shares, equivalent underlying amount, and wallet balance of the underlying token.
- jlTokenShares: User’s share balance in the pool
- underlyingAssets: Value of those shares in underlying token units
- underlyingBalance: User’s wallet balance of the underlying token (not deposited)
Get all user positions across tokens
Get the user’s positions for every supported lending token in one call. Each item includes pool details and the user’s position for that token.
Preview deposit and withdraw amounts
Before depositing or withdrawing, preview how many shares you get for a given asset amount (deposit/mint) or how many assets you get for a given share amount (redeem/withdraw). Pass amounts as
BN.Get exchange price and rewards
For custom calculations, read the current exchange price (shares ↔ assets) and rewards info for a given underlying mint.
SDK types
User position
Returned bygetUserPosition and inside each item of getUserPositions:
| Field | Type | Description |
|---|---|---|
jlTokenShares | BN | User’s share balance in the pool |
underlyingAssets | BN | Equivalent underlying token amount for those shares |
underlyingBalance | BN | User’s wallet balance of the underlying token |
allowance | BN | Reserved (currently 0) |
Token (pool) details
Returned bygetJlTokenDetails, getAllJlTokenDetails, and as jlTokenDetails in getUserPositions:
| Field | Type | Description |
|---|---|---|
tokenAddress | PublicKey | jlToken mint address |
underlyingAddress | PublicKey | Underlying asset mint |
decimals | number | Token decimals |
totalAssets | BN | Total underlying assets in the pool |
totalSupply | BN | Total jlToken supply |
supplyRate | BN | Supply rate (scaled) |
rewardsRate | BN | Rewards rate (scaled) |
conversionRateToShares | BN | Multiplier: assets → shares |
conversionRateToAssets | BN | Multiplier: shares → assets |
conversionRateToAssets with the SDK’s precision (e.g. 1e12) when converting user shares to a displayable underlying amount if you are not using underlyingAssets from getUserPosition.
Additional resources
NPM: @jup-ag/lend-read
Install the Read SDK for on-chain Earn data.
Internal SDK reference
See your internal Jupiter Lend Read SDK reference for full type definitions and advanced usage.
