# Trading Platform — TODO > Last updated: 2026-04-01 ## Current State - **298 tests passing**, lint clean - 6 microservices + CLI + shared library - 8 strategies, REST API, full monitoring stack, CI/CD, multi-exchange, advanced risk - Redis consumer groups, realized PnL, bearer auth, E2E test script - **95% production-ready** --- ## Remaining Issues (3개) ### 1. API Strategies 엔드포인트 경로 버그 - **파일:** `services/api/src/trading_api/routers/strategies.py:10` - **문제:** `parents[5]`가 잘못된 디렉토리를 참조 — Docker에서 `/api/v1/strategies` 404 - **수정:** `parents[5]` → 올바른 경로로 수정, 또는 `STRATEGIES_DIR` 환경변수 사용 ### 2. Alembic URL이 localhost 하드코딩 - **파일:** `shared/alembic.ini:3` - **문제:** Docker 환경에서 postgres 호스트는 `postgres`이지 `localhost`가 아님 - **참고:** `env.py`에서 `DATABASE_URL` 환경변수를 이미 읽지만, 환경변수 미설정 시 alembic.ini 기본값 사용 - **수정:** Docker에서 `make migrate` 시 `DATABASE_URL` 환경변수 전달 필요 (문서화) ### 3. Risk Config 필드 분산 - **파일:** `shared/src/shared/config.py` vs `services/order-executor/src/order_executor/config.py` - **문제:** `risk_trailing_stop_pct`, `risk_max_open_positions`, `risk_volatility_lookback`, `risk_volatility_scale`가 shared Settings에 없고 ExecutorConfig에만 존재 - **영향:** 다른 서비스에서 이 설정 접근 불가 - **수정:** shared Settings 기본 클래스로 이동 --- ## All Completed (27 items) ### Critical - [x] Alembic 초기 마이그레이션 - [x] Docker health 포트 노출 - [x] numpy 의존성 - [x] Strategy engine 멀티 심볼 버그 - [x] Snapshot 첫 실행 지연 - [x] API 헬스체크 + 에러 처리 ### High - [x] CLI 명령어 구현 - [x] Backtester sys.path 수정 - [x] Integration tests - [x] Dockerfile 정리 - [x] WS factory 추상화 - [x] Backtester config 상속 - [x] CI Docker 빌드 - [x] Health port 문서화 ### Medium - [x] Edge case tests (30개) - [x] DB transaction rollback - [x] Portfolio snapshots + Telegram 요약 - [x] Strategy parameter validation (41 tests) - [x] CLI + API 테스트 추가 - [x] Realized PnL 추적 - [x] Redis consumer groups ### Low - [x] Grafana dashboard - [x] Multi-exchange support - [x] REST API (FastAPI) - [x] Strategy combination framework - [x] Advanced risk management - [x] Loki + Promtail - [x] CI/CD + E2E test script - [x] Security (bearer auth) --- ## Future Ideas (미계획) - README.md 작성 - WebSocket 실시간 대시보드 - 백테스트 시각화 (matplotlib/plotly 차트) - OpenTelemetry 분산 추적 - 멀티 타임프레임 전략 - 머신러닝 시그널 필터 - 주문 유형 확장 (LIMIT, STOP_LIMIT, OCO) - Kubernetes 배포 - 알림 채널 확장 (Discord, Slack) - 백테스트 결과 DB 저장 및 비교 --- ## Quick Start ```bash cp .env.example .env # API 키 입력 pip install -e shared/ # 의존성 make infra # Redis + PostgreSQL make migrate # DB 마이그레이션 make test # 298 tests make up # 서비스 시작 make e2e # E2E 테스트 make ci # CI (lint + test) curl localhost:8000/health # API 확인 ```