移除 Redis、精简配置,新增 Docker 支持
- position_closer: 去掉 Redis 依赖,平仓条件仅名义+未实现盈亏 - requirements: 移除 redis - settings.toml: 仅保留实际使用的配置项 - 新增 Dockerfile(仅安装依赖)、docker-compose(挂载代码与配置) - 新增 .dockerignore、.gitignore(含 nohup.log) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
settings.toml
Normal file
21
settings.toml
Normal file
@@ -0,0 +1,21 @@
|
||||
# 币安永续合约定时平仓 - 配置
|
||||
# Dynaconf 加载顺序:环境变量 > .secrets.toml > 本文件
|
||||
# 敏感项(binance_api_key / binance_api_secret)请放在 .secrets.toml
|
||||
|
||||
# ---------- 币安 ----------
|
||||
binance_api_key = ""
|
||||
binance_api_secret = ""
|
||||
# 合约 API 地址,含 testnet 则使用测试网
|
||||
binance_base_url = "https://fapi.binance.com"
|
||||
|
||||
# ---------- 平仓条件 ----------
|
||||
# 多空名义价值总和 ≤ 此值(USDT)且未实现盈亏 > close_min_profit 时平仓
|
||||
notional_close_threshold = 20
|
||||
# 未实现盈亏须大于此值(USDT)才平仓
|
||||
close_min_profit = 0.05
|
||||
|
||||
# ---------- 其他 ----------
|
||||
# true=仅跑流程不真实下单;false 或环境变量 DRY_RUN=0 时真实下单
|
||||
dry_run = true
|
||||
# WebSocket 建立连接超时(秒)
|
||||
ws_connection_timeout = 30
|
||||
Reference in New Issue
Block a user