-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.template
More file actions
126 lines (111 loc) · 6.83 KB
/
Copy path.env.template
File metadata and controls
126 lines (111 loc) · 6.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# ── Service ports (internal; not exposed to host when running behind Traefik) ──
MARKET_SIM_PORT=5000
EMS_PORT=5001
OMS_PORT=5002
ALGO_TRADER_PORT=5003
TWAP_ALGO_PORT=5004
POV_ALGO_PORT=5005
VWAP_ALGO_PORT=5006
OBSERVABILITY_PORT=5007
FRONTEND_PORT=8080
# ── Inter-service hostnames ────────────────────────────────────────────────────
# Dev Container (supervisord): leave as "localhost"
# Docker Compose (compose.yml): these are set automatically via the compose
# environment blocks — no need to set them here for deployed environments.
MARKET_SIM_HOST=localhost
EMS_HOST=localhost
OMS_HOST=localhost
ALGO_HOST=localhost
OBSERVABILITY_HOST=localhost
# ── Algo tuning ───────────────────────────────────────────────────────────────
TWAP_INTERVAL_MS=5000
POV_PERCENTAGE=10
POV_MIN_SLICE=10
POV_MAX_SLICE=5000
# ── EMS fill model ────────────────────────────────────────────────────────────
# Max fraction of tick volume that can be filled in one EMS call (0.0–1.0)
EMS_PARTICIPATION_CAP=0.20
# Market impact in basis points per 1,000 shares filled
EMS_IMPACT_PER_1000_BPS=1.0
# ── VWAP tuning ───────────────────────────────────────────────────────────────
# Number of market ticks used in the rolling VWAP window
VWAP_WINDOW_TICKS=20
# ── Time scale ────────────────────────────────────────────────────────────────
# 1 real second = TIME_SCALE simulated market-minutes
# Default 60 → full NYSE day (~390 minutes) completes in ~390 real seconds
TIME_SCALE=60
# ── Journal data retention ────────────────────────────────────────────────────
# Days of trade events to retain. Pruned daily on startup + every 24h.
JOURNAL_RETENTION_DAYS=90
# ── LLM Advisory (Ollama) ─────────────────────────────────────────────────────
# Uses an Ollama instance for inference — no external API key required.
# Set LLM_ENABLED=false to disable the advisory subsystem entirely.
LLM_ENABLED=true
LLM_WORKER_ENABLED=true
LLM_PROVIDER=ollama
LLM_TRIGGER_MODE=on-demand-ui
# Default: a small model on the local docker-compose Ollama service.
# Override on the homelab to use the NVIDIA Spark's hosted models, e.g.
#
# LLM_OLLAMA_BASE_URL=http://192.168.1.204:11434
# LLM_MODEL_ID=qwen3-coder:30b # current-gen MoE coder, fits ~19 GB
# LLM_MODEL_ID=gpt-oss:120b # heavy reasoning, ~65 GB
# LLM_MODEL_ID=deepseek-r1:70b # chain-of-thought, ~43 GB
#
# Dev container default: http://localhost:11434
# Docker Compose default: http://ollama:11434 (overridable via env)
LLM_MODEL_ID=qwen2.5:3b
LLM_OLLAMA_BASE_URL=http://localhost:11434
# ── Market data feed API keys ─────────────────────────────────────────────────
# Optional. Services fall back to synthetic data if keys are not set.
#
# Finnhub (https://finnhub.io) — free tier, 60 req/min
# Used by: market-data-adapters (real earnings + economic calendar)
# FINNHUB_KEY=your_key_here
#
# FRED (https://fred.stlouisfed.org/docs/api/) — free, no rate limit
# Used by: analytics-service (real US Treasury yield curve)
# Used by: market-data-service (GET /fred/yield-curve endpoint)
# FRED_KEY=your_key_here
#
# Tiingo (https://api.tiingo.com) — free tier, daily equity + FX quotes
# Used by: market-data-service (real equity and FX prices)
# TIINGO_KEY=your_key_here
#
# Polygon.io (https://polygon.io) — free tier: 15-min delayed WebSocket streaming
# Used by: market-data-service (streaming equity quotes)
# POLYGON_KEY=your_key_here
# ── Alerts ────────────────────────────────────────────────────────────────────
# Discord webhook for platform + user alerts. Set on the homelab host (.env
# at /opt/stacks/veta/) and Grafana's contact-point will route CRITICAL +
# WARNING alerts here. The frontend alertsMiddleware also POSTs user-level
# events (kill switch, order rejected) via the gateway, which fans out to
# the same webhook for severities >= WARNING.
#
# Rotate the webhook URL in the Discord channel settings if it leaks.
# DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/XXXX/YYYY
# Dedicated webhook for user-submitted bug reports. POST to /api/gateway/bug-report
# routes here. Falls back to DISCORD_WEBHOOK_URL if unset. Keep these in separate
# Discord channels so ops alerts and user bug reports don't drown each other.
# DISCORD_BUG_WEBHOOK_URL=https://discord.com/api/webhooks/XXXX/YYYY
# Bot token for the discord-bot service, which posts a welcome message when a
# new member joins the Discord server. Requires a Discord application with the
# privileged "Server Members Intent" enabled and a bot invited to the server
# with permission to view + send messages in the welcome channel. Different
# credential type to the webhooks above. This is a bot token, not a webhook
# URL. Rotate via the Discord Developer Portal if it leaks.
# DISCORD_BOT_TOKEN=your_bot_token_here
# DISCORD_WELCOME_CHANNEL_ID=your_channel_id_here
# ── Authentication ────────────────────────────────────────────────────────────
# When true, the LoginPage "Create account" form is reachable. New users land
# as `trader` with starter limits (max order $10k, daily notional $1M, basic
# strategies). Passwords are PBKDF2-hashed and stored in users.users. Set
# false on deployments where account self-service should not be allowed.
# OAUTH_ALLOW_PUBLIC_REGISTER=true
# When true, anonymous clients can sign in as a guest user via /oauth/guest.
# Guests get a short-lived ephemeral session, rate-limited at the gateway.
# Independent of OAUTH_ALLOW_PUBLIC_REGISTER.
# PUBLIC_GUEST_TRADING=false
# ── Build metadata ────────────────────────────────────────────────────────────
# Set automatically by the pre-commit hook and CI — do not set manually
COMMIT_SHA=dev