Configuration Reference
All configuration is via environment variables, typically in a .env file in your working directory. Run edgeproof init to generate it interactively.
Broker
| Variable |
Default |
Description |
BROKER |
alpaca |
Broker to use. Only alpaca is supported at MVP. |
Alpaca
| Variable |
Default |
Description |
APCA_API_KEY_ID |
(required) |
Alpaca API key ID |
APCA_API_SECRET_KEY |
(required) |
Alpaca API secret key |
ALPACA_PAPER_TRADE |
True |
Set False for live trading (requires license) |
APCA_API_BASE_URL |
auto |
Override broker URL (paper or live) |
Discord Source
| Variable |
Default |
Description |
DISCORD_SOURCE_MODE |
puppeteer |
puppeteer (browser scraping) or bot (Gateway API) |
DISCORD_CHANNEL_URL |
(empty) |
Single channel URL (puppeteer mode) |
DISCORD_CHANNEL_URLS |
(empty) |
Comma-separated channel URLs (puppeteer mode) |
DISCORD_BOT_TOKEN |
(optional) |
Discord bot token (bot mode) |
DISCORD_CHANNEL_IDS |
(empty) |
Comma-separated channel IDs (bot mode) |
DISCORD_CHANNEL_FILTERS |
(empty) |
Only process messages matching these keywords |
DISCORD_MAX_MESSAGE_LENGTH |
500 |
Skip messages longer than this |
CHROME_DEBUGGING_URL |
http://localhost:9222 |
Chrome DevTools endpoint (puppeteer mode) |
LLM
| Variable |
Default |
Description |
LLM_PROVIDER |
ollama |
ollama, lmstudio, or openai-compatible |
OLLAMA_BASE_URL |
http://localhost:11434/v1 |
Ollama endpoint |
OLLAMA_MODEL |
gemma4:latest |
Ollama model name |
LMSTUDIO_BASE_URL |
http://localhost:1234/v1 |
LM Studio endpoint |
LMSTUDIO_MODEL |
gemma-4-26b-a4b-it |
LM Studio model name |
LMSTUDIO_TIMEOUT_MS |
180000 |
Per-completion timeout for slow local models |
LLM_API_BASE_URL |
https://api.openai.com/v1 |
OpenAI-compatible base URL |
LLM_API_KEY |
(empty) |
API key for OpenAI-compatible endpoint |
LLM_MODEL |
(empty) |
Model name for OpenAI-compatible endpoint |
Trading Guardrails
| Variable |
Default |
Description |
TRADING_POSITION_SIZE_USD |
500 |
Dollar budget per position; qty = floor(budget / (price × 100)) |
TRADING_MAX_CONTRACTS_PER_UNDERLYING |
2 |
Max open contracts on a single underlying |
TRADING_SLIPPAGE_PCT |
0.07 |
Max slippage tolerance (7%) for limit order placement |
TRADING_HARD_CAP_PCT |
0.10 |
Skip buy if market price is >10% above signal entry |
TRADING_MAX_SIGNAL_AGE_MINUTES |
60 |
Discard signals older than this |
TRADING_LOOKBACK_DAYS |
14 |
Lookback window for dedup and P&L queries |
MONITOR_INTERVAL_MINUTES |
0.5 |
How often the monitor checks for new signals |
Position Exit Rules
| Variable |
Default |
Description |
POSITIONS_DEFAULT_TAKE_PROFIT_PERCENT |
75 |
Close at +75% gain |
POSITIONS_DEFAULT_STOP_LOSS_PERCENT |
-50 |
Close at −50% loss |
POSITIONS_DEFAULT_TRAILING_STOP_PERCENT |
40 |
Trailing stop: close if price falls 40% from peak |
POSITIONS_DEFAULT_TRAILING_STOP_ACTIVATION_PERCENT |
30 |
Trailing stop activates after +30% gain |
POSITIONS_DEFAULT_MAX_HOLD_HOURS |
150 |
Force-close after this many hours |
POSITIONS_POLL_INTERVAL_MS |
10000 |
How often positions are polled |
Notifications
| Variable |
Default |
Description |
TELEGRAM_BOT_TOKEN |
(optional) |
Telegram bot token for trade alerts |
TELEGRAM_CHAT_ID |
(optional) |
Telegram chat/channel ID |
Streaming
| Variable |
Default |
Description |
STREAMING_ENABLED |
true |
Enable WebSocket streaming for real-time position updates |
STREAMING_OPTIONS_FEED |
indicative |
indicative (free) or opra (subscription required) |
Licensing
| Variable |
Default |
Description |
LICENSING_WORKER_BASE_URL |
https://edgeproof.net |
Override for testing |
Output
| Variable |
Default |
Description |
OUTPUT_DIRECTORY |
./output |
Directory for logs, trade database, PID file |
Privacy
| Variable |
Default |
Description |
EDGEPROOF_NO_UPDATE_CHECK |
(unset) |
Set to 1 to disable the daily version check |