API Reference
The HashRelay server exposes a REST API on the api_addr port (default 8080).
Authentication
Authorization: Bearer YOUR_TOKENSystem
GET /api/v1/system/status
{
"version": "1.2.0",
"uptime_seconds": 86400,
"client_count": 12,
"active_connections": 348,
"total_bytes_relayed": 1073741824
}Pools
GET /api/v1/pools
POST /api/v1/pools
{ "name": "F2Pool-BTC", "coin": "BTC", "host": "stratum.f2pool.com", "port": 3333 }PUT /api/v1/pools/{id}
DELETE /api/v1/pools/{id}
Port Mappings
GET /api/v1/port-mappings
POST /api/v1/port-mappings
{ "local_port": 13333, "pool_id": 1, "client_id": "client_01" }Statistics
GET /api/v1/stats/overview
{
"total_miners": 1024,
"total_hashrate_th": 500.4,
"shares_accepted_1h": 14400,
"shares_rejected_1h": 72
}GET /api/v1/stats/timeseries
Query params: metric, interval, from, to