Skip to content

gabrielee5/live-crypto-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

40 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Bybit WebSocket Dashboard

Real-time Cryptocurrency Trading Intelligence

Professional-grade market data visualization powered by Bybit's V5 WebSocket API

Node.js WebSocket License

Dashboard Screenshot

Live orderbook depth โ€ข Real-time candlesticks โ€ข Liquidation feeds โ€ข Professional interface


๐Ÿš€ Overview

The dashboard offers a professional-grade interface for monitoring cryptocurrency markets with real-time data streams. Built with Node.js and vanilla JavaScript, it provides a lightweight yet powerful solution for traders and developers who need instant access to market data without the complexity of trading execution.

๐Ÿ’น
Live Market Data
Real-time price feeds
๐Ÿ“ˆ
Interactive Charts
Customizable timeframes
โšก
Low Latency
Direct WebSocket connection
๐Ÿ”„
Auto-Reconnect
Robust error handling

โœจ Key Features

๐Ÿ“Š Real-time Market Data
  • ๐Ÿ”ฅ Live Orderbook: 50-level depth orderbook displaying bid and ask prices with volume information
  • ๐Ÿ“ˆ Candlestick Charts: Real-time OHLC (Open, High, Low, Close) data with customizable timeframes
  • ๐Ÿ’ฅ Liquidation Feed: Live stream of liquidation events showing position closures and market sentiment
  • ๐Ÿ“Š Price Statistics: Current price, 24-hour change percentage, bid-ask spread, and trading volume
๐ŸŽฎ Interactive Controls
  • ๐Ÿ”„ Dynamic Symbol Switching: Change between any Bybit USDT perpetual contracts (BTCUSDT, ETHUSDT, SOLUSDT, etc.)
  • โฑ๏ธ Timeframe Selection: Multiple candlestick intervals from 1-minute scalping to daily analysis
  • ๐ŸŒ Environment Toggle: Switch between live mainnet data and testnet for development/testing
  • ๐Ÿ” Auto-reconnection: Robust WebSocket connection management with automatic retry logic
โš™๏ธ Technical Capabilities
  • ๐Ÿ”Œ WebSocket Integration: Direct connection to Bybit V5 public API endpoints
  • โšก Low Latency Updates: Optimized data processing for minimal delay
  • ๐Ÿ“ฑ Responsive Design: Adaptive interface that works on desktop and mobile devices
  • ๐Ÿง  Memory Management: Efficient data buffering with automatic cleanup to prevent memory leaks
  • ๐Ÿ›ก๏ธ Error Handling: Comprehensive error recovery and connection status monitoring

๐Ÿš€ Quick Start

Get up and running in under 2 minutes!

โœ… Prerequisites

  • Node.js 16+ - Download here
  • Internet connection - For WebSocket data streams

๐Ÿ“ฆ Installation

Step 1: Clone & Navigate

git clone <repository-url>
cd live-market-dashboard

Step 2: Install Dependencies

npm install

Step 3: Launch Dashboard

npm start

Step 4: Open in Browser

๐ŸŒ http://localhost:3000
๐ŸŽ‰ That's it! Your dashboard is now live and streaming real-time market data.

๐Ÿ–ฅ๏ธ Dashboard Interface

๐Ÿ“‹ Orderbook Panel

Real-time market depth

๐Ÿ”ด Ask Orders - Sell orders ๐ŸŸข Bid Orders - Buy orders ๐Ÿ“Š 50 Levels - Full market depth ๐Ÿ’ฐ Live Spread - Real-time calculation

๐Ÿ“ˆ Candlestick Chart

Live price action

๐Ÿ•ฏ๏ธ OHLC Data - Complete price info ๐Ÿ“Š Volume Bars - Trading activity โšก Real-time - Live updates ๐ŸŽจ Color Coded - Bull/bear visualization

๐Ÿ’ฅ Liquidation Feed

Market sentiment tracker

โš”๏ธ Long/Short - Position details ๐Ÿ’Ž Size Categories - Smart formatting โฐ Timestamps - Event timing ๐Ÿšจ Impact Levels - Visual indicators

๐Ÿช™ Supported Markets

All Bybit USDT Perpetual Contracts Supported

Category Examples Focus
๐Ÿฅ‡ Major Cryptos BTC, ETH, SOL, ADA, DOT, AVAX, MATIC Market leaders
๐Ÿ”ฅ DeFi Tokens UNI, LINK, AAVE, COMP, SUSHI, CRV Decentralized finance
๐Ÿš€ Meme Coins DOGE, SHIB, PEPE, FLOKI Community driven
โญ Emerging Assets Hundreds of other pairs New opportunities

โฐ Timeframe Options

โšก Scalping
1m โ€ข 3m โ€ข 5m
High-frequency
๐Ÿ“Š Intraday
15m โ€ข 30m
Day trading
๐Ÿ“ˆ Swing
1h โ€ข 4h
Medium-term
๐ŸŽฏ Position
1D
Long-term trends

