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/jsonortext/plain. - All endpoints accept and respond to a CORS pre-flight
OPTIONSrequest.
Categories
| Category | Endpoints |
|---|---|
| Discovery | GET /probe, GET /alive |
| System | GET /api/system/info, POST /api/system/restart |
| Network settings | GET/POST /api/setting/network |
| Mining settings | GET/POST /api/setting/mining |
| Time settings | GET/POST /api/setting/time |
| Preference settings | GET/POST /api/setting/preference |
| Market settings | GET/POST /api/setting/market, GET /api/market/pairs |
| Weather settings | GET/POST /api/setting/weather, POST /api/weather/refresh |
| Swarm find | POST /api/swarm/find |
| Screensaver upload | GET /api/update/screensaver/preflight, POST /api/update/screensaver |
| Examples | cURL / 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
| Code | Meaning |
|---|---|
| 200 | OK — response body matches the documented schema. |
| 204 | OK — used for CORS preflight. |
| 400 | Bad request — usually invalid JSON or out-of-range values. |
| 404 | No such endpoint. |
| 413 | Payload too large (screensaver upload only). |
| 429 | Rate limited — currently used by /api/weather/refresh. |
| 500 | Device 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.