The Problem
Crypto arbitrage — buying on one exchange where the price is lower and selling on another where it's higher — sounds simple. The hard part is spotting the opportunity before it disappears. Prices move in milliseconds. Manual checking is useless.
So I built EasyArbitHub: a real-time arbitrage intelligence dashboard that monitors 6 major exchanges simultaneously, calculates net profit margins with slippage factored in, and fires Telegram alerts when actionable opportunities arise.
The Stack
- FastAPI — async REST API, fast enough to handle concurrent exchange polling
- WebSocket / polling — live price feeds from Binance, OKX, Bybit, KuCoin, Gate.io, Kraken via CCXT
- PostgreSQL — storing subscribers, alert history
- Docker — containerized, runs the same everywhere
- AWS EC2 — production deployment
- Next.js — dashboard frontend with real-time chart updates
- Telegram Bot API — instant alerts to subscribers
How It Works
Every 15 seconds, the system fetches tickers from all 6 exchanges in parallel. For each asset, it finds the best buy and sell price across exchanges:
gross_pct = ((best_sell - best_buy) / best_buy) * 100
net_pct = gross_pct - (buy_fee + sell_fee) * 100
Opportunities are scored based on spread size, liquidity depth, and slippage. High-scoring ones trigger Telegram notifications — even when the browser is closed.
The Interesting Part: Slippage
Raw spread is misleading. A 0.5% spread on a thinly traded pair disappears the moment you place an order. So I factor in order book depth:
slip = input_amount * 2 / order_depth
score -= min(15, slip * 200)
This penalizes opportunities that look good on paper but can't handle real trade volume.
What I Learned
CCXT is great but exchange APIs are inconsistent — always normalize before comparing
Telegram bots are easy to build and users love real-time alerts
Cooldown logic matters: without a 15-minute cooldown, the same opportunity triggers 10+ alerts
Try It
Live demo (UI in TR): easyarbithub.com
I'm a freelance backend & DevOps developer building production systems for SaaS and FinTech teams: thebozgun.com
Top comments (0)