chore: initial local trading agent import
This commit is contained in:
commit
0591b75401
13 files changed
+1385
No files matched your search
@@ -0,0 +1,55 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
python3 bot.py --once
|
||||
```
|
||||
|
||||
## Run every 15 minutes
|
||||
|
||||
```bash
|
||||
python3 bot.py --loop
|
||||
```
|
||||
|
||||
## Dashboard
|
||||
|
||||
```bash
|
||||
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
|
||||
Reference in new issue
Block a user