Fast, deterministic backtesting and live trading for algorithmic strategies.
Build, backtest, and deploy trading strategies with a simple TUI interface.
Wisp is a low-code algorithmic trading framework that lets you write strategies in Go and deploy them to live markets. Strategies run directly in the framework with minimal setup and maximum control.
✅ Event-Driven Execution - Write Go code that owns its own run loop, no polling or framework callbacks ✅ Interactive TUI - Beautiful terminal interface for managing strategies and monitoring live trades ✅ Multi-Exchange Support - Unified API across Hyperliquid, Bybit, Paradex, Polymarket, and Gate.io ✅ Real-Time Monitoring - Live orderbook, P&L, positions, and trade data via Unix sockets ✅ Graceful Lifecycle Management - HTTP-based process control for reliable starts and stops ✅ Production-Ready - Deploy strategies to live markets with confidence
go install github.com/wisp-trading/wisp@latestgit clone https://github.com/wisp-trading/wisp
cd wisp
go build -o wisp
sudo mv wisp /usr/local/bin/wisp versionmkdir my-trading-bot && cd my-trading-bot
wisp
# Navigate to: 🆕 Create New ProjectThis creates:
my-trading-bot/
├── config.yml # Framework configuration
├── exchanges.yml # Exchange credentials & settings
└── strategies/
└── momentum/
├── config.yml # Strategy metadata
└── main.go # Strategy implementation
Create your strategy in strategies/momentum/main.go:
package main
import (
"context"
"time"
"github.com/wisp-trading/sdk/pkg/types/connector"
"github.com/wisp-trading/sdk/pkg/types/strategy"
"github.com/wisp-trading/sdk/pkg/types/wisp"
)
type MyStrategy struct {
strategy.BaseStrategy
k wisp.Wisp
}
func NewStrategy(k wisp.Wisp) strategy.Strategy {
s := &MyStrategy{k: k}
s.BaseStrategy = *strategy.NewBaseStrategy(strategy.BaseStrategyConfig{Name: "my-strategy"})
return s
}
func (s *MyStrategy) Start(ctx context.Context) error {
return s.StartWithRunner(ctx, s.run)
}
func (s *MyStrategy) run(ctx context.Context) {
ticker := time.NewTicker(5 * time.Minute)
defer ticker.Stop()
pair := s.k.Pair("BTC", "USDT")
for {
select {
case <-ctx.Done():
return
case <-ticker.C:
// Fetch klines
klines := s.k.Spot().Klines(connector.Hyperliquid, pair, "1h", 14)
// Calculate RSI
rsi, _ := s.k.Indicators().RSI(klines, 14)
if len(rsi) == 0 {
continue
}
currentRSI := rsi[len(rsi)-1]
// Oversold: buy
if currentRSI < 30 {
signal, _ := s.k.Spot().Signal(s.GetName()).
Buy(pair, connector.Hyperliquid, s.k.Asset("BTC").Qty(0.01)).
Build()
s.Emit(signal)
}
// Overbought: sell
if currentRSI > 70 {
signal, _ := s.k.Spot().Signal(s.GetName()).
Sell(pair, connector.Hyperliquid, s.k.Asset("BTC").Qty(0.01)).
Build()
s.Emit(signal)
}
}
}
}Edit strategies/momentum/config.yml:
name: momentum
display_name: "Momentum Strategy"
description: "RSI-based momentum trading"
type: momentum
exchanges:
- hyperliquid
assets:
hyperliquid:
- BTC/USDT
- ETH/USDT
indicators:
rsi:
period: 14
oversold: 30
overbought: 70
parameters:
position_size: 0.1wisp
# Navigate to: Strategies → momentum → Start LiveYour strategy runs as a detached process, continuing even after you close the CLI.
wisp
# Navigate to: MonitorReal-time monitoring dashboard shows:
- Overview: Strategy status, uptime, health
- Positions: Active positions across exchanges
- Orderbook: Live orderbook depth
- Trades: Recent trade history
- PnL: Realized/unrealized profit & loss
# From Monitor view:
# 1. Select running instance
# 2. Press [S]
# 3. Confirm "Yes, Stop"Graceful HTTP-based shutdown ensures clean process termination.
- Event-Driven Architecture - Own your run loop with
Start()andrun()methods, no polling framework - Goroutine-Native - Leverage Go's concurrency without fighting the runtime
- Type-Safe API - Full IDE support with autocomplete
- Rich Indicators - RSI, MACD, Bollinger Bands, EMA, SMA, ATR, Stochastic and more
- Multi-Asset - Trade multiple assets simultaneously
- Multi-Exchange - Execute across multiple exchanges in one strategy
- Process Isolation - Each strategy runs in its own process
- Detached Execution - Strategies continue after CLI closes
- State Persistence - Instance state survives CLI restarts
- Real-Time Data - WebSocket + REST hybrid ingestion
- Position Tracking - Automatic position reconciliation
- Trade Backfill - Recovers trades on restart
- Unix Socket Communication - Fast, local IPC
- HTTP API - RESTful access to strategy data
- Live Orderbook - Real-time order book updates
- PnL Tracking - Realized and unrealized profit/loss
- Health Checks - System health and error reporting
- Multi-Instance - Monitor multiple strategies at once
| Exchange | Spot | Perpetual | Prediction |
|---|---|---|---|
| Hyperliquid | - | ✅ | - |
| Bybit | ✅ | ✅ | - |
| Paradex | ✅ | ✅ | - |
| Polymarket | - | - | ✅ |
| Gate.io | ✅ | - | - |
- Beautiful TUI - Built with Bubble Tea
- Keyboard Navigation - Vim-style keybindings (hjkl)
- Responsive Design - Adapts to terminal size
- Color Coding - Visual status indicators
- Progress Tracking - Real-time backtest progress
Full Documentation: https://usewisp.dev/docs
- Getting Started - Installation and first steps
- Writing Strategies - 13 strategy patterns with examples
- Strategy Examples - Real strategies from basic to advanced
- API Reference - Complete API documentation
- Architecture - How Wisp works
╭─────────────────────────────────────────────╮
│ WISP CLI v0.1.0 │
│ │
│ What would you like to do? │
│ │
│ ▶ 📂 Strategies │
│ 📊 Monitor │
│ ⚙️ Settings │
│ ℹ️ Help │
│ 🆕 Create New Project │
│ │
│ ↑↓/jk Navigate ↵ Select q Quit │
╰─────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────╮
│ MONITOR │
│ │
│ STATUS STRATEGY PID UPTIME PNL HEALTH │
│ ──────────────────────────────────────────────────────────────── │
│ ✓ RUN momentum 86697 2h 30m +$125.50 ███████ │
│ STP arbitrage - - -$43.20 ───── │
│ │
│ [↑↓] Navigate • [Enter] Details • [S] Stop • [R] Refresh • [Q] Back │
╰─────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────╮
│ ORDERBOOK - BTC/USDT (hyperliquid) │
│ │
│ ASKS │
│ 43,251.50 ████████░░ 0.5420 $23,456 │
│ 43,250.00 ██████░░░░ 0.3210 $13,888 │
│ 43,249.50 ████░░░░░░ 0.1890 $8,174 │
│ │
│ BIDS │
│ 43,248.00 ██████████ 0.8920 $38,577 │
│ 43,247.50 ████████░░ 0.6540 $28,284 │
│ 43,247.00 ██████░░░░ 0.4320 $18,683 │
│ │
│ Spread: $3.50 (0.008%) Last: 43,248.75 │
╰─────────────────────────────────────────────╯
┌─────────────────────────────────────────────────────────────┐
│ WISP CLI (TUI) │
│ • Strategy Browser • Monitor • Live Trading │
└────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ INSTANCE MANAGER (Process Control) │
│ • Load strategies • Start/Stop • State Persistence │
└────────────────────┬────────────────────────────────────────┘
│
┌────────────┴────────────┐
▼ ▼
┌──────────────────┐ ┌──────────────────┐
│ Strategy Process│ │ Strategy Process│
│ ┌────────────┐ │ │ ┌────────────┐ │
│ │Strategy Go │ │ │ │Strategy Go │ │
│ │ Code │ │ │ │ Code │ │
│ └────────────┘ │ │ └────────────┘ │
│ ┌────────────┐ │ │ ┌────────────┐ │
│ │ SDK Core │ │ │ │ SDK Core │ │
│ └────────────┘ │ │ └────────────┘ │
│ ┌────────────┐ │ │ ┌────────────┐ │
│ │ Monitoring │ │ │ │ Monitoring │ │
│ │ Server │ │ │ │ Server │ │
│ └────────────┘ │ │ └────────────┘ │
└────────┬─────────┘ └────────┬─────────┘
│ │
└───────────┬───────────┘
▼
┌─────────────────────┐
│ EXCHANGES │
│ • Hyperliquid │
│ • Bybit │
│ • Paradex │
└─────────────────────┘
- CLI - Interactive terminal interface for managing strategies
- Instance Manager - Controls strategy lifecycle (start/stop/monitor)
- Strategy Runtime - Loads and executes Go strategies
- SDK Runtime - Core execution engine with data ingestion
- Monitoring Server - HTTP API exposed via Unix sockets
- Exchange Connectors - Unified interface to multiple exchanges
wispLaunches the TUI interface with full navigation.
wisp --cli # Show command help
wisp version # Show version infofunc (s *momentumStrategy) run(ctx context.Context) {
ticker := time.NewTicker(5 * time.Minute)
defer ticker.Stop()
pair := s.k.Pair("BTC", "USDT")
for {
select {
case <-ctx.Done():
return
case <-ticker.C:
klines := s.k.Spot().Klines(connector.Hyperliquid, pair, "1h", 14)
rsi, _ := s.k.Indicators().RSI(klines, 14)
if len(rsi) == 0 {
continue
}
current := rsi[len(rsi)-1]
if current < 30 {
signal, _ := s.k.Spot().Signal(s.GetName()).
Buy(pair, connector.Hyperliquid, s.k.Asset("BTC").Qty(0.1)).
Build()
s.Emit(signal)
}
if current > 70 {
signal, _ := s.k.Spot().Signal(s.GetName()).
Sell(pair, connector.Hyperliquid, s.k.Asset("BTC").Qty(0.1)).
Build()
s.Emit(signal)
}
}
}
}func (s *crossExchangeStrategy) run(ctx context.Context) {
ticker := time.NewTicker(1 * time.Minute)
defer ticker.Stop()
pair := s.k.Pair("BTC", "USDT")
for {
select {
case <-ctx.Done():
return
case <-ticker.C:
// Fetch price data from both exchanges
bybitPrice := s.k.Spot().Klines(connector.Bybit, pair, "1m", 1)
hyperliquidPrice := s.k.Spot().Klines(connector.Hyperliquid, pair, "1m", 1)
if len(bybitPrice) == 0 || len(hyperliquidPrice) == 0 {
continue
}
// Compare prices and execute on spread
spread := bybitPrice[0].Close.Sub(hyperliquidPrice[0].Close)
// If profitable spread detected, trade both sides
if spread.GreaterThan(numerical.Zero) {
buy, _ := s.k.Spot().Signal(s.GetName()).
Buy(pair, connector.Hyperliquid, s.k.Asset("BTC").Qty(0.5)).
Build()
s.Emit(buy)
sell, _ := s.k.Spot().Signal(s.GetName()).
Sell(pair, connector.Bybit, s.k.Asset("BTC").Qty(0.5)).
Build()
s.Emit(sell)
}
}
}
}We welcome contributions! Here's how you can help:
# Clone the repo
git clone https://github.com/wisp-trading/wisp
cd wisp
# Install dependencies
go mod download
# Run tests
go test ./...
# Build
go build -o wisp# All tests
go test ./...
# Specific package
go test ./internal/services/monitoring/...
# With coverage
go test -cover ./...
# Watch mode
ginkgo watch -r- Use
gofmtfor formatting - Follow Effective Go guidelines
- Write tests with Ginkgo and Gomega
- Use mockery for mocks
- 🌐 Additional exchange connectors
- 📊 More technical indicators
- 📚 Documentation improvements
- 🐛 Bug fixes and testing
- 🎨 UI/UX enhancements
- WebSocket-based live monitoring dashboard
- Strategy performance comparison tool
- Paper trading mode
- Discord/Telegram notifications
- Portfolio optimization tools
- Cloud deployment support
- Strategy marketplace
- Multi-user support
- Advanced risk management
- Machine learning integration
- Enterprise features
- Professional support
- Advanced analytics suite
Q: Is Wisp suitable for production trading? A: Yes, but use appropriate risk management. Start with small positions and paper trading.
Q: What exchanges are supported? A: Currently only Hyperliquid perpetuals are stable in production. Bybit and Paradex are in active development.
Q: Can I run multiple strategies simultaneously? A: Yes! Each strategy runs in its own isolated process.
Q: How do I handle API keys securely?
A: Store them in exchanges.yml with proper file permissions (chmod 600).
Q: Can I write strategies in languages other than Go? A: Wisp strategies must be written in Go to run in the framework. However, you can integrate machine learning models from any language using:
- gRPC - Call ML inference services in Python, R, or any language
- ONNX Runtime - Load pre-trained models directly in Go
- HTTP APIs - Connect to external prediction services
# Ensure Go version matches
go version # Should be 1.24+
# Check strategy code for syntax errors
# The CLI will show runtime errors during startup
# Verify imports are correct
grep -r "github.com/wisp-trading/sdk" strategies/momentum/main.go
# Check file permissions
chmod 644 strategies/momentum/main.goIf you see errors when starting a strategy, check your Go source code for syntax or import errors. The CLI will display the exact error message.
# Find the process
ps aux | grep momentum
# Force kill
kill -9 <PID>
# Clean up socket files
rm ~/.wisp/sockets/*.sock# Check for orphaned processes
ps aux | grep wisp
# Clean up state files
rm ~/.wisp/instances/*/state.jsonMIT License - see LICENSE for details.
Built with:
- Bubble Tea - TUI framework
- Lipgloss - Style definitions
- Cobra - CLI commands
- Fx - Dependency injection
- Ginkgo - Testing framework
- 📖 Documentation
- 💬 Discord Community (coming soon)
- 🐛 Issue Tracker
- ✉️ Email Support (for enterprise)
⭐ If you find Wisp useful, please consider starring the repo! ⭐
Made with ❤️ by the Wisp Team