No results
2
Pool API
Claude edited this page 2026-04-03 12:39:32 +01:00
Pool API
The pool exposes a REST API on port 2117 for stats and monitoring.
Endpoints
GET /stats
Returns global pool statistics.
curl -s http://localhost:2117/stats | python3 -m json.tool
Response fields:
| Field | Description |
|---|---|
pool.hashrate |
Current pool hashrate |
pool.miners |
Number of connected miners |
pool.totalBlocks |
Total blocks found |
pool.totalPayments |
Total payouts made |
network.height |
Current blockchain height |
network.difficulty |
Current network difficulty |
config.coin |
Coin name |
config.ports |
Available stratum ports |
GET /stats_address?address={wallet}
Returns stats for a specific miner address.
curl -s "http://localhost:2117/stats_address?address=iZ2..." | python3 -m json.tool
GET /get_payments?address={wallet}
Returns payment history for a miner.
curl -s "http://localhost:2117/get_payments?address=iZ2..." | python3 -m json.tool
GET /get_blocks
Returns recently found blocks.
curl -s http://localhost:2117/get_blocks | python3 -m json.tool
GET /get_payments
Returns recent pool payments.
curl -s http://localhost:2117/get_payments | python3 -m json.tool
Monitoring
Use the stats endpoint for monitoring:
# Check if pool is responsive
curl -sf http://localhost:2117/stats > /dev/null && echo "OK" || echo "DOWN"
# Check miner count
curl -s http://localhost:2117/stats | python3 -c "import sys,json; print(json.load(sys.stdin)['pool']['miners'])"
Web Dashboard
The web dashboard is served alongside the API at port 2117 showing:
- Pool hashrate graph
- Connected miners
- Recently found blocks
- Network stats