Fundamental_Analysis/services/data-persistence-service/env.sample
Lv, Qi 21155bc4f8 feat(realtime): 接入前端实时报价并完善后端缓存
前端: 新增 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,不受我们缓存控制;页面数值展示走自有缓存通路,统一且可控。
2025-11-09 05:12:14 +08:00

17 lines
703 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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