Skip to main content

API Overview

Every NMMiner device runs an HTTP server on port 80 that exposes a complete REST-style API. The same API is used by:

  • The built-in NM Monitor browser UI.
  • The Swarm aggregator.
  • Anyone — you, your dashboard, a Grafana plugin, a Python script — who wants to read status or push settings.

✅ This page documents the public contract: paths, methods, request bodies, response bodies, status codes. ❌ It does not document implementation. Treat the device as a black box reachable over HTTP.

Base URL

http://<miner-ip>/

or by hostname (most home routers resolve it):

http://<miner-hostname>/

You can find the IP / hostname on the Miner page of the device s screen, or in the System section of NM Monitor.

CORS

Every endpoint responds with:

Access-Control-Allow-Origin: *

so you can call the API from any browser page without proxying.

Authentication

There is no authentication today. The API is meant to be used from within your trusted LAN. Do not expose it to the public internet without your own gateway.

Content type

  • Request bodies use application/json.
  • Response bodies are either application/json or text/plain.
  • All endpoints accept and respond to a CORS pre-flight OPTIONS request.

Categories

CategoryEndpoints
DiscoveryGET /probe, GET /alive
SystemGET /api/system/info, POST /api/system/restart
Network settingsGET/POST /api/setting/network
Mining settingsGET/POST /api/setting/mining
Time settingsGET/POST /api/setting/time
Preference settingsGET/POST /api/setting/preference
Market settingsGET/POST /api/setting/market, GET /api/market/pairs
Weather settingsGET/POST /api/setting/weather, POST /api/weather/refresh
Swarm findPOST /api/swarm/find
Screensaver uploadGET /api/update/screensaver/preflight, POST /api/update/screensaver
ExamplescURL / Python / JavaScript

Versioning

The contract is stable across minor firmware versions (e.g. v2.0.x). Breaking changes are called out in the GitHub release log.

Status codes

CodeMeaning
200OK — response body matches the documented schema.
204OK — used for CORS preflight.
400Bad request — usually invalid JSON or out-of-range values.
404No such endpoint.
413Payload too large (screensaver upload only).
429Rate limited — currently used by /api/weather/refresh.
500Device error (e.g. file system write failure during upload).

Discoverability

Visit http://<miner-ip>/api-doc for a live HTML reference served by the miner itself. The Markdown reference you are reading is generated from the same contract.