Files
local-trading-agent/README.md
T

1.4 KiB

Local Crypto Dip Agent

Local-first autonomous paper trading agent for BTC/ETH dip detection.

This is deliberately paper-only by default. Live execution should not be enabled until the paper ledger proves edge after fees/slippage and risk limits are reviewed.

What it does

Every run:

  • fetches recent BTC-USD and ETH-USD candles from public Coinbase Exchange API
  • computes a local fair value from EMA + VWAP
  • detects downside gaps below fair value
  • opens paper long positions only when the gap exceeds configured thresholds
  • scans watch-only candidates without opening new positions
  • sizes positions based on gap strength and recent volatility
  • applies fees/slippage assumptions
  • tracks cash, positions, realized/unrealized P/L, and audit logs

Run once

python3 bot.py --once

Run every 15 minutes

python3 bot.py --loop

Dashboard

python3 dashboard.py --host 127.0.0.1 --port 8765
# open http://127.0.0.1:8765

Files

  • config.json - strategy/risk settings
  • bot.py - scanner + paper execution engine
  • dashboard.py - local dashboard/API
  • data/state.json - paper account state
  • data/trades.jsonl - trade/audit log

Live trading warning

Do not add exchange keys with withdrawal permission. If live mode is ever added, use:

  • trade-only API keys
  • tiny max position size
  • max daily loss
  • max drawdown
  • circuit breaker
  • external alerts
  • paper/live parity report