A Node.js + TypeScript application that fetches live market data from Binance, computes a suite of technical indicators, caches the results in Redis, and serves them through a REST API, Server-Sent Events (SSE) stream, and a lightweight vanilla-JS dashboard located in public/.
• Real-time price feed – /ws SSE endpoint pushes ticks to the browser with sub-second latency.
• Indicator snapshots – /data/:symbol returns RSI, MACD, EMA/SMA, ATR, ADX, Ichimoku, Stochastic, OBV for 1 h / 4 h / 1 d / 1 w timeframes.
• Historical/back-testing – /historical-data/:symbol?timestamp=<ms> calculates indicators using historic candles so you can verify your strategies.
• Smart Redis cache – tunable TTL, background refresh, and force update on startup keep responses fast while respecting Binance rate limits.
• Typed from top to bottom – written in TypeScript for reliability, with strict mode enabled.
• Zero build step – run directly with ts-node; no JavaScript files are emitted.
| Method | Path | Description |
|---|---|---|
| GET | /symbols |
List all tradeable Binance symbols the server knows about |
| GET | /data/:symbol |
Latest indicator snapshot (cached) for the symbol |
| GET | /historical-data/:symbol?timestamp=MS |
Indicators calculated on candles ending at the given UNIX ms timestamp |
| GET | /ws |
Server-Sent Events stream with { symbol, price } objects |
All responses are JSON except /ws which is text/event-stream.
app_ti/
├── server.ts # Express entry point & routing
├── dataManager.ts # Fetch + indicator calculation logic
├── api.ts # Binance HTTP helper functions
├── public/ # Static dashboard (HTML/CSS/JS)
│ ├── index.html
│ ├── js/app.js
│ └── css/styles.css
├── package.json # Dependencies & npm scripts
└── tsconfig.json # TypeScript compiler options
- Node.js ≥ 18
- Redis ≥ 6 running locally on
redis://localhost:6379
git clone https://github.com/edkovalski/crypto_coins_technical_analysis.git
cd crypto_coins_technical_analysis
npm installnpx ts-node server.ts # quickest
# OR add a script then:
npm run dev # preferredThe server listens on http://localhost:3000. Open public/index.html in your browser (or serve / from Express) to view the dashboard.
Fine-tune cache behaviour in server.ts via the CACHE_CONFIG object:
const CACHE_CONFIG = {
INDICATOR_TTL: 300, // seconds
SIGNAL_TTL: 120,
UPDATE_THRESHOLD: 60, // refresh if < 1 min left
BACKGROUND_UPDATE: true,
FORCE_UPDATE_ON_START: true
} as const;Environment variables can override Redis URL (REDIS_URL) and server port (PORT).
- Type Safety – run
npx tsc --noEmitfor a type-check only pass. - Linting – integrate ESLint + Prettier if desired.
- Testing – Jest is a good fit for unit-testing indicator functions.
MIT © 2025 Your Name
A Next.js application for displaying cryptocurrency data and technical indicators.
- Real-time cryptocurrency data display
- Multiple timeframe support (1h, 4h, 1d)
- Technical indicators:
- RSI (Relative Strength Index)
- MACD (Moving Average Convergence Divergence)
- Stochastic Oscillator
- Ichimoku Cloud
- ATR (Average True Range)
- EMAs (Exponential Moving Averages)
- SMAs (Simple Moving Averages)
- OBV (On-Balance Volume)
- ADX (Average Directional Index)
- Search functionality
- Responsive design
- Node.js 18.x or later
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/crypto-dashboard-nextjs.git cd crypto-dashboard-nextjs -
Install dependencies:
npm install # or yarn install -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser to see the application.
src/app: Next.js app router pages and API routessrc/components: React componentssrc/types: TypeScript type definitionssrc/utils: Utility functions
The application currently uses mock data for demonstration purposes. To integrate with a real API:
- Update the
src/app/api/symbols/route.tsfile to fetch data from your backend. - Ensure the data structure matches the
SymbolDatainterface defined insrc/types/index.ts.
This project is licensed under the MIT License - see the LICENSE file for details.