Features
Auto Trading
How the AI executes and monitors trades
Auto Trading
Opus Terminal can execute trades autonomously via PumpPortal.
Trade Execution
When the AI decides to trade, it:
- Validates the trade against risk limits
- Executes via PumpPortal Lightning API
- Records the position in Supabase
- Starts monitoring via WebSocket
Risk Limits
| Limit | Value |
|---|---|
| Max per trade | 0.2 SOL |
| Max positions | 10 |
| Stop-loss | -50% |
These limits are hardcoded and cannot be overridden.
Position Monitoring
A Supabase Edge Function monitors all open positions:
┌─────────────────────────────────┐
│ SolanaTracker WebSocket │
│ wss://datastream.solanatracker.io
└──────────────┬──────────────────┘
▼
┌─────────────────────────────────┐
│ Position Monitor Edge Function │
│ - Subscribe to pool:{mint} │
│ - Calculate real-time P&L │
│ - Check stop-loss (-50%) │
│ - Check take-profit (target) │
└──────────────┬──────────────────┘
▼
┌─────────────────────────────────┐
│ Auto Close Position │
│ - Execute sell via PumpPortal │
│ - Update Supabase │
│ - Log trade │
└─────────────────────────────────┘Stop-Loss
If a position drops to -50%, Opus automatically:
- Sells the entire position
- Updates status to "stopped_out"
- Logs the trade with reason
Take-Profit
When you specify a target price:
"Buy 0.1 SOL of BONK, target $0.00005"The AI will automatically sell when that price is reached.
Manual Close
You can also ask the AI to close any position manually:
"Close my BONK position"