Add config.json.example template; gitignore config.json

Claude-Session: https://claude.ai/code/session_01VPNF37MP9Kuv62B1VBrZ1b
This commit is contained in:
Harwinder Sekhon
2026-07-21 12:32:28 -04:00
parent 096b69686d
commit 1a141abc7c
3 changed files with 28 additions and 3 deletions
+1
View File
@@ -1,6 +1,7 @@
# Secrets # Secrets
.env .env
.env.local .env.local
config.json
# Editor / tooling # Editor / tooling
.claude/ .claude/
+24
View File
@@ -0,0 +1,24 @@
{
"telegram": {
"token": "123456789:REPLACE_WITH_YOUR_BOT_TOKEN",
"chat_id": "REPLACE_WITH_OWNER_CHAT_ID",
"channel_id": "-100REPLACE_WITH_CHANNEL_ID_OR_EMPTY_STRING",
"alert_min_quality": "C"
},
"data_providers": {
"active": "twelve_data",
"twelve_data": {
"api_key": "REPLACE_WITH_YOUR_TWELVE_DATA_API_KEY"
}
},
"scanning": {
"pairs": ["XAU/USD"],
"timeframes": ["M5", "M15", "H1", "H4"]
},
"pairs": {
"XAU/USD": {
"blocked_hours_utc": [0, 1, 2, 10, 11, 13, 16, 21]
}
},
"log_level": "INFO"
}
@@ -18,7 +18,7 @@ test-enforced (see Testing).
## Scoping decisions (user-confirmed 2026-07-21) ## Scoping decisions (user-confirmed 2026-07-21)
1. **Secrets live in config.json** (gitignored). A committed 1. **Secrets live in config.json** (gitignored). A committed
`config.example.json` carries placeholders. Env vars still override. `config.json.example` carries placeholders. Env vars still override.
The hardcoded credential fallbacks in `config.py` and `telegram_bot.py` The hardcoded credential fallbacks in `config.py` and `telegram_bot.py`
are **deleted** — on a machine with neither config.json nor env vars, the are **deleted** — on a machine with neither config.json nor env vars, the
bot refuses to start with an explicit error instead of silently using bot refuses to start with an explicit error instead of silently using
@@ -39,7 +39,7 @@ test-enforced (see Testing).
## File schema ## File schema
`config.json` (gitignored; `config.example.json` committed with placeholders `config.json` (gitignored; `config.json.example` committed with placeholders
for secrets and today's tuned values for everything else): for secrets and today's tuned values for everything else):
```json ```json
@@ -128,7 +128,7 @@ block + one adapter class registered here. No shared base class extracted now
- Create the local `config.json` populated with the **current live values** - Create the local `config.json` populated with the **current live values**
(the ones being deleted from source) so the running bot keeps working (the ones being deleted from source) so the running bot keeps working
unchanged. `.gitignore` gains `config.json`. unchanged. `.gitignore` gains `config.json`.
- Commit `config.example.json` with placeholders. - Commit `config.json.example` with placeholders.
- CLAUDE.md: update the env-var table, repository map, and config section. - CLAUDE.md: update the env-var table, repository map, and config section.
- Post-merge recommendation (user action): rotate the Telegram token and - Post-merge recommendation (user action): rotate the Telegram token and
Twelve Data key, since both are in git history. Twelve Data key, since both are in git history.