Overview
Jupiter Lend provides multiple integration options:| Option | Description |
|---|---|
| REST API | HTTPS endpoints for data, positions, earnings, and unsigned transactions. Language-agnostic. |
Read SDK (@jup-ag/lend-read) | On-chain reads for Earn and Borrow. Lending tokens, token details, user positions, vaults, and vault positions. TypeScript only. |
Lend SDK (@jup-ag/lend) | Instruction builders for deposit, withdraw, mint, redeem, and transaction flows. TypeScript only. |
Core differences
| Capability | REST API | Read SDK | Lend SDK |
|---|---|---|---|
| Earn tokens and pool details | tokens endpoint | getAllJlTokens, getJlTokenDetails, getAllJlTokenDetails | - |
| Earn user positions | positions endpoint | getUserPosition, getUserPositions | - |
| Earnings data | earnings endpoint | - | - |
| Vault config and state | - | getAllVaults, getVaultByVaultId | - |
| Borrow user positions | Coming soon | getAllUserPositions, getPositionByVaultId | - |
| Earn transactions (deposit, withdraw, mint, redeem) | deposit, withdraw, mint, redeem or *-instructions | - | getDepositIxs, getWithdrawIxs, getMintIxs, getRedeemIxs |
| Borrow transactions | Coming soon | - | getInitPositionIx, getOperateIx, etc. |
| Language | Any (HTTP) | TypeScript/JavaScript | TypeScript/JavaScript |
Data and analytics
Earn tokens and positions
REST API: Fetch available tokens, positions, and earnings via HTTP. See the Earn API reference for endpoints (tokens, positions, earnings), and request formats.
Read SDK: Read tokens and positions directly from chain:
Vault and Borrow data
Read SDK: Vault and position reads:Borrow API endpoints (vaults, positions, transactions) are coming soon. Use the Read SDK for vault and position data today.
On-chain transactions
Earn deposit and withdraw
REST API: Request unsigned transactions or instructions for deposit, withdraw, mint, and redeem. See the Earn API reference fordeposit, withdraw, mint, redeem and deposit-instructions, withdraw-instructions, mint-instructions, redeem-instructions endpoints.
Lend SDK: Build instructions directly:
Borrow operations
Borrow API and SDK flows for create-position, deposit, borrow, repay, withdraw, and liquidate are documented in the Borrow operations pages. Borrow API endpoints are coming soon.Recommended usage
| Use case | Best option |
|---|---|
| Earn token list and pool details | API or Read SDK |
| Earn user positions | API or Read SDK |
| Earn earnings | API |
| Vault list and config | Read SDK |
| Borrow user positions | Read SDK |
| Earn transactions (deposit, withdraw, mint, redeem) | API or Lend SDK |
| Borrow transactions | Lend SDK |
| Non-JS backend | API |
| On-chain reads and tx building (no API) | Read SDK + Lend SDK |
Summary
Use the REST API for quick integration, earnings data, and unsigned transactions from any backend. Use the Read SDK for on-chain Earn and Borrow data (tokens, positions, vaults). Use the Lend SDK for transaction instruction building and full control over transaction flow.Relevant links
API reference (Earn)
Deposit, withdraw, mint, redeem, tokens, positions, earnings
Read SDK
On-chain Earn and Vault data
Lend SDK
Instruction builders for Earn and Borrow
Jupiter Lend Programs
Jupiter Lend on-chain programs
