-- | --
🔍 Search Ctrl+K

PUBLIC API

Developer Reference & Integration Guide

🔌 PyBLOCK Public API

Welcome to the PyBLOCK Pool API! This RESTful API provides real-time access to pool statistics, miner data, leaderboards, and block information. Perfect for building dashboards, monitoring tools, or integrating PyBLOCK data into your applications.

📋 API Information

  • Base URL: https://pyblock.xyz:8443/api/
  • Format: JSON
  • Authentication: None required (public endpoints)
  • Rate Limit: 60 requests per minute per IP
  • CORS: Enabled (Access-Control-Allow-Origin: *)

📡 RSS Feed

Subscribe to real-time block discoveries via RSS:

  • Feed URL: https://pyblock.xyz:8443/rss/blocks.php
  • Format: RSS 2.0 with Atom extensions
  • Updates: Real-time (new blocks added within 5 minutes)
  • History: Last 50 blocks found by the pool
  • Content: Block height, hash, pool, protocol, reward, Mempool.space link
📡 View RSS Feed

🚀 Quick Start

Here's a simple example to get pool statistics:

// JavaScript Example
fetch('https://pyblock.xyz:8443/api.php?mode=pool')
  .then(response => response.json())
  .then(data => {
    console.log('Pool Hashrate:', data.hashrate1m);
    console.log('Active Miners:', data.Workers);
  });
// Python Example
import requests

response = requests.get('https://pyblock.xyz:8443/api.php?mode=pool')
data = response.json()
print(f"Pool Hashrate: {data['hashrate1m']}")
print(f"Active Miners: {data['Workers']}")
# cURL Example
curl -X GET "https://pyblock.xyz:8443/api.php?mode=pool"

📡 AVAILABLE ENDPOINTS 📡

GET /api.php?mode=pool

Get PYBLOCK-LOTTO Pool Statistics

Returns real-time statistics for the PYBLOCK-LOTTO pool including hashrate, workers, shares, and best share.

Response Example:

{
  "hashrate1m": "162.3T",
  "hashrate5m": "165.1T",
  "hashrate1hr": "163.8T",
  "hashrate1d": "164.2T",
  "Workers": 18,
  "accepted": 12458392,
  "rejected": 234,
  "bestshare": 4468841947196
}
GET /api.php?mode=datum

Get DATUM-POOLED Statistics

Returns statistics for the DATUM-POOLED gateway.

Response Example:

{
  "hashrate": 25.3,
  "clients": 5,
  "last_update": 1738990123
}
GET /api.php?mode=workers

Get Active Workers

Returns list of all active miners (last 24 hours) with their workers and hashrates.

Response Example:

{
  "bc1q...xyz": {
    "workers": 2,
    "worker": [
      {
        "workername": "bc1q...xyz.rig1",
        "hashrate1d": "1.7T",
        "lastshare": 1738990000,
        "shares": 1623003188,
        "bestever": 8720992581
      }
    ]
  }
}
GET /api.php?mode=blocks

Get Blocks Found

Returns total blocks found by each pool and detailed block information.

Response Example:

{
  "lotto": 0,
  "datum": 1,
  "blocks": [
    {
      "height": 928997,
      "hash": "0000000000000000000189c5e4d2232e...",
      "tag": "PyBLOCK-Datum",
      "protocol": "DATUM",
      "relay": "OCEAN",
      "confirmed": true
    }
  ]
}
GET /api/miner_stats.php?address={address}

Get Individual Miner Statistics

Returns detailed statistics for a specific miner address.

Parameter Type Required Description
address string Yes Bitcoin address of the miner

Response Example:

{
  "hashrate1m": "28.6M",
  "hashrate5m": "63G",
  "hashrate1hr": "1.13T",
  "hashrate1d": "1.7T",
  "hashrate7d": "1.7T",
  "lastshare": 1770521181,
  "workers": 2,
  "shares": 1623003188,
  "bestshare": 8720992581.977997,
  "bestever": 8720992581,
  "worker": [...]
}
GET /api/network_stats.php

Get Bitcoin Network Statistics

Returns current Bitcoin network difficulty and blockchain info.

Response Example:

{
  "difficulty": 125864590119494.3,
  "blocks": 935517,
  "headers": 935517,
  "chain": "main",
  "verificationprogress": 0.9999983903543136
}
GET /api/leaderboard.php

Get Miner Rankings

Returns complete leaderboard of all miners sorted by hashrate with pool statistics.

Response Example:

{
  "success": true,
  "miners": [
    {
      "address": "bc1qg8dfmfr9e0mg083ds9mj0396fxfgmjcdz3llyr",
      "hashrateTH": 74.2,
      "lastshare": 1770525215,
      "workers": 17,
      "shares": 238959208878,
      "bestshare": 4468841947196
    }
  ],
  "stats": {
    "totalMiners": 15,
    "totalHashrate": 142.5,
    "totalWorkers": 45,
    "highestShare": 4468841947196
  }
}

⚠️ Error Handling

The API uses standard HTTP status codes and returns error messages in JSON format.

Status Code Meaning Description
200 OK Request successful
400 Bad Request Invalid parameters or missing required fields
404 Not Found Resource not found (e.g., miner address)
429 Too Many Requests Rate limit exceeded (60 req/min)
500 Internal Server Error Server error, please try again

Error Response Example:

{
  "error": "Address parameter required",
  "status": 400
}

💬 Need Help?

Join our community for API support and updates

📱 Telegram 🐦 Twitter