Skip to main content
Borrow assets from a Jupiter Lend vault against your deposited collateral. The SDK builds operate instructions with zero collateral change and a positive debt amount. Transactions use versioned (v0) format with address lookup tables.

Borrow

1

Import Dependencies

Import the required packages for Solana RPC, Jupiter Lend borrow SDK, and versioned transaction building.
Borrow uses getOperateIx with zero colAmount and positive debtAmount. The borrowed asset is sent to your wallet.
2

Load Keypair and Initialise Connection

Load the signer and create the RPC connection. Set vault ID, position ID, and borrow amount.
You must have an existing position with deposited collateral. Your borrow capacity depends on collateral value and the vault’s LTV limits.
3

Build Borrow Instructions

Build operate instructions with no collateral change and positive debt amount.
Borrow is operate with colAmount = 0 and debtAmount > 0. The borrow token is sent to your wallet; you accrue interest until you Repay.
4

Build and Sign Transaction

Build a v0 message with the instructions and address lookup tables, then sign.
5

Send and Confirm Transaction

Send the transaction and confirm.
Borrowing increases your debt and LTV. Repay with the Repay flow to reduce debt and improve position health.

Operate parameters

getOperateIx accepts the following parameters: For borrow: colAmount = 0, debtAmount > 0.
Your maximum borrow depends on your collateral value, the vault’s loan-to-value (LTV) limits, and current borrows. Keep LTV below the liquidation threshold, which you can read from the vault config. The SDK does not provide a “max borrow” sentinel. Compute the maximum from your position (e.g. getCurrentPosition or getFinalPosition) and the vault’s LTV, or use your app/API for the limit.
Borrowed amounts accrue interest over time. Repay to reduce debt and stop interest on the repaid portion.

Full code example