LP Quick Start
Create a vault and offer in 3 API calls.
Prerequisites
- A Privy embedded wallet with delegation enabled
- An LP API key (generate via the dashboard)
Step 1: Create a Vault
curl -X POST https://api.lavarage.xyz/api/v1/lp/tx/create-vault \
-H "x-lp-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"mintAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "liquidationLtv": 9000}'
# Returns: { "signature": "5KtP..." }Step 2: Deposit Funds
curl -X POST https://api.lavarage.xyz/api/v1/lp/tx/deposit \
-H "x-lp-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"mintAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "1000000000"}'Step 3: Create an Offer
curl -X POST https://api.lavarage.xyz/api/v1/lp/tx/create-offer \
-H "x-lp-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"mintAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "collateralMintAddress": "So11111111111111111111111111111111111111112", "interestRate": 50, "feedId": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d", "maxExposure": "500000000", "openLtv": 5000}'All endpoints return { "signature": "..." } — the transaction is signed and submitted server-side.
Updated 4 days ago