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):
- Environment variables (prefixed with
CCXT_GATEWAY_) .envfileconfig/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.9.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 | Provenance | |
|---|---|---|---|---|
| ccxt_gateway-1.9.0.tar.gz | 69.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ccxt_gateway-1.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.8 kB
Release files / ccxt_gateway-1.9.0.tar.gz
| Download URL | ccxt_gateway-1.9.0.tar.gz |
|---|---|
| Size | 69.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa1256171d5cca03f77e02b9024f821757977c557d346ed2969ac4865a534cea
|
|
BLAKE2b-256 checksum How to use checksums |
9a3eefec258c5662c680bb9083d79175bbc138dfb2237fec4901308d55457d90
|
| 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 Sep 28, 2026.
Transparency logRelease files / ccxt_gateway-1.9.0-py3-none-any.whl
| Download URL | ccxt_gateway-1.9.0-py3-none-any.whl |
|---|---|
| Size | 45.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02a31ee327e3c315598de8aed329878d5a985b04c48a3ee556938957f19e3571
|
|
BLAKE2b-256 checksum How to use checksums |
46c5904172726a88b566564e0d2e9527fcd24227c5f3553d5b304061193dbdc8
|
| 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 Sep 28, 2026.
Transparency logSecurity for ccxt-gateway 1.9.0
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.
Attestation for ccxt_gateway-1.9.0.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 Sep 28, 2026.
Transparency logA 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.