Skip to main content

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.

CI PyPI version Python 3.9+ License: MIT


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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cryptoquant-0.2.0.tar.gz (58.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cryptoquant-0.2.0-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

Details for the file cryptoquant-0.2.0.tar.gz.

File metadata

  • Download URL: cryptoquant-0.2.0.tar.gz
  • Upload date:
  • Size: 58.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cryptoquant-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a3038cecda44afb3bd87a847fcd8a89dcc81d6d67d5dba3863af166b89dae786
MD5 5b1983c9980997b58454f226a0a666bb
BLAKE2b-256 b568e6c858750270f8728dfef8d8a7443774edf749cf517fd28af8d84210d79f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptoquant-0.2.0.tar.gz:

Publisher: publish.yml on LautaroParada/cryptoquant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptoquant-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cryptoquant-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 57.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cryptoquant-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f3b1b9eda4b46bb9efbfe120cc1e700b6961d72002e80c7f6d0ba4d860b7f74
MD5 9325ea9dbbd8a794dbe08447d2b95a84
BLAKE2b-256 43c16f781e6bacb8bee4e34ff2db22ae9201107b783136b9802823ff317eb6d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptoquant-0.2.0-py3-none-any.whl:

Publisher: publish.yml on LautaroParada/cryptoquant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 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