Wire watcher into CONFIG + load env in npm scripts

- npm start / watch:telegram: add --env-file=env so TELEGRAM_* and HTTPS_PROXY from nv reach process.env
- watcher: import CONFIG.candleWindowMinutes from src/config.js so the per-window latch stays in sync with the bot
- watcher: replace prevSide/cooldown latch with lastSentWindowId keyed on floor(ts/WINDOW_MS); one alert per window, NO_TRADE rows no longer reset state
This commit is contained in:
2026-07-22 07:29:42 +08:00
parent 9c713ad3f6
commit c264ba4d47
2 changed files with 16 additions and 23 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
"type": "module",
"private": true,
"scripts": {
"start": "node src/index.js",
"watch:telegram": "node scripts/telegram-watcher.js"
"start": "node --env-file=env src/index.js",
"watch:telegram": "node --env-file=env scripts/telegram-watcher.js"
},
"dependencies": {
"ethers": "^6.11.1",