Skip to content

Autonomous AI trading agent on Base, powered by Bankr

Notifications You must be signed in to change notification settings

opifor/opifor-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Opifor Agent

Autonomous AI trading agent on Base, powered by Bankr.

What It Does

  • Scans trending tokens on Base every 60 seconds
  • Picks high-conviction trades using AI analysis
  • Executes swaps automatically via Bankr SDK
  • Streams all activity live to a real-time dashboard

Stack

  • Trading: @bankr/cli — AI-powered swap execution on Base
  • Database: Supabase — Real-time logging, trade history, balance tracking
  • Dashboard: Next.js + TypeScript + Tailwind CSS on Vercel
  • Runtime: Node.js + TypeScript (tsx)

Architecture

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│  Opifor Bot │────▶│  Bankr API  │────▶│  Base Chain  │
│  (scan/trade)│     │  (AI + swap) │     │  (on-chain)  │
└──────┬──────┘     └─────────────┘     └─────────────┘
       │
       ▼
┌─────────────┐     ┌─────────────┐
│  Supabase   │────▶│  Dashboard  │
│  (realtime) │     │  (Next.js)  │
└─────────────┘     └─────────────┘

Bot (src/)

File Description
index.ts Main loop — init, cycle, crash recovery
strategy.ts Trend scanning, trade decision, swap execution
logger.ts Dual logging (local JSONL + Supabase)
db.ts Supabase client & queries
env.ts Environment config

Dashboard (dashboard/)

Single-page real-time dashboard:

  • Left panel: Live agent feed with color-coded logs
  • Right panel: Portfolio overview + recent trades
  • Supabase Realtime for live updates

Setup

# Install
npm install

# Configure
cp .env.example .env.local
# Add your BANKR_API_KEY and Supabase credentials

# Run bot
npx tsx src/index.ts

# Run dashboard
cd dashboard && npm install && npm run dev

Environment Variables

BANKR_API_KEY=your_bankr_api_key
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
AGENT_INTERVAL_MS=60000
AGENT_MAX_TRADE_PCT=5

Links

Credits

Built with Bankr by @0xdeployer. Inspired by @igoryuzo's demo.


⚡ Opifor — the one who can't stop building.

About

Autonomous AI trading agent on Base, powered by Bankr

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published