Skip to main content
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.
1

Create a client

Create a Client with an RPC URL or a Solana Connection. The client exposes lending, liquidity, and vault modules.
2

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.
3

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.
4

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.
5

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)
6

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.
7

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.
8

Get exchange price and rewards

For custom calculations, read the current exchange price (shares ↔ assets) and rewards info for a given underlying mint.
9

Get rewards rate model config (optional)

Fetch the rewards rate model configuration (duration, start/end time, reward amount) for a lending token. Use when displaying reward campaign details.

SDK types

User position

Returned by getUserPosition and inside each item of getUserPositions:

Token (pool) details

Returned by getJlTokenDetails, getAllJlTokenDetails, and as jlTokenDetails in getUserPositions: Use 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.