arbitrage-engine/backend/trade_config.py
root 8694e5cf3a fix: 审阅P1/P2/P3全部修复
P1-1: exit_price按reduceOnly过滤平仓成交+加权平均价
P1-2: 资金费率窗口对齐8h结算周期(0/8/16 UTC),防双累加
P2-2: emergency文件先执行操作+写state再删除,消除TOCTOU
P2-3: API恢复auto_resume排除日限亏损/人工熔断
P2-4: fee汇总窗口从entry_ts-200ms起算(与P1-1一起修)
P3-1: SYMBOL_PRECISION提取到trade_config.py共用模块
P3-2: main.py 4处hardcoded risk_usd=2改为从live_config读
P3-3: CORS限制为arb.zhouyangclaw.com+localhost
P3-4: 三进程加RotatingFileHandler(10MB×5轮转)
2026-03-02 14:04:33 +00:00

15 lines
574 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""交易配置常量 — 所有实盘模块共用"""
SYMBOLS = ["BTCUSDT", "ETHUSDT", "XRPUSDT", "SOLUSDT"]
# 币安合约精度qty=数量小数位, price=价格小数位, min_notional=最小名义价值)
SYMBOL_PRECISION = {
"BTCUSDT": {"qty": 3, "price": 1, "min_notional": 100},
"ETHUSDT": {"qty": 3, "price": 2, "min_notional": 20},
"XRPUSDT": {"qty": 0, "price": 4, "min_notional": 5},
"SOLUSDT": {"qty": 2, "price": 4, "min_notional": 5},
}
# qty精度快捷查询
SYMBOL_QTY_PRECISION = {sym: p["qty"] for sym, p in SYMBOL_PRECISION.items()}