โš™๏ธ Configuration

๐Ÿ”ง Quick Configuration

Environment Variables

PORT=3000                    # Server port (default: 3000)

๐ŸŽฏ Default Settings

Setting Value Description
๐ŸŽฏ Initial Symbol BTCUSDT Starting trading pair
โฑ๏ธ Default Timeframe 5 minutes Chart interval
๐ŸŒ Environment Mainnet Live data feed
๐Ÿ’ฅ Max Liquidations 100 events Memory limit
๐Ÿ“Š Max Candles 100 periods Chart history

๐Ÿ‘จโ€๐Ÿ’ป Development

๐Ÿ› ๏ธ Local Development Setup

npm install
cp config.example.json config.json  # Create your config file
npm run dev

๐Ÿ“‹ Advanced Configuration

The application uses a JSON configuration file to store user preferences and settings. When you first run the application, it will automatically create a config.json file from the default settings.

Configuration File Setup

  1. Copy the example configuration:

    cp config.example.json config.json
  2. Customize your settings in config.json:

{
  "appearance": {
    "theme": "dark"                    // UI theme: "dark" or "light"
  },
  "trading": {
    "defaultSymbol": "BTCUSDT",        // Initial trading pair to load
    "defaultInterval": "5",            // Default chart timeframe, format: 1, 3, 5, 15, 60, 240, D, W, M
    "bigTradesFilter": 50000,          // Minimum USD value for big trades alert
    "whaleThreshold": 500000,          // USD threshold for whale trade classification
    "blockTradeThreshold": 1000000,    // USD threshold for block trade classification
    "alarmEnabled": false              // Audio alert for significant events
  },
  "display": {
    "maxTradesHistory": 100            // Maximum number of trades to keep in memory
  },
  "symbols": {
    "favorites": ["BTCUSDT", "ETHUSDT"], // Quick-access favorite trading pairs
    "recent": []                        // Recently viewed symbols (auto-populated)
  },
  "network": {
    "isTestnet": false                 // Use Bybit testnet instead of mainnet
  }
}

Configuration API

The application provides REST endpoints to modify configuration at runtime:

  • GET /api/config - Get current configuration
  • PUT /api/config/:path - Update specific setting (e.g., /api/config/appearance.theme)
  • POST /api/config - Update multiple settings
  • POST /api/config/reset - Reset to default configuration

Settings are automatically saved and persist between application restarts.

๐Ÿ—‚๏ธ Project Structure

๐Ÿ“ฆ live-market-dashboard
โ”œโ”€โ”€ ๐Ÿ–ฅ๏ธ  server.js              # Express server with Socket.io
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿ”Œ websocket-client.js # Bybit WebSocket connection
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š orderbook-manager.js # Orderbook data processing
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ˆ kline-manager.js    # Candlestick data handling
โ”‚   โ””โ”€โ”€ ๐Ÿ’ฅ liquidation-manager.js # Liquidation processing
โ”œโ”€โ”€ ๐Ÿ“ public/
โ”‚   โ”œโ”€โ”€ ๐ŸŒ index.html         # Frontend interface
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ style.css          # Dashboard styling
โ”‚   โ””โ”€โ”€ โšก app.js             # Client-side logic
โ””โ”€โ”€ ๐Ÿ“‹ package.json           # Dependencies and scripts

๐Ÿ”Œ API Integration

Direct connection to Bybit's V5 WebSocket API

Environment Endpoint Purpose
๐ŸŒ Mainnet wss://stream.bybit.com/v5/public/linear Live trading data
๐Ÿงช Testnet wss://stream-testnet.bybit.com/v5/public/linear Development/testing

๐Ÿ“ก Subscribed Topics

  • ๐Ÿ“Š orderbook.50.{SYMBOL} - 50-level orderbook updates
  • ๐Ÿ“ˆ kline.{INTERVAL}.{SYMBOL} - Real-time candlestick data
  • ๐Ÿ’ฅ allLiquidation.{SYMBOL} - Complete liquidation events

๐Ÿ› ๏ธ Troubleshooting

โš ๏ธ Common Issues & Solutions
Issue Solution
๐Ÿ”Œ Connection Problems Verify internet connectivity and Bybit API status
๐Ÿ”ค Symbol Errors Use correct format: BTCUSDT (not BTC/USDT)
๐ŸŒ Performance Issues Close unnecessary browser tabs, check system resources
โฑ๏ธ Data Delays Allow 30-60 seconds for initial data population

๐Ÿ“„ License

MIT License - Feel free to use and modify


Made with โค๏ธ for the crypto trading community


Star this repo

About

Dashboard showing live market data with focus on liquidations and big trades, with an appealing style for the orderbook. Connects to the Bybit Websocket

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors