How maxme/bitcoin-arbitrage works
Project type and purpose
• This is a Python-based command-line tool for detecting Bitcoin arbitrage opportunities across multiple exchanges and, optionally, executing trades automatically.
• It uses an Observer pattern to decouple the core opportunity‐detection engine from side effects (logging, emailing, trading).
File structure
Top-level artifacts
• setup.py, requirements.txt, docs/ – packaging and documentation
• README.md – high-level description and usage
• arbitrage/ – main Python package
– arbitrage.py ← CLI entry point (module __main__)
– arbitrer.py ← core engine: orchestrates data flow & opportunity detection
– config.py-example ← user-editable config (markets to watch, observers to use)
– fiatconverter.py ← converts all prices to a common currency (USD) via ECB API
– utils.py ← shared helpers (e.g., HTTP clients, parsing)
– public_markets/ ← “read-only” exchange adapters (order-book retrieval)
– private_markets/ ← “write” exchange adapters (place trades via API keys)
– observers/ ← Observer implementations (logger, emailer, history dumper, trader bot, XMPP messenger, simulator)
– test/ ← unit and integration tests
README for additional insights
• Supported exchanges (public & private) enumerate all adapter modules under public_markets/ and private_markets/.
• Warning about real trading bots and API‐key security (config.py).
• External dependencies: ECB FX rates, sleekxmpp for XMPP observer.