maxy-labs (Python)
The Maxy HTTP API from Python 3.10 or later, under the TypeScript client's resource names in snake_case. One dependency,
httpx. MIT licence (see LICENSE). It installs as maxy-labs and imports as maxy; the types are inline (py.typed).
pip install maxy-labs
export MAXY_API_KEY=$(curl -s -X POST https://openapi.maxy.co/v1/sandbox/keys | jq -r .secretKey)
from maxy import Maxy, MaxyError
maxy = Maxy() # reads MAXY_API_KEY
price = maxy.prices.get("USDC on base", "BTC", "20")
# USDC on Base is gasless: the wallet only signs, the solver opens the escrow.
quote = maxy.quotes.get("USDC on base", "BTC", "20", from_address=wallet, to_address="bc1q…")
if not quote.get("order"):
raise SystemExit(quote.get("message") or "This quote cannot become an order: see its issues.")
signatures = {p["id"]: your_signer.sign_typed_data(p["typedData"]) for p in quote["signing"]["payloads"]}
placed = maxy.orders.create(quote["order"], signatures=signatures, external_id="inv-42")
# An escrow route ("ETH on base") also sends placed["transaction"] from the wallet, then
# maxy.orders.submit(quote["order"], signatures, tx_hash=<its hash>): until then nothing moves.
for state in maxy.orders.watch(placed["orderId"]):
print(state["state"], state.get("btcTxId"))
Every route takes your key, apart from the few that need none (GET /, /openapi.json, /health, /ping, /config,
the status page's routes, POST /feedback, POST /security-reports, GET /checkout/verify and POST /sandbox/keys; GET /chains takes a key). A test key (mxk_test_…) runs everything in the sandbox.
| Resource | Methods |
|---|---|
prices |
get, stream |
pairs |
list, get, search_tokens |
chains |
list |
quotes |
get, batch, seconds_until_expiry |
orders |
create, submit_signature, submit, get, list, iterate, export_csv, cancel, events, stream, refund, deposit, claim, bridge, steps, follow, watch, resume |
status |
by_tx_hash, by_intent_hash, by_bitcoin_txid |
addresses |
validate |
limits, health, key, config, ping, openapi |
get |
webhooks |
verify, create, list, remove, test, events, replay |
sandbox_controls |
advance, scenarios, rates |
account |
get, usage |
keys |
create, rotate, revoke, set_origins |
limit_requests |
create, list |
statements |
get, download |
explorer |
lookup |
system |
status, history, incidents, maintenance, verified, subscribe, confirm, unsubscribe |
checkout |
verify |
feedback, security_reports |
send |
Not here, because a server has no use for them: the two stream tickets (POST /prices/stream-ticket and
POST /orders/{id}/stream-ticket, a browser's way to open a stream without sending its key) and the status feed
(GET /system/feed.xml, RSS). prices.stream and orders.stream send the key in a header.
AsyncMaxy is the same client, awaited; orders.watch, orders.iterate and the two streams are async iterators there.
Every failure is a MaxyError subclass with code, status, request_id, retryable, details and docs_url: the same names and
classes as TypeScript, from one table both clients are generated from. Reads, and calls carrying an idempotency key, retry
twice on 429, 502, 503, 504, a 409 idempotency_in_progress or a dropped connection, honouring Retry-After. When a 5xx
answer says retryable itself, that wins either way: retryable: false is raised at once, true retries even a 500. The
key goes only over https (http only to this machine), and no call or stream follows a redirect, whatever httpx.Client you pass.
orders.create, submit_signature and submit set their key from the order id (or transaction) and a hash of the
signatures, as the TypeScript client does: a retry is the same key, a corrected signature a new one.
Answers are plain dicts, each with its own .meta (request id, status, retries, latency, rate limit). Maxy(models=True)
gives pydantic models instead, generated from the OpenAPI document (maxy/models.py; pip install "maxy-labs[models]"):
a model reads by attribute or by the API's own field name (price.from_ or price["from"]), keeps fields a later API adds,
and keeps the API's null as None.
Maxy().units converts amounts as the API reads them: to_smallest("1.5", 6) is "1500000"; ASCII digits and
one dot only, at most the coin's decimals (more is invalid_input, never cut), never negative.
Flow helpers that need a browser wallet stay in TypeScript.
Release signing key (ed25519, namespace maxy-sdk): SHA256:TYUfXuFNZbCUxy2c0P3mWnJjZhpEurFU0ZkuSJgAxfo. It signs https://maxy.co/sdk/SHA256SUMS, which lists this wheel's SHA-256; how to check: https://maxy.co/docs/security-checks
Metadata
Release files for maxy-labs 1.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| maxy_labs-1.1.16.tar.gz | 52.0 kB | Without provenance | Details for maxy_labs-1.1.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| maxy_labs-1.1.16-py3-none-any.whl | Python 3 | none | any | Details for maxy_labs-1.1.16-py3-none-any.whl |
Total release size: 85.1 kB
Release files / maxy_labs-1.1.16.tar.gz
| Download URL | maxy_labs-1.1.16.tar.gz |
|---|---|
| Size | 52.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f123f81e7e9d41f9a701d0c6717aa0ca0e636bf876a39beb008aa108b9daea3
|
|
BLAKE2b-256 checksum How to use checksums |
375a94237391b8bdcf32355245380ea2a8a1c90f49fabbd4a006cc2e8b6171ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / maxy_labs-1.1.16-py3-none-any.whl
| Download URL | maxy_labs-1.1.16-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1973f7f5088d4b57199ba4c2f128123992bdf636602223f53718cac8e2526b1
|
|
BLAKE2b-256 checksum How to use checksums |
a451280eb242f526d174bf06064ef1c69d366ab4ef5056ca0782ae77fd9b0105
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for maxy-labs 1.1.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.