Skip to main content

ccxt-gateway

High-performance, self-hosted gateway for 100+ cryptocurrency exchanges via CCXT.

Features

  • High Performance: Built with FastAPI, uvloop, and orjson for maximum throughput
  • Rock Solid Stability: Multi-process design with automatic restart on failures
  • Memory Management: Automatic subprocess restart when memory limits exceeded
  • WebSocket Support: Proxy CCXT watch* functions via WebSocket connections
  • Auto-Update: Automatic CCXT version management
  • Unified API: Single REST and WebSocket API for all supported exchanges

Quick Start

Installation

# Clone the repository
git clone https://github.com/yourusername/ccxt-gateway.git
cd ccxt-gateway

# Install dependencies
pip install -e ".[server]"

Running

# Start the gateway
ccxt-gateway

# Or directly with Python
python -m ccxt_gateway.main

The gateway will start on http://0.0.0.0:8000 by default.

Basic Usage

# Create a Binance exchange instance
curl -X POST "http://localhost:8000/exchanges/my-binance?exchange_name=binance"

# Get ticker for BTC/USDT
curl "http://localhost:8000/exchanges/my-binance/fetch_ticker?symbol=BTC/USDT"

# Delete the exchange instance
curl -X DELETE "http://localhost:8000/exchanges/my-binance"

Configuration

Configuration is loaded from (in order):

  1. Environment variables (prefixed with CCXT_GATEWAY_)
  2. .env file
  3. config/default.yaml

See config/default.yaml for all available options.

API Documentation

Once running, visit:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Architecture

Client -> FastAPI -> ZMQ Broker -> Exchange Subprocess (CCXT)

Each exchange runs in its own subprocess, communicating via ZeroMQ for isolation and stability.

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/

License

MIT

Metadata

Release files for ccxt-gateway 1.8.1

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

Source distribution (sdist)

Source distribution for ccxt-gateway 1.8.1
File Size Uploaded Provenance
ccxt_gateway-1.8.1.tar.gz 69.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ccxt-gateway 1.8.1
File Interpreter ABI Platform
ccxt_gateway-1.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 115.7 kB

Release files / ccxt_gateway-1.8.1.tar.gz

Download URL ccxt_gateway-1.8.1.tar.gz
Size 69.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a1c29c9bfdb3ae69ad00d806a3d23ec7b109d7e6eb736e46b9f5375942b6645f
BLAKE2b-256 checksum
How to use checksums
ac0e9b5fbd52dcc29772035bd6761161dfbe4e6d93a4396a38f55f49eb949640
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 26, 2026.

Transparency log

Release files / ccxt_gateway-1.8.1-py3-none-any.whl

Download URL ccxt_gateway-1.8.1-py3-none-any.whl
Size 45.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04c25eb6d074f1d453e46c1b1a80a8a8c20869b82a7e02bdca9fcf23994471d0
BLAKE2b-256 checksum
How to use checksums
686a6124f02308b2d5d0edafc900c19d01d75811502086e5814ff4a0a44c28f8
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 26, 2026.

Transparency log

Security for ccxt-gateway 1.8.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ccxt_gateway-1.8.1.tar.gz

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 26, 2026.

Transparency log

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.

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