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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccxt_gateway-1.8.0.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccxt_gateway-1.8.0-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file ccxt_gateway-1.8.0.tar.gz.

File metadata

  • Download URL: ccxt_gateway-1.8.0.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ccxt_gateway-1.8.0.tar.gz
Algorithm Hash digest
SHA256 c3804007e4e9575ba2ce5d44f1ebdeab7e44eb9a21ad37fc58fec6ccfa15fa2f
MD5 9ab6425c65ca856093b7d3cf603cc74e
BLAKE2b-256 9629a0bc05a20af06ed6e408040df1e6f81f163f98927cc99e8e6ca829498942

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccxt_gateway-1.8.0.tar.gz:

Publisher: pypi-ccxt.yml on BubbleParticles/Planar.jl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ccxt_gateway-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: ccxt_gateway-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ccxt_gateway-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91c08339b59589b15fd1c2c67ef15f89656c02b282dbc03c126cfa4ce8775149
MD5 d56e2a63e5bb13d1cbd6d2d92b6affbd
BLAKE2b-256 975152e2c17aef411f365cd20272e64d44138231b8d6dd50cff901dd47d57083

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccxt_gateway-1.8.0-py3-none-any.whl:

Publisher: pypi-ccxt.yml on BubbleParticles/Planar.jl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.8.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page