Code examples
Python and JavaScript code samples for interacting with Aquarius
All code examples are fully functional and provided in both Python and JavaScript, ready for you to copy and paste into your local environment.
New to Aquarius? The Quickstart runs a complete swap on testnet in five minutes before you dive into the details here.
Suggested reading order
Deposit liquidity → Withdraw liquidity → Claim LP rewards — the liquidity-provider lifecycle, on the official SDKs.
Get pools info — pools, reserves, and positions, no signer required.
Executing swaps through optimal path — the raw swap flow via the Find Path API and the router, step by step, for any language. Prerequisites & basics collects the constants and helpers it relies on.
Executing swaps through specific pool — swapping against one known pool, without the path-finding API.
Add fees to swap — monetizing your integration with provider fees.
Looking for concentrated liquidity? Position management examples live in the dedicated Concentrated liquidity section.
Last updated