目录

Market Backend (Polygon)

Real-time sector metrics (New Highs / New Lows / ADR%) streamed to your dashboard.

Quick start

cp .env.example .env
# put your Polygon key in .env

npm install
npm start

REST

  • GET /api/health
  • GET /api/market-metrics

WebSocket

  • Connect to ws://localhost:5055 and listen for { type: "metrics", payload }

Config

  • TIMEFRAME_SEC (default 300 = 5m) affects recompute cadence.
  • LOOKBACK_DAYS default 20 for NH/NL and ADR windows.
  • Edit data/sectors.json to change sector constituents.

Notes

  • Uses Polygon aggregate (A.*) WS to update today’s daily bars on the fly.
  • Nightly job refreshes historical baselines.
  • Optional Redis cache if you set REDIS_URL.
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号