Node.js API backend for cryptocurrency options data analysis. Fetches real-time options data from Binance, analyzes it, and provides actionable trading signals through REST API and WebSocket.
src/ ├── app.js — Express + WebSocket init ├── server.js — Entry point ├── config/index.js — Environment variables ├── services/ │ ├── binance.js — Binance API client │ ├── cache.js — In-memory cache with TTL │ ├── scheduler.js — Cron data refresh (5 min) │ └── db.js — Prisma client singleton ├── analysis/ │ ├── unusualVolume.js │ ├── topMovers.js │ ├── maxPain.js │ ├── ivAnalysis.js │ ├── putCallRatio.js │ ├── ivSkew.js │ ├── gammaPlay.js │ └── oiConcentration.js ├── routes/ │ ├── health.js │ ├── options.js │ └── signals.js ├── websocket/index.js └── middleware/ ├── auth.js └── rateLimit.js
Copy .env.example → .env and fill in values:
PORT — server port (default 8080)API_KEY — auth key for API requestsDATABASE_URL — PostgreSQL connection string (Prisma)NODE_ENV — production or developmentcd /opt/options-api # or wherever the repo lives
git pull origin master
npm install
pm2 restart options-api
pm2 logs options-api --lines 50
Check: curl https://options.szhub.space/health