fix: resolve 8 critical issues from code review
C1: Fix BacktestDataLoader constructor args (was passing wrong kwargs) C2: Fix BacktestResult attribute names (max_drawdown_pct, avg_hold_duration) C3: Remove insecure JWT secret default (now required via env var) C4: Fix .env.example to use TRADING_ prefix for all config vars C5: Add missing fields to portfolio endpoint (daily_pnl_pct, total_pnl, trading_active) C6: Add missing /portfolio/metrics endpoint C7: Add 'value' field to equity curve response for frontend compatibility C8: Add 6M/ALL periods and case-insensitive period enum parsing Also: make app creation lazy to avoid config validation at import time
This commit is contained in:
parent
870961f3e9
commit
2a56727267
5 changed files with 103 additions and 27 deletions
|
|
@ -10,8 +10,8 @@ class ApiGatewayConfig(BaseConfig):
|
|||
prefixed with ``TRADING_``.
|
||||
"""
|
||||
|
||||
# JWT settings
|
||||
jwt_secret_key: str = "CHANGE-ME-IN-PRODUCTION"
|
||||
# JWT settings — TRADING_JWT_SECRET_KEY must be set in environment
|
||||
jwt_secret_key: str
|
||||
jwt_algorithm: str = "HS256"
|
||||
access_token_expire_minutes: int = 15
|
||||
refresh_token_expire_days: int = 7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue