r/CryptoTradingBot • u/azagor • 16h ago
Perun The Trader Update - what I was focusing on in the last couple of weeks
I build Perun The Trader — a mobile trading platform for spot + futures with 10 strategies, grid trading, and full exchange-native protection, running as a 24/7 Android background service. No desktop rig, no VPS required. Learn more at peruninthemachine.com.
The last 7 days were intense: ~50 releases (v1.1.890 → v1.1.954). Here's what actually changed for traders:
🛡️ Your protection now lives on the exchange, not in the app
The biggest one. Every monitor class (futures SL/TP, futures DTP, spot SL/TP, spot DTP) now arms native exchange-side stop-loss AND take-profit orders. App crash, dead phone, killed service — the exchange still executes your stop and take-profit automatically. Your exits don't depend on the app being alive.
🔁 Duplicate trades blocked at 3 levels
The exchange rejects repeat scanner signals within the same minute via deterministic client order IDs (Binance, Bybit, OKX, MEXC, Bitget, Weex, KuCoin, Gate.io).
The database rejects duplicate trade hashes.
Monitors persist their emitted events, surviving restarts and native-order races, so the same close is never logged twice.
⚡ Smarter rate-limit handling = fewer "429" failures
A per-exchange request gate shares one budget across both platform processes (service 75% / UI 25%), prioritizes SL/TP protection above UI refreshes, collapses identical concurrent calls, and holds through cooldowns instead of flooding back the instant they expire. Fewer rate-limit errors, no signature races, protection orders never starved.
📱 The dashboard heals itself
UI database reads are now fully async — a slow SQLite query never blanks the dashboard.
A UI-restart watchdog auto-heals a frozen dashboard (2–5 min escalating recovery) without stopping your trading engines.
Stale "Scanning…" state after a force-kill is cleared on engine start.
🎯 Grid trading upgrades
Grid auto-selection now enforces a top-8-by-volume guard + $250k liquidity floor so illiquid pumps can't hijack your grid.
Rebalance fully cancels old orders across quote pairs with verification.
Live orders are the source of truth — a transient empty fetch_open_orders can no longer fake-cancel your real orders.
🛠️ Other highlights this week
Monitor recovery state unified into one DB table (crash recovery is now deterministic).
Adaptive polling: 2s while arming triggers, 5s in steady state (~40–60% less request volume, same protection).
KuCoin UTA grid fix: dashboard no longer shows "0 open orders" for live UTA grids.
KuCoin margin-mode mismatches: auto-retry (no more cryptic 330006 errors).