前端: 新增 RealTimeQuoteResponse 类型;新增 useRealtimeQuote Hook 并在报告页图表旁展示价格与时间戳(严格 TTL,无兜底)
FastAPI: 新增 GET /financials/{market}/{symbol}/realtime?max_age_seconds=.. 只读端点;通过 DataPersistenceClient 读取 Rust 缓存
Rust: 新增 realtime_quotes hypertable 迁移;新增 POST /api/v1/market-data/quotes 与 GET /api/v1/market-data/quotes/{symbol}?market=..;新增 DTO/Model/DB 函数;修正 #[api] 宏与路径参数;生成 SQLx 离线缓存 (.sqlx) 以支持离线构建
Python: DataPersistenceClient 新增 upsert/get 实时报价,并调整 GET 路径与参数
说明: TradingView 图表是第三方 websocket,不受我们缓存控制;页面数值展示走自有缓存通路,统一且可控。
17 lines
703 B
Plaintext
17 lines
703 B
Plaintext
# The port the server will listen on.
|
||
# If not set, defaults to 3000.
|
||
# Copy this file to .env and change the port if needed.
|
||
PORT=3001
|
||
HOST=0.0.0.0
|
||
|
||
# Local development database URL (TimescaleDB/PostgreSQL)
|
||
# Example below matches: docker run -p 15435:5432 -e POSTGRES_DB=fundamental -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres timescale/timescaledb:2.15.2-pg16
|
||
DATABASE_URL=postgres://postgres:postgres@127.0.0.1:15435/fundamental
|
||
|
||
# SQLx offline mode toggle. Set to true if you generated sqlx-data.json via `sqlx prepare`.
|
||
SQLX_OFFLINE=false
|
||
|
||
# 在测试/CI中跳过 HTTP 监听(默认不跳过)
|
||
# 置为 1/true/yes/on 时,main 不会绑定端口与监听
|
||
# SKIP_SERVER_LISTEN=true
|