CryptoQuant Python SDK
Unofficial Python SDK for the CryptoQuant API — unified access to on-chain and market data for Bitcoin, Ethereum, Stablecoins, ERC-20 tokens, XRP, TRX, and Altcoins.
Installation
pip install cryptoquant
Quick Start
from cryptoquant import CryptoQuant
client = CryptoQuant(api_key="your_api_key")
# Stablecoin exchange flows
data = client.get_stable_exch_inflow(
token="usdc",
exchange="all_exchange",
window="day",
limit=30,
)
Error Handling
from cryptoquant import (
CryptoQuant,
CryptoQuantHTTPError,
CryptoQuantTimeoutError,
CryptoQuantConnectionError,
)
try:
data = client.get_stable_exch_inflow(token="usdc", exchange="binance", window="hour")
except CryptoQuantHTTPError as e:
print(f"API error {e.status_code}: {e}")
except CryptoQuantTimeoutError:
print("Request timed out")
except CryptoQuantConnectionError:
print("Network error")
Supported Assets
| Asset | Module | Categories |
|---|---|---|
| Bitcoin | Bitcoin |
Exchange flows, miner flows, network/market indicators, mempool, Lightning |
| Ethereum | Ethereum |
Exchange flows, ETH 2.0, fund data, market/network data |
| Stablecoins | StableCoins |
Exchange flows, flow indicators, market data, network data |
| ERC-20 | Erc20 |
Exchange flows, flow indicators, market/network data |
| XRP | XRP |
Entity flows, DEX/AMM data, market/network data |
| TRX | TRX |
Market data, network data, DeFi |
| Altcoins | AltCoins |
Market data (OHLCV) |
Time Windows
CryptoQuant supports four time windows. Each endpoint supports a subset:
| Window | Description | from_/to_ format |
|---|---|---|
day |
Daily aggregation | YYYYMMDD or YYYYMMDDTHHMMSS |
hour |
Hourly aggregation | YYYYMMDDTHHMMSS |
min |
Per-minute (market data only) | YYYYMMDDTHHMMSS |
block |
Per-block (on-chain data) | YYYYMMDDTHHMMSS or block height integer |
API Versions
The SDK transparently routes requests to the correct API version:
- Endpoints starting with
v2/→https://api.cryptoquant.com/v2/ - All other endpoints →
https://api.cryptoquant.com/v1/
No configuration needed.
Advanced Usage
Custom timeout
client = CryptoQuant(api_key="...", default_timeout=60.0)
Incremental fetch with from_/to_
data = client.get_stable_exch_inflow(
token="usdt_eth",
exchange="binance",
window="hour",
from_="20240101T000000",
to_="20240101T235959",
)
CSV output
csv_data = client.get_stable_exch_reserve(
token="usdc",
exchange="all_exchange",
window="day",
format_="csv",
)
Development
git clone https://github.com/LautaroParada/cryptoquant.git
cd cryptoquant
pip install -e ".[dev]"
pytest tests/ -v
License
MIT
Metadata
Release files for cryptoquant 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cryptoquant-0.2.0.tar.gz | 58.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cryptoquant-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.9 kB
Release files / cryptoquant-0.2.0.tar.gz
| Download URL | cryptoquant-0.2.0.tar.gz |
|---|---|
| Size | 58.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3038cecda44afb3bd87a847fcd8a89dcc81d6d67d5dba3863af166b89dae786
|
|
BLAKE2b-256 checksum How to use checksums |
b568e6c858750270f8728dfef8d8a7443774edf749cf517fd28af8d84210d79f
|
| 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 Aug 27, 2026.
Transparency logRelease files / cryptoquant-0.2.0-py3-none-any.whl
| Download URL | cryptoquant-0.2.0-py3-none-any.whl |
|---|---|
| Size | 57.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f3b1b9eda4b46bb9efbfe120cc1e700b6961d72002e80c7f6d0ba4d860b7f74
|
|
BLAKE2b-256 checksum How to use checksums |
43c16f781e6bacb8bee4e34ff2db22ae9201107b783136b9802823ff317eb6d7
|
| 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 Aug 27, 2026.
Transparency log