Skip to main content

Python SDK for the Aquarius protocol on Stellar

Project description

aquarius-sdk

The Python SDK for Aquarius — swaps, liquidity, and rewards on Stellar.

Status: interface preview (0.0.x). The swap surface works end-to-end — quote → execute, exact-input and exact-output, on mainnet and testnet. Pools, liquidity, and rewards are under development, and the API may change before 0.1. Follow the developer documentation for the stable integration path in the meantime.

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()          # testnet only: 10,000 test XLM
aqua.ensure_trustline(AQUA)

quote = aqua.quote(XLM, AQUA, amount_in=10_0000000)   # amount_out= for exact output
print(f"10 XLM -> {quote.amount_out / 1e7:,.2f} AQUA via {len(quote.route)} pool(s)")

receipt = quote.execute()
print(f"received {receipt.amount_out / 1e7:,.2f} AQUA in tx {receipt.tx_hash}")
  • Reads need no signer; writes take a Keypair. Raw secrets are never stored.
  • Slippage guards raise a typed SlippageError ("re-quote and retry"); missing routes raise NoRouteError.
  • Amounts are integer stroops (1 token = 10^7 stroops).

Questions and integration help: Discord.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aquarius_sdk-0.0.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aquarius_sdk-0.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file aquarius_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: aquarius_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aquarius_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 732bc6db3703a8e54952362825e2b0078df7777b1e0fab966a8c7ba8c1561269
MD5 f3abc384360e2f27e53989c22913a408
BLAKE2b-256 3539fc95d1c21425bb00a21c50861e0a708ee96f43930d732340b25ec0c39e5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aquarius_sdk-0.0.1.tar.gz:

Publisher: release-python.yml on AquariusDeFi/aquarius-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aquarius_sdk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aquarius_sdk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aquarius_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa01dcbb95afd17e2ad8388e5011d802b1ee5fc7810a0ae3fe5d826637c920aa
MD5 d249d71cbb27addc2c0ba79f0f913ff9
BLAKE2b-256 d9b4291197a862b236847425c57313aa74b722d918c62b24cc37e94b405f8a53

See more details on using hashes here.

Provenance

The following attestation bundles were made for aquarius_sdk-0.0.1-py3-none-any.whl:

Publisher: release-python.yml on AquariusDeFi/aquarius-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page