Real-time cryptocurrency arbitrage detection system across Coinbase, Binance, Bybit, OKX

graph LR
A[Go Producer] -->|High Throughput| B(Kafka)
B --> C[Java Consumer]
C -->|REST API| D[React Dashboard]
E[Coinbase] --> A
F[Binance] --> A
G[Bybit] --> A
H[OKX] --> A
- Go 1.21+
- Java 17+
- Node.js 18+
- Docker & Docker Compose
- Maven
docker-compose up -dCreate a .env file in the root directory. Only Coinbase requires API keys for public ticker data.
COINBASE_API_KEY=your_api_key
COINBASE_SECRET_KEY=-----BEGIN EC PRIVATE KEY-----
your_secret_key
-----END EC PRIVATE KEY-----
The producer automatically discovers symbols that exist on at least 2 exchanges and streams them.
cd producer
go mod download
go run cmd/main.goThe consumer detects N-way arbitrage opportunities between any pair of exchanges.
cd consumer
mvn clean install
mvn spring-boot:runcd webapp
npm install
npm startVisit http://localhost:3000 to see the live dashboard!
- ✅ Multi-Exchange Support: Tracks Coinbase, Binance, Bybit, and OKX simultaneously.
- ✅ Smart Auto-Discovery: Finds assets listed on ≥2 exchanges.
- ✅ High-Frequency Streaming: Handles 1,000+ messages/sec via Kafka.
- ✅ N-Way Arbitrage: Detects best BUY and SELL opportunities.
- ✅ Live Dashboard: Real-time price feeds, dynamic search, visual spread indicators.
- ✅ Resilience: Automatic reconnection logic for WebSockets and Kafka.
GET http://localhost:8081/api/opportunities– Returns top arbitrage opportunities.GET http://localhost:8081/api/prices– Returns live prices for all tracked symbols.