Deposit liquidity
Provide liquidity to an Aquarius pool with the official SDK — discover the pool, deposit with a simulation-derived guard, and read the minted shares.
1. Set up the client
from stellar_sdk import Keypair
from aquarius import AquariusClient, Asset, XLM
AQUA = Asset.classic("AQUA", "GBNZILSTVQZ4R7IKQDGHYGY2QXL5QOFJYQMXPKWRRM5PAV7Y4M67AQUA")
aqua = AquariusClient(network="mainnet", signer=Keypair.from_secret("S..."))import { Keypair } from "@stellar/stellar-sdk";
import { AquariusClient, Asset, XLM } from "@aquariusdefi/sdk";
const AQUA = Asset.classic("AQUA", "GBNZILSTVQZ4R7IKQDGHYGY2QXL5QOFJYQMXPKWRRM5PAV7Y4M67AQUA");
const aqua = new AquariusClient({ network: "mainnet", signer: Keypair.fromSecret("S...") });2. Find the pool
pools = aqua.pools_for_pair(XLM, AQUA)
# [Pool(type='volatile', fee_bps=10, ...), Pool(type='volatile', fee_bps=30, ...), ...]
pool = next(p for p in pools if p.type == "volatile" and p.fee_bps == 30)const pools = await aqua.pools.forPair(XLM, AQUA);
// [Pool { type: 'volatile', feeBps: 10, ... }, Pool { type: 'volatile', feeBps: 30, ... }, ...]
const pool = pools.find(p => p.type === "volatile" && p.feeBps === 30);3. Deposit
Next steps
Last updated