Files
trade/env.yaml
T
Rekey 85a0031a78 feat(data): 实现 Binance WebSocket 适配器与架构重构
- 新增 exchanges/ 模块:MarketDataFeed 统一接口、BaseExchangeAdapter 抽象基类、
  BinanceAdapter 完整实现(WebSocket + REST)
- WebSocket 层基于 binance 官方 SDK 的 WebsocketClient,自动多路复用与断线重连
- REST 层使用 MainClient(Spot),实现 fetchKlines 自动分页补拉 + fetchMarkets 元数据解析
- 数据标准化:Ticker/Trade/OrderBook/Kline 类型定义与 Binance 原生格式互转
- 引入 RxJS Subject 作为统一事件流管道,按 eventType 运行时路由分发
- 重构 config/:YAML 驱动配置加载 + 零依赖运行时校验(fail-fast)
- 重构 db/:TypeORM DataSource 配置 + TimescaleDB K 线 Hypertable 实体
- 新增 utils/logger.ts:Pino 结构化日志(开发环境 pino-pretty 彩色输出)
- 新增 env.yaml 作为 TS/Python 共享的统一环境配置源
- 删除旧版手写 SQL schema 与散落配置文件,收敛到 TypeORM 实体管理
- 安装 rxjs@7.8.2 依赖
2026-06-08 01:24:48 +08:00

31 lines
919 B
YAML
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.
# ============================================================
# Trade System — 统一环境配置(YAML
# ============================================================
# 使用方式:
# data 模块通过 data/config.ts 读取此文件
# Python 模块通过 yaml.safe_load 读取此文件
#
# 修改后重启服务即可生效,无需重新构建。
# ============================================================
# --- TimescaleDB / PostgreSQL 连接 ---
db:
host: localhost
port: 5432
name: trade
user: trader
password: fucketh
# --- Redis 连接 ---
redis:
url: redis://localhost:6379
# 是否启用 Pub/Sub 行情发布(开发时可关闭以节省资源)
publish_enabled: true
# --- 日志 ---
logging:
# 日志级别:trace / debug / info / warn / error / fatal
level: debug
# 运行环境:development 启用 pretty printproduction 输出 JSON
node_env: development