Developer Reference & Integration Guide
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.
https://pyblock.xyz:8443/api/Subscribe to real-time block discoveries via RSS:
https://pyblock.xyz:8443/rss/blocks.phpHere'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"
Returns real-time statistics for the PYBLOCK-LOTTO pool including hashrate, workers, shares, and best share.
{
"hashrate1m": "162.3T",
"hashrate5m": "165.1T",
"hashrate1hr": "163.8T",
"hashrate1d": "164.2T",
"Workers": 18,
"accepted": 12458392,
"rejected": 234,
"bestshare": 4468841947196
}
Returns statistics for the DATUM-POOLED gateway.
{
"hashrate": 25.3,
"clients": 5,
"last_update": 1738990123
}
Returns list of all active miners (last 24 hours) with their workers and hashrates.
{
"bc1q...xyz": {
"workers": 2,
"worker": [
{
"workername": "bc1q...xyz.rig1",
"hashrate1d": "1.7T",
"lastshare": 1738990000,
"shares": 1623003188,
"bestever": 8720992581
}
]
}
}
Returns total blocks found by each pool and detailed block information.
{
"lotto": 0,
"datum": 1,
"blocks": [
{
"height": 928997,
"hash": "0000000000000000000189c5e4d2232e...",
"tag": "PyBLOCK-Datum",
"protocol": "DATUM",
"relay": "OCEAN",
"confirmed": true
}
]
}
Returns detailed statistics for a specific miner address.
| Parameter | Type | Required | Description |
|---|---|---|---|
address |
string | Yes | Bitcoin address of the miner |
{
"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": [...]
}
Returns current Bitcoin network difficulty and blockchain info.
{
"difficulty": 125864590119494.3,
"blocks": 935517,
"headers": 935517,
"chain": "main",
"verificationprogress": 0.9999983903543136
}
Returns complete leaderboard of all miners sorted by hashrate with pool statistics.
{
"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
}
}
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": "Address parameter required",
"status": 400
}