Skip to main content

ravnexchange

Typed Python client for RAVN's public /api/v1: quote, execute, submit-signature, submit-transaction, status, tokens, chains. Zero runtime dependencies (built on urllib.request, not requests).

Same scope as the official TS client (@ravnexchange/sdk); for an agent that already speaks MCP, RAVN's MCP server (see the root README) covers this and more; this package is for a plain, non-agent Python backend that wants a typed wrapper instead of hand-rolling HTTP calls against the JSON API.

Install

pip install ravnexchange

Usage

from ravnexchange import RavnClient, RavnApiError

client = RavnClient(api_key="rvn_live_...")  # omit for the anonymous tier

try:
    quote = client.get_quote({
        "inputChainId": 1,
        "outputChainId": 8453,
        "inputToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
        "outputToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "inputAmount": "1000000000000000000",
        # Must be a real 0x-prefixed 40-hex-char address: a malformed one fails as NO_LIQUIDITY,
        # not a clear validation error.
        "userAddress": "0xYourWalletAddress",
        "destinationAddress": "0xYourWalletAddress",
    })
except RavnApiError as e:
    print(e.code, str(e))
else:
    execution = client.execute({"quoteToken": quote["quoteToken"]})
    # branch on execution["executionType"]: TRANSACTION / SIGNATURE / DEPOSIT

Pass "sandbox": True on get_quote to test the full quote → execute → status flow with no real funds; see the API's own docs for per-venue exceptions (THORChain BTC-source, Chainflip, and Houdini Swap can't be sandboxed).

Status

Published to PyPI via .github/workflows/publish-python-sdk.yml using trusted publishing (OIDC, no stored token), same model as this repo's npm packages, on a push to main that bumps pyproject.toml's version.

Metadata

Release files for ravnexchange 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ravnexchange 0.1.5
File Size Uploaded
ravnexchange-0.1.5.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ravnexchange 0.1.5
File Interpreter ABI Platform
ravnexchange-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / ravnexchange-0.1.5.tar.gz

Download URL ravnexchange-0.1.5.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
14adcb33c2c54c1dc46a98febfa4b8ee04544c15eccc5523aed5b87692c3dd88
BLAKE2b-256 checksum
How to use checksums
ae6406be8bedfb11a86d9dcf95a821467fb303b2919fcb71a5999076fc45b443
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / ravnexchange-0.1.5-py3-none-any.whl

Download URL ravnexchange-0.1.5-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49ea5a770fa37b9f3077cdf3a1f7670e057c1207e6b29db75f0729ff63e63a27
BLAKE2b-256 checksum
How to use checksums
7e03938dc07b5c6585c93085d501c8d99617f7fe6a2068d80e7770b077d57731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.6

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page