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.4

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.4
File Size Uploaded Provenance
ccxt_gateway-1.8.4.tar.gz 69.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 115.7 kB

Release files / ccxt_gateway-1.8.4.tar.gz

Download URL ccxt_gateway-1.8.4.tar.gz
Size 69.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a06b31369cfb5e1744f830b924300090974dee0891ad06063db7f4b0812ee00e
BLAKE2b-256 checksum
How to use checksums
1249f4636e4e1b18423413f14ea941d82c492631797e8f2dbab0e28abd9c9f3b
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.4-py3-none-any.whl

Download URL ccxt_gateway-1.8.4-py3-none-any.whl
Size 45.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4d8c7f33e41de42bb0b64711da2ed69e2fdc959de2d0ff134534feb764c9f61
BLAKE2b-256 checksum
How to use checksums
a50a7f06b7cbcd04596d427fa8db4452ce3e39f9cc6a5789996901ca9d4c458f
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.4

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.4.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