No description
  • Python 99.2%
  • Shell 0.6%
  • PowerShell 0.2%
Find a file
2026-10-26 23:39:19 +08:00
clearing_service feat: isolate strategy position ownership 2026-10-20 13:36:03 +08:00
common feat: close lifecycle protection ownership loops 2026-10-23 15:13:06 +08:00
config feat: bound account snapshot history 2026-09-20 19:59:46 +08:00
doc chore: import current project baseline 2026-06-26 15:52:44 +08:00
docs docs: record production protection rollout and verification 2026-10-26 23:39:19 +08:00
examples chore: import current project baseline 2026-06-26 15:52:44 +08:00
execution_service fix: bound account observation retries and preserve unsent protection 2026-10-26 14:33:19 +08:00
gateway_service feat: close lifecycle protection ownership loops 2026-10-23 15:13:06 +08:00
migrations feat: close lifecycle protection ownership loops 2026-10-23 15:13:06 +08:00
monitoring_service fix: bound account observation retries and preserve unsent protection 2026-10-26 14:33:19 +08:00
ops docs: clarify strategy runtime lifecycle 2026-08-06 10:30:30 +08:00
tests test: cover account lock recovery and protection query failures 2026-10-26 14:33:19 +08:00
tools feat: close lifecycle protection ownership loops 2026-10-23 15:13:06 +08:00
.gitattributes fix: enforce LF for Linux service scripts 2026-07-20 18:12:50 +08:00
.gitignore chore: import current project baseline 2026-06-26 15:52:44 +08:00
pyproject.toml ops: make Linux runtime paths portable 2026-07-30 17:12:40 +08:00
README.md docs: align production operations and review guides 2026-07-20 22:57:16 +08:00
requirements.txt ops: make Linux runtime paths portable 2026-07-30 17:12:40 +08:00
restart.sh ops: make Linux runtime paths portable 2026-07-30 17:12:40 +08:00
service-control.sh fix: release control lock before service exec 2026-08-14 13:49:23 +08:00
stop.sh ops: make Linux runtime paths portable 2026-07-30 17:12:40 +08:00

加密交易平台

面向 Binance USD-M Futures 的策略交易服务,支持 Target Weight CSV 和 Lifecycle JSON 两类信号。生产链路由 Gateway、User Stream、Execution、Clearing 和 Monitor 组成。

当前核心约束:

  • 每个 deployment 固定绑定一个 trading account,禁止账户回退。
  • 策略意图、交易所订单 Attempt 和成交事实分层持久化。
  • User Stream 用于低延迟事件,REST 查询负责订单最终收敛。
  • 不确定发单先查询原 Client ID,只有确认不存在才允许创建新 Attempt。
  • 单账户多策略通过订单身份和成交分摊归属,仓位差异不允许自动猜测 owner。
  • Lifecycle 主单真实成交后才创建保护单,保护单也使用独立 Attempt 状态机。
  • 清算使用策略自己的成交成本账本,不直接采用共享账户的交易所 realized PnL。
  • 监控可有限重启进程,但不会自动修复不确定订单、仓位归属或历史 NAV。

文档入口

  1. 新部署或启动服务:快速开始
  2. Review 当前设计和代码:项目架构与生产就绪度
  3. 新 Codex 会话接手:项目上下文与会话交接
  4. 故障恢复:恢复手册
  5. 日常排障:故障排查手册
  6. 全部文档:文档索引

生产命令只维护在 docs/QUICKSTART.md 和脚本 service-control.sh、restart.sh 中,README 不再复制易过期的部署参数。