How aulekator/polymarket-btc-15-minute-trading-bot works
This repository is a Polymarket BTC 15-minute market trading bot. Its primary workflow gathers market and sentiment data, analyzes and fuses signals, applies risk controls, and places trades; monitoring and performance-based learning support that loop. The README documents the high-level phase flow, while source-index references and excerpts establish selected implementation links. Some runtime wiring is unsampled, so those relationships are omitted rather than inferred.
Main entry points: bot.py Bot Orchestrator · unified_adapter.py Unified Adapter · engine_wrapper.py Nautilus Data Engine · grafana_exporter.py Metrics Exporter
Components 29
Market Data
- Coinbase Feed
data_sources/coinbase/adapter.py - Binance Feed
data_sources/binance/websocket.py - News Sentiment
data_sources/news_social/adapter.py - Solana RPC
data_sources/solana/rpc.py
Data Runtime
- Unified Adapter
core/ingestion/adapters/unified_adapter.py - Data Validator
core/ingestion/validators/data_validator.py - Rate Limiter
core/ingestion/managers/rate_limiter.py - WebSocket Manager
core/ingestion/managers/websocket_manager.py - Nautilus Data Engine
core/nautilus_core/data_engine/engine_wrapper.py - BTC Instruments
core/nautilus_core/instruments/btc_instruments.py - Custom Data Provider
core/nautilus_core/providers/custom_data_provider.py - Event Dispatcher
core/nautilus_core/event_dispatcher/dispatcher.py
Signal Strategy
- Signal Processors
core/strategy_brain/signal_processors - Signal Definitions
core/strategy_brain/signal_processors/base_processor.py - Signal Fusion
core/strategy_brain/fusion_engine/signal_fusion.py - Fusion Divergence
core/strategy_brain/fusion_engine/divergence_processor.py - 15-Minute Strategy
core/strategy_brain/strategies/btc_15min_strategy.py
Trading
- Bot Orchestrator
bot.py - Bot Runner
15m_bot_runner.py - Risk Engine
execution/risk_engine.py - Execution Engine
execution/execution_engine.py - Nautilus Integration
execution/nautilus_polymarket_integration.py - Polymarket Client
execution/polymarket_client.py
Monitoring Learning
- Metrics Exporter
monitoring/grafana_exporter.py - Performance Tracker
monitoring/performance_tracker.py - Weight Learning
feedback/learning_engine.py - Redis Mode Control
redis_control.py
Other components
- Bot Operator
- Grafana
Connections 28
- Bot Operator → Bot Runner: starts
README.md - Bot Runner → Bot Orchestrator: runs
- Bot Orchestrator → Coinbase Feed: fetches data
bot.py - Unified Adapter → Coinbase Feed: uses feed
core/ingestion/adapters/unified_adapter.py - Unified Adapter → Binance Feed: uses feed
core/ingestion/adapters/unified_adapter.py - Unified Adapter → News Sentiment: uses feed
core/ingestion/adapters/unified_adapter.py - Unified Adapter → Solana RPC: uses feed
core/ingestion/adapters/unified_adapter.py - Bot Orchestrator → Signal Processors: invokes
bot.py - Signal Processors → Signal Definitions: emits signals
core/strategy_brain/signal_processors/base_processor.py - 15-Minute Strategy → Signal Processors: uses processors
core/strategy_brain/strategies/btc_15min_strategy.py - 15-Minute Strategy → Signal Fusion: fuses signals
core/strategy_brain/strategies/btc_15min_strategy.py - Bot Orchestrator → Signal Fusion: uses fusion
bot.py - Bot Orchestrator → Risk Engine: checks risk
bot.py - Execution Engine → Risk Engine: checks risk
execution/execution_engine.py - Execution Engine → Nautilus Integration: places orders
execution/execution_engine.py - Nautilus Integration → Polymarket Client: uses client
- Nautilus Data Engine → BTC Instruments: registers
core/nautilus_core/data_engine/engine_wrapper.py - Nautilus Data Engine → Custom Data Provider: connects provider
core/nautilus_core/data_engine/engine_wrapper.py - Custom Data Provider → Unified Adapter: uses adapter
core/nautilus_core/providers/custom_data_provider.py - Nautilus Data Engine → Event Dispatcher: uses dispatcher
core/nautilus_core/data_engine/engine_wrapper.py - Bot Orchestrator → Performance Tracker: tracks trades
bot.py - Bot Orchestrator → Metrics Exporter: exports metrics
bot.py - Metrics Exporter → Performance Tracker: reads statistics
monitoring/grafana_exporter.py - Metrics Exporter → Grafana: serves metrics
README.md - Bot Orchestrator → Weight Learning: updates weights
bot.py - Weight Learning → Performance Tracker: reads trades
feedback/learning_engine.py - Weight Learning → Signal Fusion: adjusts weights
feedback/learning_engine.py - Bot Operator → Redis Mode Control: switches mode
README.md