Trading bot for Extended Exchange (perpetuals, StarkNet-based orderbook DEX built by ex-Revolut team).
- Connects to Extended's public + authenticated WebSocket + REST endpoints.
- Places, modifies, and cancels orders (limit / market / reduce-only).
- Maintains persistent stop-loss and take-profit reduce-only limit orders per open position.
- Streams book / trades / fills / user-fills into a local SQLite journal for auditability.
- Reconciles local position state against the venue on every heartbeat (naked-position guard).
bot.py— main event loop, systemd-friendly.exchange_extended.py— venue adapter (REST + WS).sizing.py— position-size calc from account equity + per-trade risk.sl_manager.py— stop-loss placement / heal / anti-naked.config.py— venue constants (min notional, tick, lot).
- Python 3.10+
- Extended Exchange API key + StarkNet signing key
- Copy
.env.example→.envand fill in credentials
pip install -r requirements.txt
python bot.py --config config.yamlLive on production. Strategies are intentionally simple (breakout / mean-revert on 1h / 4h). Edge is deliberately public — this repo is not a source of alpha, it's an execution and safety layer.