> For the complete documentation index, see [llms.txt](https://docs-sdk.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-sdk.crypto-chief.com/processing/python.md).

# Python SDK

The official asyncio client for the [Crypto Chief](https://crypto-chief.com/processing/) crypto processing API. One install gives you fully typed access to payments, payouts, on-chain transactions, wallets, and webhooks across 25+ chains.

[![PyPI](https://img.shields.io/pypi/v/cryptochief-crypto-processing-python.svg)](https://pypi.org/project/cryptochief-crypto-processing-python/)

## Requirements

* Python **3.10+**
* A Crypto Chief **Merchant ID** and **API key** (Dashboard → Integration)

## Installation

```bash
pip install cryptochief-crypto-processing-python
```

```python
from cryptochief import CryptoChiefClient, Chain
```

The package is **async-first** (built on `httpx`) and **fully typed** — requests and responses are dataclasses, and the field names match the REST API exactly, so there is no camelCase translation layer to learn.

## Quickstart

```python
import asyncio
from cryptochief import CryptoChiefClient, Chain, EstimatePayoutRequest

async def main():
    async with CryptoChiefClient(
        merchant_id="MERCHANT_ID",
        api_key="API_KEY",
    ) as client:
        est = await client.payouts.estimate(EstimatePayoutRequest(
            network=Chain.ETH_SEPOLIA,
            coin="ETH",
            amount="0.0001",
            to_address="0xRecipient...",
        ))
        print("amount to receive:", est.amount_to_receive)

asyncio.run(main())
```

{% hint style="success" %}
If `estimate` resolves without raising, your credentials and request signing are working end-to-end.
{% endhint %}

## What you can do

| Domain                       | Service               | Key methods                                                           |
| ---------------------------- | --------------------- | --------------------------------------------------------------------- |
| Single & batch payouts       | `client.payouts`      | `estimate`, `execute`, `batch_execute`, `info`, `history`, `wait_for` |
| Sign / execute arbitrary txs | `client.transactions` | `sign`, `execute`, `sign_evm_call`, `jetton_transfer`                 |
| Accept payments              | `client.pay_ins`      | `create`, `select_asset`, `cancel`, `info`, `history`, `wait_for`     |
| Wallets + RSA decrypt        | `client.wallets`      | `generate`, `list`, `freeze`, `decrypt_private_key`                   |
| Treasury sweeps              | `client.sweeps`       | `force`, `history`                                                    |
| On-chain queries             | `client.blockchain`   | `contracts_available`, `wallet_balance`, `transaction_status`         |
| Fiat ↔ crypto rates          | `client.currencies`   | `fiat_to_crypto`, `crypto_to_fiat`                                    |

## Explore the guides

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🔑 Authentication</strong></td><td>Credentials, client setup, and request signing.</td><td><a href="/pages/CeJPZLO8HtJiHbPygcqE">/pages/CeJPZLO8HtJiHbPygcqE</a></td></tr><tr><td><strong>💸 Send a payout</strong></td><td>Estimate, execute idempotently, and confirm.</td><td><a href="/pages/rDd6XvT1xdKv3zdtDUoD">/pages/rDd6XvT1xdKv3zdtDUoD</a></td></tr><tr><td><strong>📥 Accept payments</strong></td><td>Create PayIn invoices and read deposits.</td><td><a href="/pages/erba6ck9Sz0sO6v5TtVR">/pages/erba6ck9Sz0sO6v5TtVR</a></td></tr><tr><td><strong>📡 Webhooks</strong></td><td>Verify signatures and handle typed events.</td><td><a href="/pages/OGAEtD4RrMLFC0tZHfIy">/pages/OGAEtD4RrMLFC0tZHfIy</a></td></tr><tr><td><strong>🧩 Contract calls</strong></td><td>EVM / TRON ABI calls with no hand-encoded calldata.</td><td><a href="/pages/Ptb0PoirWa5MZhXMsYvi">/pages/Ptb0PoirWa5MZhXMsYvi</a></td></tr><tr><td><strong>💎 TON transfers</strong></td><td>Jetton, NFT, and comment transfers in one call.</td><td><a href="/pages/GLPKxeltUk8z9Z01Czap">/pages/GLPKxeltUk8z9Z01Czap</a></td></tr></tbody></table>
