How minculusofia-wq/apex-predator works
APEX PREDATOR is a Polymarket crypto-market trading bot with Gabagool arbitrage and Smart Ape momentum strategies, Kelly sizing, optimization, and operational controls. Its principal workflow is market scanning, opportunity analysis, strategy evaluation and order execution through Polymarket; a web API and terminal UI provide control and monitoring. The README documents the high-level routing and capabilities, while sampled source confirms scanner/API behavior and supporting modules. Some strategy-to-executor wiring is unsampled, so uncertain links are omitted or marked unverified.
Main entry points: scanner.py Market scanner · server.py Web API and dashboard · gabagool.py Gabagool arbitrage · executor.py Order executor
Components 26
Market discovery
- Market scanner
core/scanner.py - Public market API
api/public/polymarket_public.py - Gamma market data
api/public/gamma_client.py - Price feed
api/public/websocket_feed.py - Opportunity analyzer
core/analyzer.py - Binance prices
api/public/binance_client.py
Trading strategies
- Gabagool arbitrage
core/gabagool.py - Smart Ape momentum
core/smart_ape.py - Kelly sizing
core/kelly.py - Auto optimizer
core/auto_optimizer.py
Execution and controls
- Order executor
core/executor.py - Private trading API
api/private/polymarket_private.py - Order queue
core/order_queue.py - Resilience controls
core/resilience.py - Health and metrics
core/lifecycle.py - Trading configuration
config/trading_params.py
Operator interfaces
- Web API and dashboard
web/server.py - Terminal UI
ui/app.py
Paper trading
- Simulation configuration
core/paper_trading/config.py - Paper executor
core/paper_trading/paper_executor.py - Fill simulator
core/paper_trading/fill_simulator.py - Virtual capital
core/paper_trading/capital_manager.py - Trade history store
core/paper_trading/trade_store.py - Paper reports
core/paper_trading/reporter.py
Other components
- Trader
- Polymarket markets
Connections 35
- Trader → Market scanner: starts bot
README.md - Polymarket markets → Public market API: market data
README.md - Market scanner → Public market API: fetches markets
core/scanner.py - Market scanner → Gamma market data: fetches listings
core/scanner.py - Market scanner → Price feed: receives updates
core/scanner.py - Market scanner → Opportunity analyzer: triggers analysis
core/analyzer.py - Opportunity analyzer → Gabagool arbitrage: evaluates opportunities
- Opportunity analyzer → Smart Ape momentum: evaluates opportunities
- Gabagool arbitrage → Order executor: submits trades
README.md - Smart Ape momentum → Order executor: submits trades
README.md - Gabagool arbitrage → Kelly sizing: sizes positions
- Smart Ape momentum → Kelly sizing: sizes positions
- Auto optimizer → Gabagool arbitrage: tunes strategy
README.md - Auto optimizer → Smart Ape momentum: tunes strategy
README.md - Auto optimizer → Binance prices: reads prices
core/auto_optimizer.py - Order executor → Private trading API: places orders
- Order executor → Order queue: queues orders
- Order executor → Resilience controls: uses safeguards
- Trader → Web API and dashboard: controls bot
README.md - Web API and dashboard → Gabagool arbitrage: controls strategy
web/server.py - Web API and dashboard → Smart Ape momentum: controls strategy
web/server.py - Web API and dashboard → Auto optimizer: controls optimizer
README.md - Web API and dashboard → Kelly sizing: configures sizing
web/server.py - Trader → Terminal UI: operates bot
README.md - Terminal UI → Market scanner: controls scanning
ui/app.py - Trading configuration → Gabagool arbitrage: configures strategy
core/gabagool.py - Trading configuration → Web API and dashboard: serves configuration
web/server.py - Market scanner → Health and metrics: reports health
- Paper executor → Fill simulator: simulates fills
core/paper_trading/paper_executor.py - Paper executor → Virtual capital: allocates capital
core/paper_trading/paper_executor.py - Paper executor → Trade history store: persists trades
core/paper_trading/paper_executor.py - Fill simulator → Simulation configuration: uses settings
core/paper_trading/fill_simulator.py - Virtual capital → Simulation configuration: uses settings
core/paper_trading/capital_manager.py - Paper reports → Trade history store: reads history
core/paper_trading/reporter.py - Paper reports → Virtual capital: reads capital stats
core/paper_trading/reporter.py