Skip to content

Real-time crypto ticker and local home-miner monitor for Raspberry Pi using TFT/HDMI display: Prices, candlestick chart, miners hashrate, curve and BTC network stats in one dashboard.

License

Notifications You must be signed in to change notification settings

DozNot/rpi-crypto-ticker-display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Crypto Ticker & Local Home-Miner Monitor

for Raspberry Pi TFT/HDMI Displays

Raspberry Pi Python Pygame License: MIT

RPi Crypto Ticker in action

Real-time prices, candlestick chart, local miners' hashrate, and Bitcoin network stats, all in one dashboard.

Screenshots

RPi Crypto Ticker View 1 RPi Crypto Ticker View 2 RPi Crypto Ticker View 3

Table of Contents

Features

πŸ“ˆ Market Data (from Binance, Kraken and Coingecko)

  • Real-time prices for one or more primary pairs + configurable altcoins via WebSocket (with fallback)
  • Primary pairs auto-rotate (~21 seconds) when multiple are configured
  • 1-minute candlestick chart for active primary pair (duration & max candles configurable)
  • Scrolling marquee: configurable altcoins with prices and 24h change coloring (green/red)

⛏️ Local Miner Monitoring (shown only if miners configured)

  • Aggregated local miner stats:
    • Total hashrate (TH/s)
    • Best share difficulty among connected miners
    • Connected/active count
    • Color-coded health indicator (blue: all good, orange: partial, red: issues)
  • Hashrate overlay curve from aggregated local miners on the chart
  • Miner section auto-hides when miners_ips is empty (time is shown instead)

🌐 Bitcoin Network Stats (from mempool.space)

  • Recommended fees (sat/vB)
  • Current block height
  • Latest block mining pool
  • Network hashrate (EH/s)
  • Network difficulty

βš™οΈ UX / Performance / Config

  • Global connection status indicator (green/orange/red circle)
  • Fully configurable via config.json (reloads on start)
  • Optimized for Raspberry Pi: configurable 25 FPS cap, static background, low CPU usage
  • Native 480Γ—320 for 3.5" TFT + auto-scaling (with preserved aspect ratio) on HDMI displays
  • Automatic reconnection, thread-safe data, rotating logs

Perfect for an always-on TFT/HDMI crypto dashboard on Raspberry Pi 3B+, 4 or 5.

Hardware

Developed and tested with:

  • Raspberry Pi 3B+, 4, 5
  • Waveshare 3.5" TFT touchscreen (480Γ—320, XPT2046 controller)
  • HDMI monitors (auto-scaled with preserved aspect ratio)

System Prerequisites

  • The Raspberry Pi must be on the same local network as the miners.
  • Make sure /boot/firmware/config.txt has dtoverlay=vc4-kms-v3d enabled.

Before installing the Python dependencies, make sure you have the necessary system packages for Pygame and graphical support.

Run the following command:

sudo apt update && sudo apt install python3-venv python3-pygame libsdl2-dev libegl-dev

Additionally, add the user to the video and input groups to avoid permission issues with the framebuffer:

sudo usermod -aG video,input $USER

Log out and log back in (or reboot) for the group changes to apply.

Installation

  1. Clone the repository:
git clone https://github.com/DozNot/rpi-crypto-ticker-display.git
cd rpi-crypto-ticker-display
  1. Create and activate a virtual environment (recommended):

Important: Use the system-provided python3-pygame package (from apt) for best compatibility with Raspberry Pi's kmsdrm driver.

python3 -m venv --system-site-packages venv
source venv/bin/activate

Why --system-site-packages?

β†’ This allows the venv to use the optimized system pygame while keeping other dependencies isolated.

  1. Install dependencies:
python3 -m pip install -r requirements.txt
  1. Copy and edit the configuration file (miners hidden if "miners_ips" is empty):
cp config.example.json config.json
nano config.json
  • Example config.json:
{
  "miners_ips": [
    "192.0.2.100",
    "192.0.2.101",
    "192.0.2.102",
    "192.0.2.103"
  ],
  "btc_logo_path": "logos/btc.png",
  "fps": 25,
  "dim_alpha": 50,
  "candle_seconds": 60,  
  "max_candles": 14, 
  "marquee_height": 24,
  "marquee_speed": 1.0,
  "marquee_refresh_interval": 8.0,
  "main_symbols": ["BTCUSDT", "DOGEUSDT"], 
  "marquee_symbols": [
    "ETHUSDT", "BNBUSDT", "XMRUSDT", "SOLUSDT", "LTCUSDT",
    "XRPUSDT", "ADAUSDT", "TRXUSDT", "MEUSDT", "HBARUSDT", "ESXUSD",
    "XECUSDT", "RUNECOIN"  
  ],
  "price_decimals": {
    "xecusdt": 8,
    "esxusd": 6,
    "runecoin": 8
  },
  "kraken_pairs": {
    "xmrusdt": "XMR/USDT",
    "esxusd": "ESX/USD"
  },
  "coingecko_ids": {
    "runecoin": "runecoin"
  },
  "miner_active_threshold": 0.25, 
  "data_timeout": 300,
  "hashrate_curve_thickness": 2, 
  "wifi_check_interval": 12.0
}

β†’ Replace IPs with your real miner IP addresses (BitAxe/NerdQaxe/etc.)

