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 raiseNoRouteError. - Amounts are integer stroops (1 token = 10^7 stroops).
Questions and integration help: Discord.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
732bc6db3703a8e54952362825e2b0078df7777b1e0fab966a8c7ba8c1561269
|
|
| MD5 |
f3abc384360e2f27e53989c22913a408
|
|
| BLAKE2b-256 |
3539fc95d1c21425bb00a21c50861e0a708ee96f43930d732340b25ec0c39e5d
|
Provenance
The following attestation bundles were made for aquarius_sdk-0.0.1.tar.gz:
Publisher:
release-python.yml on AquariusDeFi/aquarius-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aquarius_sdk-0.0.1.tar.gz -
Subject digest:
732bc6db3703a8e54952362825e2b0078df7777b1e0fab966a8c7ba8c1561269 - Sigstore transparency entry: 2159264933
- Sigstore integration time:
-
Permalink:
AquariusDeFi/aquarius-sdk@8536156460a4fb958985aa3ac7d796f24f345f57 -
Branch / Tag:
refs/tags/py-v0.0.1 - Owner: https://github.com/AquariusDeFi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@8536156460a4fb958985aa3ac7d796f24f345f57 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa01dcbb95afd17e2ad8388e5011d802b1ee5fc7810a0ae3fe5d826637c920aa
|
|
| MD5 |
d249d71cbb27addc2c0ba79f0f913ff9
|
|
| BLAKE2b-256 |
d9b4291197a862b236847425c57313aa74b722d918c62b24cc37e94b405f8a53
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aquarius_sdk-0.0.1-py3-none-any.whl -
Subject digest:
aa01dcbb95afd17e2ad8388e5011d802b1ee5fc7810a0ae3fe5d826637c920aa - Sigstore transparency entry: 2159265018
- Sigstore integration time:
-
Permalink:
AquariusDeFi/aquarius-sdk@8536156460a4fb958985aa3ac7d796f24f345f57 -
Branch / Tag:
refs/tags/py-v0.0.1 - Owner: https://github.com/AquariusDeFi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@8536156460a4fb958985aa3ac7d796f24f345f57 -
Trigger Event:
push
-
Statement type: