How mgrzaslewicz/autocoin-arbitrage-monitor works
Project Type and Core Purpose
This is a specialized microservice focused on cryptocurrency arbitrage monitoring. Its main responsibilities are:
• Monitoring currency pair spreads across exchanges
• Calculating spread statistics
• Providing authenticated access to arbitrage opportunities
Main Components
a) Core Service Components:
• API Layer (represented by /api directory)
• Exchange Integration Layer (/exchange directory)
• Authentication/Authorization Layer (/oauth directory)
• Health Monitoring System (/health directory)
• Metrics Collection (/metrics directory)
b) External Integration Points:
• Multiple Cryptocurrency Exchanges
• OAuth Authentication Server
• Metrics Collection System
2. Inside the main container, create these key sections:
• a) Data Input Layer:
• Exchange Order Book Streams
• Exchange Ticker Streams
• Exchange Metadata Service
• b) Processing Core:
• Two-Leg Arbitrage Monitor
• Profit Opportunity Calculator
• Order Book Cache
• Price Service
• c) API & Security Layer:
• REST API Controllers
• OAuth2 Authentication
• Access Token Management
• d) Monitoring & Operations:
• Health Checks
• Metrics Service
• Scheduled Tasks
Important Relationships
• Exchange data flows into the Order Book and Ticker Stream services
• Stream services feed into the Arbitrage Monitor
• Arbitrage Monitor connects to the Profit Calculator
• API Controllers receive data from the monitoring components
• OAuth security wraps around the API layer
Technical Details to Highlight
• The service's REST-based architecture
• Server-Sent Events (SSE) for real-time data streaming
• OAuth2-based security model
• Multiple exchange support
• Two-leg arbitrage calculation capability
Operational Aspects
A section showing:
• Docker deployment capability (based on Dockerfile presence)
• Configuration management (from /config directory)
• Monitoring and health check endpoints