feat(api): real klines/trades from indexer + auto table creation
- charts.py: serve OHLCV bars & trades from Postgres (klines/trades tables written by indexer), no synthetic data - entities.py: add TradeModel/KlineModel matching indexer schema - main.py: idempotent create_all on startup - config.py: unify default DATABASE_URL with docker-compose/indexer
This commit is contained in:
+2
-2
@@ -9,8 +9,8 @@ class Settings(BaseSettings):
|
||||
# 环境:development, staging, production
|
||||
ENVIRONMENT: str = "development"
|
||||
|
||||
# 数据库配置 (PostgreSQL)
|
||||
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/wtfx"
|
||||
# 数据库配置 (PostgreSQL) — 与 docker-compose / indexer 保持一致
|
||||
DATABASE_URL: str = "postgresql+asyncpg://wtfx_user:wtfx_pass@localhost:5432/wtfx_db"
|
||||
|
||||
# Redis 配置
|
||||
REDIS_URL: str = "redis://localhost:6379/0"
|
||||
|
||||
Reference in New Issue
Block a user