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:
+2
-2
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user