All vault and position data here is read from on-chain accounts using the Jupiter Lend Read SDK. No API calls are required.
Exchange prices are in 1e12 decimals. Balances are in 1e9 decimals.
Reading vault data with the SDK
Use the Read SDK to list vaults, read vault config and state, and get user positions (collateral, debt, liquidation status). The SDK uses your RPC to read the Vault program accounts.Create a client
Create a
Client with an RPC URL or a Solana Connection. Use client.vault for all vault and position reads.Get all vaults
Fetch full data for every vault in one call: config, state, exchange prices, limits, and availability. Use
getAllVaults() for listing markets or building a vault selector.Get vault by ID
Fetch full vault data for a single vault: config, state, exchange prices, limits, and availability. Use
getVaultByVaultId(vaultId) when you know the vault ID.Get vault config
Fetch only the vault configuration: supply and borrow token mints, oracle, rebalancer, and risk parameters (collateral factor, liquidation threshold, fees).
Get vault state
Fetch the vault’s current state: total supply, total borrow, exchange prices, branch info, and next position ID.
Get all user positions
Get all positions owned by a user across all vaults. Returns
NftPosition & { vault: VaultEntireData } — each position includes full vault data. Use this for dashboards or portfolio views.Get position by vault and NFT id
Get a single position by vault ID and position (NFT) id. Returns
NftPosition & { vault: VaultEntireData } — position fields flattened with full vault data. Use getPositionByVaultId(vaultId, nftId) when you have both IDs.Get raw user position
Fetch the raw position account by
vaultId and positionId. Returns the on-chain account or null. Use when you need the low-level position without decoded state.Get current position state
From a raw position, get the computed state: collateral (colRaw), debt (debtRaw), dust, and whether the position is liquidated. Pass the result of
getUserPosition.Preview final position
Preview how a position would look after adding collateral or debt (without sending a transaction). Pass optional
newColAmount and newDebtAmount as BN; use zero for no change.Get all position IDs for a vault
Get the list of all position IDs (1 to totalPositions) for a vault. Use this with
batchGetUserPositions when you need to iterate over every position in a vault.Get all positions with risk ratio
For a vault, fetch all positions with a computed risk ratio (borrow/supply). Useful for dashboards or liquidation-risk views.
SDK types
NftPosition (with vault)
Returned bygetAllUserPositions and getPositionByVaultId as NftPosition & { vault: VaultEntireData }:
| Field | Type | Description |
|---|---|---|
nftId | number | Position / NFT id |
owner | PublicKey | Owner wallet |
isSupplyPosition | boolean | True if supply-only |
supply | BN | Collateral (with exchange price) |
beforeSupply | BN | Raw collateral before adjustment |
borrow | BN | Debt (with exchange price) |
beforeBorrow | BN | Raw debt before adjustment |
dustBorrow | BN | Dust borrow amount |
beforeDustBorrow | BN | Raw dust debt |
tick | number | Price tick |
tickId | number | Tick id |
isLiquidated | boolean | True if position is liquidated |
vault | VaultEntireData | Full vault data for this position |
User position (raw)
Returned bygetUserPosition:
| Field | Type | Description |
|---|---|---|
vaultId | number | Vault ID |
nftId | number | Position / NFT id |
positionMint | PublicKey | Position NFT mint address |
isSupplyOnlyPosition | number/boolean | 1 if supply-only, 0 if borrow position |
tick | number | Price tick |
supplyAmount | BN | Collateral (raw) |
dustDebtAmount | BN | Dust debt amount |
Vault config
Returned bygetVaultConfig and inside getVaultByVaultId:
| Field | Type | Description |
|---|---|---|
vaultId | number | Vault ID |
supplyToken | PublicKey | Supply (collateral) mint |
borrowToken | PublicKey | Borrow token mint |
oracle | PublicKey | Oracle account |
collateralFactor | number | Collateral factor |
liquidationThreshold | number | Liquidation threshold |
liquidationPenalty | number | Liquidation penalty |
borrowFee | number | Borrow fee |
Vault state
Returned bygetVaultState and inside vault data:
| Field | Type | Description |
|---|---|---|
totalSupply | BN | Total supply in vault |
totalBorrow | BN | Total borrow in vault |
totalPositions | number | Number of positions |
nextPositionId | number | Next position id |
