Skip to main content

exolix-client

PyPI version License: ISC Python Version

Modern, fully typed Python client library for the Exolix instant cryptocurrency exchange API (v2).

Official API documentation: https://exolix.com/developers

The PyPI package is exolix-client. Import it as exolix.


Features

  • ⚡ Fixed & Floating Rates — Quote a swap by deposit amount or by desired withdrawal_amount, at a floating or fixed rate.
  • 🪙 Currencies & Networks — List coins, networks for one coin, and the full network catalog.
  • 🐍 Modern Pythonic Design — Type annotations, context manager support (with Exolix(...) as client:), and a custom exception.
  • 🔄 Transactions — Create a swap, fetch it by id, and list affiliate transaction history.

Installation

pip install exolix-client

Requires Python 3.10 or higher.


Authentication

Partner attribution is the affiliate API key. The default affiliate share is 0.3%. The client sends the key in one header and does not add a referral parameter:

from exolix import EXOLIX_API_KEY_HEADER

print(EXOLIX_API_KEY_HEADER)  # "Authorization"

Pass the key to the constructor. The client does not read EXOLIX_API_KEY from the environment. Public reads work without a key. Transaction history requires a key that Exolix has enabled for that route.


Quick Start (Safe Check)

The quick check only queries currencies and a rate. It does not create a transaction:

import os
from exolix import Exolix

with Exolix(api_key=os.environ["EXOLIX_API_KEY"]) as client:
    currencies = client.get_currencies(page=1, size=5, with_networks=True)
    print(f"Available currencies: {currencies['count']}")

    quote = client.get_rate(
        "BTC",
        "ETH",
        "float",
        network_from="BTC",
        network_to="ETH",
        amount="0.1",
    )
    print(f"0.1 BTC -> {quote['toAmount']} ETH (rate {quote['rate']})")

Usage Guide

1. Creating a Floating Rate Swap

from exolix import Exolix, ExolixError

with Exolix(api_key="your_api_key") as client:
    quote = client.get_rate(
        "ETH",
        "USDT",
        "float",
        network_from="ETH",
        network_to="ETH",
        amount="0.5",
    )
    print(f"Min {quote['minAmount']}, you receive {quote['toAmount']} USDT")

    tx = client.create_transaction(
        "ETH",
        "USDT",
        "ETH",
        "ETH",
        "0x0E29D1E501f90649Ad5982E900c455006e4522FC",
        amount=0.5,
        rate_type="float",
    )
    print(f"Send ETH to {tx['depositAddress']} ({tx['id']})")

create_transaction opens a real swap. Quote with get_rate first.

2. Fixed Rate by Withdrawal Amount

quote = client.get_rate(
    "ETH",
    "USDT",
    "fixed",
    network_from="ETH",
    network_to="ETH",
    withdrawal_amount="50",
)
print(f"Send {quote['fromAmount']} ETH to receive {quote['toAmount']} USDT")

3. Tracking Status and History

tx = client.get_transaction("ab93061434dd0s")
print(tx["status"])  # wait, confirmation, confirmed, exchanging, sending, success, ...

history = client.get_transactions(page=1, size=25, order="desc")
print(history["count"])

History is authenticated. Exolix enables it per API key.


API Reference

Exolix Class

Constructor

Exolix(
    api_key: str | None = None,
    base_url: str | None = None,
    timeout: float = 30.0,
    user_agent: str | None = None,
)
Option Type Default Description
api_key str unset Affiliate API key. Sent as Authorization.
base_url str "https://exolix.com/api/v2" API base URL.
timeout float 30.0 Request timeout in seconds.
user_agent str "exolix-client/0.1.0" User-Agent header.

Methods

  • get_currencies(...) — GET /currencies
  • get_currency_networks(code) — GET /currencies/{code}/networks
  • get_networks(...) — GET /currencies/networks
  • get_rate(...) — GET /rate (rate_type float or fixed, amount or withdrawal_amount)
  • create_transaction(...) — POST /transactions
  • get_transaction(transaction_id) — GET /transactions/{id}
  • get_transactions(...) — GET /transactions (authenticated history)

Error Handling

from exolix import Exolix, ExolixError

try:
    with Exolix(api_key="invalid_key") as client:
        client.get_transactions()
except ExolixError as error:
    print(f"{error.code}: {error.message} (HTTP {error.status_code})")

Live Tests

Unit tests mock HTTP and always run. The live suite calls the real API and runs only when EXOLIX_API_KEY is set. It is read-only: currencies, networks, a floating rate, a fixed rate, and transaction history. It never creates a transaction.

uv run pytest -m "not live"
EXOLIX_API_KEY=your_key uv run pytest -m live

License

ISC

Metadata

Release files for exolix-client 0.1.0

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

Source distribution (sdist)

Source distribution for exolix-client 0.1.0
File Size Uploaded Provenance Actions
exolix_client-0.1.0.tar.gz 22.9 kB Without provenance Details for exolix_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for exolix-client 0.1.0
File Interpreter ABI Platform Actions
exolix_client-0.1.0-py3-none-any.whl Python 3 none any Details for exolix_client-0.1.0-py3-none-any.whl

Total release size: 31.4 kB

Release files / exolix_client-0.1.0.tar.gz

Download URL exolix_client-0.1.0.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
17dc7f9362067d4e7c8472681ac3cd8d7cc28c118573a64535d036754756f4f3
BLAKE2b-256 checksum
How to use checksums
9d4794e86900e90394550b7365d6d84ba6dc0fead36052c00cb337805315afd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / exolix_client-0.1.0-py3-none-any.whl

Download URL exolix_client-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8aa83aafb3757fb3dab97ac7b2136c89e0846bf1f0d2aa6ab7c2ac99540db83
BLAKE2b-256 checksum
How to use checksums
38a2cf87d7d4190667a398257d4ff5ecd605e6333a45f4d2caa1e3c00c9c3b31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for exolix-client 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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