How rodrigo-brito/ninjabot works
Ninjabot is a Go cryptocurrency trading framework for running custom strategies against historical or live spot/futures markets, with paper trading, order management, and a web dashboard. The main workflow is market data into strategy evaluation, then broker orders and persistence; users can also download historical candles and review results. The README documents additional dashboard controls, indicators, notifications, storage options, and trading tools. Several runtime paths are unsampled, so those subsystem links are documented rather than inferred from file names.
Main entry points: order/controller.go Order controller · App.tsx Dashboard app · ninjabot.go Bot orchestrator · strategy/controller.go Strategy controller
Components 24
Bot runtime
- Bot orchestrator
ninjabot.go - Trading models
model/model.go
Market and orders
- Market data feed
exchange/exchange.go - Binance spot
exchange/binance.go - Binance futures
exchange/binance_future.go - CSV feed
exchange/csvfeed.go - Paper wallet
exchange/paperwallet.go - Order controller
order/controller.go - Order storage
storage/storage.go
Strategy and results
- Strategy controller
strategy/controller.go - Indicators
indicator/talib.go - Backtest results
order/controller.go
Dashboard
- Dashboard server
ui/server.go - Dashboard API client
web/src/api/client.ts - Dashboard app
web/src/App.tsx - Control panel
web/src/components/ControlPanel.tsx - Charts and stats
web/src/components/PriceChart.tsx - Orders table
web/src/components/OrdersTable.tsx
User capabilities
- Candle downloader
download/download.go - Download CLI
cmd/ninjabot/ninjabot.go - Notifications
notification/telegram.go - Email notifications
notification/mail.go
Other components
- Trader
- Exchange service
Connections 24
- Trader → Bot orchestrator: configures
- Bot orchestrator → Market data feed: starts feed
- Market data feed → Strategy controller: delivers candles
- Strategy controller → Indicators: calculates
- Strategy controller → Order controller: requests trades
- Order controller → Exchange service: places orders
order/controller.go - Order controller → Order storage: persists orders
order/controller.go - Order controller → Backtest results: tracks results
order/controller.go - Bot orchestrator → Strategy controller: configures
ninjabot.go - Binance spot → Exchange service: implements
- Binance futures → Exchange service: implements
- Paper wallet → Exchange service: simulates trading
exchange/paperwallet.go - CSV feed → Market data feed: provides candles
- Download CLI → Candle downloader: invokes
cmd/ninjabot/ninjabot.go - Candle downloader → Exchange service: fetches history
download/download.go - Bot orchestrator → Notifications: configures
ninjabot.go - Trader → Dashboard server: uses dashboard
- Dashboard app → Dashboard API client: requests data
web/src/App.tsx - Dashboard app → Control panel: renders
web/src/App.tsx - Dashboard app → Charts and stats: renders
web/src/App.tsx - Dashboard app → Orders table: renders
web/src/App.tsx - Dashboard API client → Dashboard server: calls HTTP API
- Dashboard server → Order controller: controls bot
- Dashboard server → Paper wallet: serves wallet data