BonnieMiner Stats API

Real-time Bitcoin and Bitcoin Cash statistics for ESP32 mining devices. Fast, reliable, and optimized for embedded systems.

Fast & Lightweight
Optimized for ESP32 devices with minimal memory footprint and pure HTTP support.
Real-time Data
Live cryptocurrency prices, network hashrate, difficulty, and block height updates.
Reliable Caching
5-minute intelligent caching reduces API calls while maintaining data freshness.
Unified Endpoint
Single API call returns all mining statistics - prices, network stats, and fees.
API Endpoint
Simple HTTP GET request - no authentication required
GET /api/trpc/stats.getAll

Response Format

{
  "result": {
    "data": {
      "json": {
        "btc_price_usd": 65084,
        "bch_price_usd": 540.61,
        "block_height": 875432,
        "network_hashrate": "1019.36 EH/s",
        "network_difficulty": "144.40 T",
        "fee_low": 5,
        "fee_medium": 10,
        "fee_high": 20,
        "difficulty_progress": 45.2,
        "difficulty_change": 2.5,
        "difficulty_retarget_blocks": 1024,
        "timestamp": 1771824295892,
        "cache_age": 120
      }
    }
  }
}

ESP32 Example Code

HTTPClient http;
http.begin("http://api.bonniecreative.com/api/trpc/stats.getAll");
int httpCode = http.GET();

if (httpCode == HTTP_CODE_OK) {
  String payload = http.getString();
  // Parse JSON and extract data
}
http.end();
Data Fields

Price Data

  • btc_price_usd - Bitcoin price in USD
  • bch_price_usd - Bitcoin Cash price in USD

Network Stats

  • block_height - Current block height
  • network_hashrate - Network hashrate (formatted)
  • network_difficulty - Mining difficulty (formatted)

Transaction Fees

  • fee_low - Economy fee (sat/vB)
  • fee_medium - Standard fee (sat/vB)
  • fee_high - Priority fee (sat/vB)

Difficulty Adjustment

  • difficulty_progress - Progress percentage
  • difficulty_change - Expected change %
  • difficulty_retarget_blocks - Blocks remaining