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

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.12
File Size Uploaded
ccxt_gateway-1.8.12.tar.gz 69.8 kB Details

Built distribution (wheel)

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

Total release size: 115.8 kB

Release files / ccxt_gateway-1.8.12.tar.gz

Download URL ccxt_gateway-1.8.12.tar.gz
Size 69.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1083c4fad843b515a7948876648355609607a38e8dc369c5abe4edc6bcd8b099
BLAKE2b-256 checksum
How to use checksums
51d7537e8a386102214b821843c74f2f7df5f7ec6451b265eb2760d538a256bd
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

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

Download URL ccxt_gateway-1.8.12-py3-none-any.whl
Size 45.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52448d9517399e605d83224ae07a704167ef52660b7f2193a9841f4a8590d12a
BLAKE2b-256 checksum
How to use checksums
dd7c5b1693a54351f9ac50ef876dace468fffe9b5421516677e0e067df6c5cd9
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

Release history Release notifications | RSS feed

1.9.0

2 release files

1.8.14

2 release files

1.8.13

2 release files

This release

1.8.12 This release

2 release files

1.8.11

2 release files

1.8.10

2 release files

1.8.9

2 release files

1.8.8

2 release files

1.8.7

2 release files

1.8.6

2 release files

1.8.5

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release 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