Skip to main content
Hashwarp serves the dashboard, a JSON API, Prometheus metrics and a JSON-RPC interface on one TCP port, when started with --api-bind: Without --api-allow-control the API is read only. Control on an address other than 127.0.0.1 requires --api-token: anyone able to change pools could send your hashrate elsewhere. The API has no TLS: the token travels in clear text, so use a VPN or an SSH tunnel rather than exposing the port to the internet. Requests from web pages of other sites are refused. The --api-port N option of Hashwarp 1.x and ethminer still works, and listens on 127.0.0.1:N, read only.

HTTP API

GET /api/v1/summary

The rig’s current state:
  • Hashrates are in hashes per second. effective is what the accepted shares of the last 15 minutes are worth, 0 during the first 2 minutes.
  • difficulty is the expected number of hashes per share.
  • block is the height being mined, -1 when the pool doesn’t send it.
  • warning is set when the pool finds most of the network’s blocks (see Pool Mining), empty otherwise.
  • failed counts solutions the CPU check found wrong, which weren’t submitted.
  • Sensors are 0 when the GPU doesn’t report them. pause_reason is empty while a GPU mines.
  • The pool password is never shown.

GET /api/v1/rigs

This rig (unless it runs with --monitor) and the --rig rigs, as the dashboard shows them:
summary is the rig’s last /api/v1/summary: kept while the rig is unreachable, absent if it never answered. age is the seconds since then (-1: never), and error why the last attempt failed.

POST /api/v1/control

Needs --api-allow-control (403 otherwise):
action is pause or resume (one GPU with gpu, every GPU without), or restart (every GPU: the DAGs are rebuilt, the pool connection stays). The answer is {"result":true}, or 400 with the reason.

Errors

GET /getstat1 serves the HTML statistics page of Hashwarp 1.x.

Prometheus

GET /metrics serves the metrics in Prometheus’ text format:

JSON-RPC

The JSON-RPC interface of ethminer and Hashwarp 1.x, which some monitoring tools use, is on the same port. Send JSON-RPC 2.0 requests, one per line:
With --api-token, send api_authorize first on each connection:
Methods marked “yes” need --api-allow-control. Errors follow JSON-RPC 2.0: {"error": {"code": ..., "message": ...}}. A --monitor instance has no miner, and closes JSON-RPC connections.