How anas-chortani/crypto-arbitrage-scanner works
Crypto Arbitrage Scanner is a read-only monitor: the user starts a scan, configured public or simulated adapters provide order books, and the scanner filters and evaluates cross-exchange routes before sending results to listeners. Its main stages are configuration and adapter setup, market-data acquisition, fee-aware route analysis and episode tracking, then console, file, alert, report, or dashboard output. The graph follows documented architecture and indexed references; some source excerpts are partial, so uncertain internal links are omitted.
Main entry points: scanner.py Scan orchestration · cli.py CLI commands · registry.py Adapter registry · base.py Adapter interface
Components 18
Setup and control
- CLI commands
src/arb_scanner/cli.py - Validated config
src/arb_scanner/config.py - Application assembly
src/arb_scanner/app.py
Market data
- Adapter registry
src/arb_scanner/exchanges/registry.py - Adapter interface
src/arb_scanner/exchanges/base.py - Public exchange adapter
src/arb_scanner/exchanges/ccxt_public.py - Market simulator
src/arb_scanner/exchanges/simulated.py
Analysis and tracking
- Market and result models
src/arb_scanner/models.py - Scan orchestration
src/arb_scanner/scanner.py - Route analysis
src/arb_scanner/analysis.py
Results and monitoring
- Alerts
src/arb_scanner/alerts.py - CSV and JSONL export
src/arb_scanner/export.py - Run report
src/arb_scanner/report.py - Live dashboard
src/arb_scanner/dashboard/app.py - Logging setup
src/arb_scanner/logging_setup.py
Other components
- Operator
- Exchange public APIs
- Optional webhook
Connections 25
- Operator → CLI commands: runs commands
README.md - CLI commands → Validated config: loads settings
src/arb_scanner/cli.py - CLI commands → Application assembly: starts scanning
src/arb_scanner/cli.py - Application assembly → Adapter registry: builds adapters
src/arb_scanner/app.py - Application assembly → Scan orchestration: creates scanner
src/arb_scanner/app.py - Validated config → Adapter registry: validates venues
src/arb_scanner/config.py - Adapter registry → Public exchange adapter: creates public adapter
src/arb_scanner/exchanges/registry.py - Adapter registry → Market simulator: creates simulator
src/arb_scanner/exchanges/registry.py - Public exchange adapter → Adapter interface: implements interface
src/arb_scanner/exchanges/ccxt_public.py - Market simulator → Adapter interface: implements interface
src/arb_scanner/exchanges/simulated.py - Public exchange adapter → Exchange public APIs: fetches order books
README.md - Scan orchestration → Adapter interface: fetches books
README.md - Adapter interface → Market and result models: returns order books
src/arb_scanner/exchanges/base.py - Scan orchestration → Market and result models: records scan results
src/arb_scanner/scanner.py - Scan orchestration → Route analysis: evaluates routes
src/arb_scanner/scanner.py - Route analysis → Market and result models: produces quotes
src/arb_scanner/analysis.py - Scan orchestration → Alerts: notifies listener
README.md - Scan orchestration → CSV and JSONL export: notifies listener
README.md - Scan orchestration → Run report: notifies listener
README.md - Scan orchestration → Live dashboard: updates dashboard
README.md - Alerts → Optional webhook: sends optional alerts
README.md - CLI commands → Live dashboard: serves dashboard
src/arb_scanner/cli.py - CLI commands → Run report: prints report
src/arb_scanner/cli.py - CLI commands → Logging setup: configures logging
src/arb_scanner/cli.py - Alerts → Logging setup: uses logging
src/arb_scanner/alerts.py