bybit-ws: a trading tool, an analyst, and an assistant
说明与用途
bybit‑ws 是一个统一的实时交易系统,集成了扫描、评分、LLM 审核、风险管理和自学习功能。它使用 SQLite、systemd、Telegram 和双阶段订单流程,确保可靠执行和对账。
问题
Designing a robust live trading system that integrates market data, AI vetting, risk management, and self‑learning while ensuring reliability, transparency, and recoverability.
结果
The system achieves reliable live trading with built‑in safety nets: LLM vetting is fail‑closed, position reconciliation prevents silent failures, and self‑learning is versioned and bounded. Manual trades are isolated from learning, and health checks provide deterministic failure modes.
工作流
- Scan candidates and score them on technical indicators
- Size the trade based on account equity and risk intent
- Preview the order via a two‑phase endpoint and confirm if approved
- Execute the order and verify execution against the exchange
- Tag manual entries to exclude them from learning
- Reconcile local SQLite state with exchange positions
- Run self‑learning updates on closed trades
- Maintain health checks and watchdogs for reliability
证据
A live Bybit futures system that scans, scores, argues with itself before every entry, learns from its own closed trades — and answers when I message it from my phone.
The LLM sits inside the decision path as a veto, never as the thing that picks the trade.
The entry endpoint is two‑phase. The first call returns what would happen — side, quantity, stop, target, leverage — with confirm_required: true, and places nothing.
After the order the system reads the position back and compares it with what it asked for.
The learner reads closed trades from SQLite, scores them across win rate, profit factor, Sharpe, drawdown and holding time, and adjusts parameters per regime.
- 记录日期: 2026-11-02T07:43:47.828Z