β†’ If no miners, leave "miners_ips": [] empty to hide the miner feature (make sure you remove example IPs)

  1. Run the application:
python3 app.py
  • Then make it start automatically at boot (systemd, crontab @reboot, etc.)
  • Recommended for a dedicated dashboard

Project Structure

rpi-crypto-ticker-display/
β”œβ”€β”€ app.py                  # Main entry point
β”œβ”€β”€ config.json             # User configuration
β”œβ”€β”€ config.example.json     # Template: copy to config.json and edit
β”œβ”€β”€ LICENSE                 # Project license
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ assets/                 # Images used in README
β”‚   β”œβ”€β”€ demo.png            # Demo screenshot
β”‚   β”œβ”€β”€ btc-qr.png          # BTC QR
β”‚   β”œβ”€β”€ xmr-qr.png          # XMR QR
β”‚   └── ...                 
β”œβ”€β”€ logos/                  # Crypto logo images
β”‚   β”œβ”€β”€ btc.png
β”‚   β”œβ”€β”€ eth.png
β”‚   └── ...                
β”œβ”€β”€ logs/
β”‚   └── app.log             # Rotating log file (INFO/WARNING/ERROR)
β”œβ”€β”€ src/                    # Source code modules
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ constants.py        # Constant values and settings
β”‚   β”œβ”€β”€ data.py             # Price and market data fetching
β”‚   β”œβ”€β”€ helpers.py          # Utility functions
β”‚   β”œβ”€β”€ mempool.py          # Mempool/BTC network data
β”‚   β”œβ”€β”€ miners.py           # Local miner monitoring
β”‚   β”œβ”€β”€ rendering.py        # Display rendering and drawing logic
β”‚   └── websockets.py       # WebSocket connections for live data
β”œβ”€β”€ README.md               # Project documentation and setup guide
└── SECURITY.md             # Security Policy

Configuration Notes

All paths are relative to the project root.

  • miners_ips: List of local miner IP addresses (BitAxe, NerdAxe, etc.).
  • btc_logo_path: Path to the Bitcoin logo.
  • fps: Display refresh rate in frames per second.
  • dim_alpha: Transparency level for the dimming/fade effect (0-255).
  • candle_seconds: Duration in seconds for each candlestick on the price chart.
  • max_candles: Maximum number of candlesticks displayed on screen.
  • marquee_height: Height in pixels of the scrolling marquee.
  • marquee_speed: Scrolling speed of the marquee (higher value = faster).
  • marquee_refresh_interval: Interval in seconds to refresh price data in the marquee.
  • main_symbols: List of primary symbols shown. Add or remove as desired.
  • marquee_symbols: List of symbols to scroll in the marquee. Add or remove as desired.
  • price_decimals: Force decimals shown for specific symbols. Useful for low-value coins.
  • kraken_pairs: Mapping for symbols that use the Kraken API instead of Binance.
  • coingecko_ids: Mapping for symbols that use CoinGecko (for coins not listed elsewhere).
  • miner_active_threshold: Minimum threshold to consider a miner "active".
  • data_timeout: Timeout in seconds for data requests (prices, hashrate, etc.).
  • hashrate_curve_thickness: Thickness of the hashrate curve line.
  • wifi_check_interval: Interval in seconds to check WiFi connection status.

β†’ If config.json is missing, invalid, or corrupted, the program falls back to defaults.

Troubleshooting

  • pygame.error: video system not initialized or black screen:

    β†’ Ensure you used --system-site-packages when creating the venv and installed python3-pygame via apt.ΒΉ

    β†’ Verify /boot/firmware/config.txt contains or enables dtoverlay=vc4-kms-v3d (and reboot).

  • No display β†’ Verify SDL environment vars in app.py. Check /dev/fb0 exists.

  • No prices/"Connecting…" forever β†’ Internet required. Check firewall, DNS. Check logs for details.

  • Miners not showing / red indicator β†’ Verify IPs, miner WebSocket/API enabled, no firewall block.

  • High CPU β†’ Lower FPS in config.json (default 25 β†’ try 15-20).

  • Marquee stuck/empty β†’ Wait 8–10 seconds after start. Check logs for rebuild errors.

  • Candlestick chart missing β†’ Needs at least 2 candles (wait ~2 min after start).

ΒΉ The pip-only version of pygame often fails with kmsdrm on Raspberry Pi OS.

β†’ Logs are written to ./logs/app.log

License

MIT License – see LICENSE file

Acknowledgments

  • Market data: Binance, Kraken, Coingecko public APIs
  • Bitcoin Network stats: mempool.space
  • Open-source Bitcoin Community and Home-Miners (OSMU/BitAxe/NerdQaxe/etc.)

Support the Project

If you find this project useful, consider supporting its development with a small donation. Thank you!


[ BITCOIN ] [ MONERO ]

Bitcoin Donation QR Code


Monero Donation QR Code

Bitcoin:

bc1qkaqaxqheejuddrp5604wy592k423vjmk3uu35l

Monero:

457KEpgmvXJgNSnrkVs2poFPCVNXxPoqBAnxjSC1T9C3QUSSxXMR3iLFx1LtPc77oUAmoVwHgrh7KGzFugVpc1RCJ9nR3PS

About

Real-time crypto ticker and local home-miner monitor for Raspberry Pi using TFT/HDMI display: Prices, candlestick chart, miners hashrate, curve and BTC network stats in one dashboard.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Languages