https://github.com/0xtarunkm/cex
centralised exchange in rust
https://github.com/0xtarunkm/cex
cryptocurrency exchange rust trading-platform
Last synced: about 2 months ago
JSON representation
centralised exchange in rust
- Host: GitHub
- URL: https://github.com/0xtarunkm/cex
- Owner: 0xtarunkm
- Created: 2025-01-22T09:58:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-04-10T17:37:29.000Z (about 2 months ago)
- Last Synced: 2025-04-10T18:56:22.808Z (about 2 months ago)
- Topics: cryptocurrency, exchange, rust, trading-platform
- Language: Rust
- Homepage:
- Size: 219 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CEX (Centralized Exchange)
A high-performance centralized cryptocurrency exchange implementation in Rust, featuring spot and margin trading capabilities with real-time market data distribution.
## Architecture
The project consists of three main components:
1. **HTTP Server** (`http-server/`):
- RESTful API endpoints for order management
- Built with Axum framework
- Redis-based communication with the order book manager2. **Orderbook Manager** (`orderbook-manager/`):
- Core trading engine implementation
- Real-time order matching
- Position and PnL management
- Price service for mark and index prices
- Market depth maintenance3. **WebSocket Server** (`websocket-server/`):
- Real-time market data streaming
- Room-based subscription system
- Redis pub/sub integration
- Client connection management
4. **Wallet Manager** (`wallet-manager/`):
- Wallet management
- Balance tracking
- Transaction history
- Onramp and offramp support## Setup
```bash
docker compose up --build -d
```## API Access
[Postman Collection](https://www.postman.com/solar-trinity-740656/cex/overview)---
Built with 🦀 and ❤️