Real-time Binance Futures screener with order book density analysis, signal detection, and charting.
futures-screener/
├── server/ # Node.js Fastify API (port 3200)
│ ├── index.js # Main server, routes, Binance API integration
│ ├── signals.js # Signal engine (vol_spike, liq_sweep, oi_div, funding_squeeze)
│ ├── liq-sweep.js # Liquidity sweep detection (swing-only, volume gate)
│ ├── densityV2.js # Order book density V2 (adaptive buckets, σ walls)
│ ├── ws.js # WebSocket manager (Binance market streams)
│ ├── auth.js # JWT auth + Google OAuth
│ ├── push.js # Web Push notifications (VAPID)
│ ├── state.js # In-memory state management
│ ├── klines-cache.js # Kline cache layer
│ └── modules/ # Binance API wrapper, density detector/tracker
├── app/ # Frontend (vanilla JS, no framework)
│ ├── index.html # SPA entry
│ ├── app.js # Core UI logic
│ ├── mini-charts.js # LWC v5 charts (259KB, main visualization)
│ ├── signals.js # Signal UI
│ ├── settings.js # Settings panel (30+ options)
│ ├── drawing-manager.js # Chart drawing tools
│ └── sw.js # Service Worker (push + caching)
├── data/ # SQLite DBs (signals, push_subscriptions)
└── docs/ # VISION, ROADMAP, UI-SPEC, STATUS
cd /home/app/futures-screener
npm test # Run smoke tests
node server/index.js # Start server (or PM2: futures-screener)
pm2 start futures-screenerpm2 logs futures-screener --lines 50npm testnpx eslint server/ --ext .js (if configured)futures-screener.szhub.spaceconst > let, never var{ success: true, data: {} }[ISO timestamp] prefix| Signal | Logic | Confidence |
|---|---|---|
| vol_spike | Volume ≥5x 20-period avg | 40-100 |
| liq_sweep | Swing level + volume gate + OI drop | 35-100 |
| oi_divergence | Price/OI divergence (exhaustion/accumulation) | 40-100 |
| oi_funding_squeeze | OI spike + extreme funding (contrarian) | 40-100 |
/market/stream endpoint (not legacy /stream)tests/ directory is newSee .env.example — key ones: JWT_SECRET, VAPID_*, PORT (default 3200)
При команде "сохранись" ВСЕГДА обновить ВСЕ 5 мест:
/home/app/skills/futures-screener/SKILL.md) — параметры, версии, грабли/home/app/brain/decisions/log.md) — решение + причинаMEMORY.md) — краткая запись в Ключевые фактыНЕ ПРОПУСКАТЬ. Не спрашивать. Делать все 5 сразу.
| Dev (основной сервер) | Prod (Malaysia VPS) | |
|---|---|---|
| Домен | futures-screener.szhub.space |
screen.clkway.online |
| IP | 76.13.138.220:3200 | 72.62.247.119:3200 |
| Push | OFF | ON (только прод!) |
| Назначение | Разработка, тесты | Юзеры, стабильная версия |
./deploy-prod.sh (тесты → dry-run → confirm → rsync → pm2 restart → health check → log)deploys/log.txt — всегда видно что на продеrsync to prod + curl -X POST http://localhost:3200/api/reload-staticfastify.get('/file.js', ...) route + entry in STATIC_FILES arraySW_VER + CACHE_NAME in sw.js + ?v= in HTML script tagscurl on prod BEFORE confirming to user