31ece2e99a
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
AI ICT
AI ICT 交易辅助系统第一阶段工程实现。
当前项目已经具备从数据、结构、信号、执行、回测到报告的最小闭环,并提供轻量查询 API、HTTP 调试服务与一键编排入口。
See docs/ for architecture, database, rule, and migration references.
Current closed loop
当前主线可运行链路:
OKX -> candles -> market_sessions -> swings -> dealing_ranges -> liquidity_pools -> sweep_events -> displacement_events -> MSS -> FVG -> bias_snapshots -> trade_signals -> trade_executions -> backtest_runs -> backtest_results -> reports
Runtime utility scripts
python3 scripts/run_dev.py- run the scaffold entrypointpython3 scripts/show_models.py- list exported ORM model namespython3 scripts/check_db.py- run a simple database connectivity checkpython3 scripts/run_migrations.py- apply SQL files inmigrations/orderpython3 scripts/run_okx_backfill.py- fetch and write sample OKX candlespython3 scripts/run_session_generator.py- generate market sessionspython3 scripts/run_swings.py- rebuild swingspython3 scripts/run_ranges.py- rebuild dealing rangespython3 scripts/run_liquidity.py- rebuild liquidity poolspython3 scripts/run_sweeps.py- rebuild sweep eventspython3 scripts/run_displacement.py- rebuild displacement eventspython3 scripts/run_mss.py- rebuild MSS structure eventspython3 scripts/run_fvg.py- rebuild FVG zonespython3 scripts/run_signals.py- generate bias and signalspython3 scripts/run_execution.py- run paper execution gating and create an execution recordpython3 scripts/run_backtest.py- run backtest and write resultspython3 scripts/run_reports.py- build sample reports from current servicespython3 scripts/run_api_server.py- start a lightweight HTTP API server on127.0.0.1:8000python3 scripts/run_pipeline.py- run the current end-to-end closed loop and print a structured summary
Lightweight API helpers
The src/api/ package exposes internal query helpers and HTTP routes for:
GET /healthGET /candles?instrument_id=1&timeframe=1m&limit=100GET /sessions?instrument_id=1&limit=20GET /signals?instrument_id=1&limit=20GET /backtests?instrument_id=1&limit=10
Validation
Unit tests:
python3 -m unittest discover -s tests/unit -p "test_*.py"