Skip to content

Rust library for high-performance, low-latency access to cryptocurrency exchange APIs. Supports public and private REST, WebSocket, and advanced trading features across major venues. Designed for HFT, robust error handling, and strict rate limiting.

Notifications You must be signed in to change notification settings

rosssaunders/ccrxt

Repository files navigation

CCRXT

CI Source Coverage Integration Coverage License: MIT Rust Crates.io Documentation

Rust wrappers around cryptocurrency exchange APIs with a focus on low-latency, high-frequency trading applications.

Note: This library is currently in development. The Crates.io and Documentation badges will become functional when the library is published.

Supported Exchanges

Exchange Type Status Public Tests Private Tests REST WebSocket
Binance COIN-M Futures ✅ Complete
Binance USD-M Futures (USDT-M) ✅ Complete
Binance Portfolio Margin ✅ Complete
Binance Options (EAPI) 🚧 In Progress 🚧
Binance Spot ✅ Complete
BingX Spot 🚧 In Progress 🚧
Bitget Spot 🚧 In Progress 🚧
Bitmart Contract 🚧 In Progress 🚧
Bitmart Spot 🚧 In Progress 🚧
Bullish Spot 🚧 In Progress 🚧
Bybit Spot & Derivatives 🚧 In Progress 🚧
Coinbase Exchange ✅ Complete
Crypto.com Spot Trading ✅ Complete
Deribit Public API ✅ Complete
Gate.io Delivery 🚧 In Progress 🚧
Gate.io Options 🚧 In Progress 🚧
Gate.io Perpetual 🚧 In Progress 🚧
Gate.io Spot 🚧 In Progress 🚧
Gate.io Unified 🚧 In Progress 🚧
KuCoin Futures 🚧 In Progress 🚧
KuCoin Spot 🚧 In Progress 🚧
OKX Spot & Derivatives ✅ Complete

Exchange Features

  • ✅ Complete: Full implementation with comprehensive API coverage
  • 🚧 In Progress: Basic infrastructure in place, endpoints being added

Implementation Status

  • REST: Public and private REST API endpoints with rate limiting and error handling
  • WebSocket: Real-time data feeds and streaming APIs
  • : Fully implemented and tested
  • 🚧: In development
  • : Not yet implemented

Testing Status

  • Public Tests: Integration tests for public API endpoints (market data, instrument info, etc.)
  • Private Tests: Integration tests for private API endpoints (account data, trading operations)
  • : Tests implemented and passing
  • : Tests not yet implemented

Venue Documentation

Each venue includes a README with:

  • Links to the official API documentation
  • Authentication requirements
  • List of implemented endpoints

See the venues directory for details.

Design Principles

  1. All venues implement low latency APIs. If WebSocket is available, it is preferred over REST.
  2. Venue rate limiting is implemented exactly as specified by the exchange.
  3. Wrappers around endpoints are pure; no helper or fix-up logic is included.
  4. All WebSocket clients implement the common WebSocket trait.
  5. File and module structure follows strict conventions for maintainability and clarity.

Rust Version Policy

This project targets ONLY the latest stable Rust release.

  • rust-toolchain.toml pins the toolchain to stable so builds automatically track the newest stable once installed.
  • Cargo.toml rust-version field is updated to the most recent stable (currently 1.89.0) and will be bumped promptly after each stable release.
  • No nightly feature gates (#![feature(...)]) are permitted.
  • Patterns that previously required nightly (e.g., let_chains before stabilization in 1.88) may now use the stable syntax where it improves clarity.
  • CI enforces these rules via a verification script.

If you need a feature that is only on nightly, open an issue to discuss alternatives before proposing nightly usage.

Testing

  • Unit tests are colocated with the code they test and do not require credentials or network access.
  • Integration tests are in the tests/ directory and cover real API interactions (where supported).

Examples

  • Example code for each venue is in venues/examples/.
  • Examples are self-contained and demonstrate usage of public APIs, with clear instructions for credentials if

About

Rust library for high-performance, low-latency access to cryptocurrency exchange APIs. Supports public and private REST, WebSocket, and advanced trading features across major venues. Designed for HFT, robust error handling, and strict rate limiting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages