Files
stock/backend/.env.example
T
2026-08-15 08:57:15 +08:00

41 lines
1.5 KiB
Bash
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.
# ---- Database(开发、测试、生产都使用 PostgreSQL)----
DATABASE_URL=postgresql+asyncpg://user:password@host:5432/stock
# ---- Authentication ----
# 本地 HTTP 开发为 false;线上 HTTPS 必须为 true。
AUTH_COOKIE_SECURE=false
AUTH_SESSION_HOURS=12
AUTH_MAX_FAILED_LOGINS=5
AUTH_LOCK_MINUTES=15
AUTH_MIN_PASSWORD_LENGTH=12
CORS_ORIGINS=http://localhost:5173
# 生产建议 false,关闭 /docs 与 /openapi.json。
EXPOSE_API_DOCS=true
# ---- 真实数据源(Tushare Pro;免费版即可)----
TUSHARE_TOKEN=你的token
DATA_ADJUST=qfq # 复权:qfq 前复权 / hfq 后复权 / 留空不复权
DATA_DEFAULT_START=20200101
# ---- LLM(智能选股;OpenAI 兼容协议,任选一家)----
# 留空则智能选股不可用,其余功能不受影响。
# 智谱 GLM(key 在 https://bigmodel.cn 获取,格式 id.secret)
LLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4
LLM_API_KEY=你的key
LLM_MODEL=glm-5.2
# 或 DeepSeek:把上面三行换成
# LLM_BASE_URL=https://api.deepseek.com
# LLM_MODEL=deepseek-chat
# ---- 智能选股(可选覆盖)----
# SCREENER_MARKET_DAYS=90 # 全市场同步窗口(交易日数)
# SCREENER_SYNC_INTERVAL=0.35 # 同步调用间隔(秒),Tushare 控频
# ---- A股交易成本(基准日 2026-08,可覆盖;详见 app/commission.py)----
# STAMP_DUTY_RATE=0.0005 # 印花税 0.05%,单边卖出
# TRANSFER_FEE_RATE=0.00001 # 过户费 0.001%,沪深双边
# COMMISSION_RATE=0.0001 # 佣金 万1
# COMMISSION_MIN=5.0 # 最低 5 元