opte.sh
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:

  1. Validates the trade against risk limits
  2. Executes via PumpPortal Lightning API
  3. Records the position in Supabase
  4. Starts monitoring via WebSocket

Risk Limits

LimitValue
Max per trade0.2 SOL
Max positions10
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:

  1. Sells the entire position
  2. Updates status to "stopped_out"
  3. 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"