Quickstart
Execute your first Aquarius swap in about five minutes — on testnet, with the official SDK and nothing to configure.
1. Install the SDK
pip install aquarius-sdknpm install @aquariusdefi/sdk @stellar/stellar-sdk2. Run your first swap
from stellar_sdk import Keypair
from aquarius import AquariusClient, Asset, XLM
AQUA = Asset.classic("AQUA", "GAHPYWLK6YRN7CVYZOO4H3VDRZ7PVF5UJGLZCSPAEIKJE2XSWF5LAGER")
aqua = AquariusClient(network="testnet", signer=Keypair.random())
aqua.fund_with_friendbot()
aqua.ensure_trustline(AQUA)
quote = aqua.quote(XLM, AQUA, amount_in=100_000_000) # 10 XLM in stroops (1 XLM = 10^7 stroops)
print(f"Route found: expected output {quote.amount_out / 10**7} AQUA")
receipt = quote.execute()
print(f"Swap executed: received {receipt.amount_out / 10**7} AQUA")import { Keypair } from "@stellar/stellar-sdk";
import { AquariusClient, Asset, XLM } from "@aquariusdefi/sdk";
const AQUA = Asset.classic("AQUA", "GAHPYWLK6YRN7CVYZOO4H3VDRZ7PVF5UJGLZCSPAEIKJE2XSWF5LAGER");
const aqua = new AquariusClient({ network: "testnet", signer: Keypair.random() });
await aqua.fundWithFriendbot();
await aqua.ensureTrustline(AQUA);
const quote = await aqua.quote({ from: XLM, to: AQUA, amountIn: 100_000_000n }); // 10 XLM in stroops
console.log(`Route found: expected output ${Number(quote.amountOut) / 1e7} AQUA`);
const receipt = await quote.execute();
console.log(`Swap executed: received ${Number(receipt.amountOut) / 1e7} AQUA`);3. What the script did
Next steps
Last updated