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.8.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ccxt_gateway-1.8.12.tar.gz | 69.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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