How palc88-stack/apex-trader works
Basel is a cryptocurrency trading bot with a Supabase-backed web dashboard and a TradingView webhook relay. The main workflow is market data → signal evaluation → risk checks → exchange order/position handling → persisted trade state and notifications. The dashboard reads bot status and trades from Supabase; the worker validates incoming webhook signals before forwarding them. Several runtime modules are present in the tree but were not sampled, so their internal wiring is omitted where it cannot be established.
Main entry points: main.py Bot orchestrator · signal_engine.py Signal engine · App.jsx Web dashboard · market_data.py Market data
Components 20
Trading runtime
- Bot orchestrator
bot/main.py - Market data
bot/data/market_data.py - Exchange adapter
bot/core/exchange.py - Position manager
bot/core/position_manager.py
Signals and risk
- Signal engine
bot/signals/signal_engine.py - Indicators
bot/signals/indicators.py - Signal filters
bot/signals/filters.py - Explosion strategy
bot/strategies/explosion.py - Scalping strategy
bot/strategies/scalping.py - Risk manager
bot/core/risk_manager.py - Fee calculator
bot/core/fee_calculator.py
State and notifications
- State manager
bot/data/state_manager.py - Trade schema
database/schema.sql - Telegram notifier
bot/notifications/telegram_notifier.py
User and webhooks
- Web dashboard
web/src/App.jsx - Web entry
web/src/main.jsx - Webhook worker
src/worker.js
Other components
- Operator
- TradingView
- Supabase
Connections 21
- Operator → Web dashboard: uses
- Web entry → Web dashboard: renders
- Web dashboard → Supabase: reads/authenticates
- Web dashboard → Supabase: subscribes
- TradingView → Webhook worker: posts signal
- Webhook worker → Bot orchestrator: forwards webhook
- Bot orchestrator → Market data: requests candles
- Market data → Exchange adapter: fetches market data
- Bot orchestrator → Signal engine: evaluates market
- Signal engine → Indicators: calculates
- Signal engine → Signal filters: validates signal
- Signal engine → Explosion strategy: uses strategy
- Signal engine → Scalping strategy: uses strategy
- Bot orchestrator → Risk manager: checks limits
- Risk manager → Fee calculator: uses
- Bot orchestrator → Exchange adapter: places/closes orders
- Bot orchestrator → Position manager: updates positions
- Bot orchestrator → State manager: loads/saves trades
- State manager → Supabase: reads/writes
- Trade schema → Supabase: defines tables
- Bot orchestrator → Telegram notifier: sends notifications