For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Suggested reading order

  1. Deposit liquidityWithdraw liquidityClaim LP rewards — the liquidity-provider lifecycle, on the official SDKs.

  2. Get pools info — pools, reserves, and positions, no signer required.

  3. 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.

  4. Executing swaps through specific pool — swapping against one known pool, without the path-finding API.

  5. Add fees to swap — monetizing your integration with provider fees.

Looking for concentrated liquidity? Position management examples live in the dedicated Concentrated liquidity section.

If you don't have a local execution environment, platforms like Replit work for testing — use a throwaway key holding minimal funds, never a real one.

Last updated