Skip to main content
GET
/
private-api
/
v1
/
granted
/
{workspace_id}
/
farms
/
{farm_id}
/
miner
/
latest
List Granted Miners
curl --request GET \
  --url https://api.nonce.app/private-api/v1/granted/{workspace_id}/farms/{farm_id}/miner/latest \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.nonce.app/private-api/v1/granted/{workspace_id}/farms/{farm_id}/miner/latest"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.nonce.app/private-api/v1/granted/{workspace_id}/farms/{farm_id}/miner/latest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nonce.app/private-api/v1/granted/{workspace_id}/farms/{farm_id}/miner/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.nonce.app/private-api/v1/granted/{workspace_id}/farms/{farm_id}/miner/latest"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.nonce.app/private-api/v1/granted/{workspace_id}/farms/{farm_id}/miner/latest")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.nonce.app/private-api/v1/granted/{workspace_id}/farms/{farm_id}/miner/latest")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": [
    {
      "id": "002b1a50fa281efe0f320ebc39f5047b",
      "farm_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "farm": {
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "name": "Farm Name"
      },
      "workspace_id": "org_xxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "serial_number": "HTM3FS28HD25011939878367054H36045",
      "model": "Antminer S19",
      "ip": "192.168.1.100",
      "mac": "00:1B:44:11:3A:B7",
      "firmware_version": "20250304.15.REL",
      "rack": "A1",
      "position": 3,
      "is_mining": true,
      "last_check_succeed": true,
      "stale": false,
      "overheat": false,
      "low_hashrate": false,
      "overpower": false,
      "underpower": false,
      "status": "online",
      "ops_status": null,
      "unstable_reason": null,
      "lifecycle_status": "online",
      "health_status": null,
      "mining_mode": "normal",
      "mining_mode_preset": "<string>",
      "hashrate": 100120000000000,
      "hashrate_24h": 100120000000000,
      "power": 9771,
      "temp": 75.5,
      "temperature_inlet_avg": 35.5,
      "temperature_outlet_avg": 65.5,
      "efficiency": 34,
      "uptime": 86400,
      "last_updated_at": "2025-08-27T00:00:00Z",
      "created_at": "2025-08-27T00:00:00Z",
      "errors": [
        {
          "code": "E001",
          "message": "Temperature too high"
        }
      ],
      "hashboards": [
        {
          "serial_number": "HB123456",
          "hashrate": 25120000000000,
          "chips": 4,
          "chip_frequency": 650
        }
      ],
      "total_chips": 5,
      "expected_chips": 4,
      "anomaly_flags": 0,
      "pools": [],
      "psus": []
    }
  ],
  "pagination": {
    "total": 50,
    "limit": 10,
    "offset": 0,
    "hasNext": true,
    "hasPrevious": false
  },
  "error": null
}
{
"statusCode": 400,
"message": "Invalid request parameters",
"error": "Bad Request"
}
{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}
{
"statusCode": 403,
"message": "Access denied to workspace",
"error": "Forbidden"
}

Authorizations

Authorization
string
header
required

Clerk Machine API Key for authentication

Path Parameters

workspace_id
string
required
farm_id
string
required

Query Parameters

page
number

Page number (default: 1)

Required range: x >= 1
Example:

1

pageSize
number

Number of items per page (default: 10, max: 10000)

Required range: 1 <= x <= 10000
Example:

10

agent_id
string

Agent Id (uuid generated by nonce system)

Example:

"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

sn
string

Miner sn/hashboard sn/power supply sn/controller sn.(single value)

Example:

"HTM3FS28HD25011939878367054H36045, HLM3FSFF594C06X60006"

mac
string

Filter miners by MAC address

Example:

"AA:BB:CC:DD:EE:FF"

status
string

Filter miners by status. Accepts both run status (online, stale) and ops status (archived, maintenance, retired, off_rack, transit). Run status and ops status are independent axes — filtering by online does NOT exclude miners with an ops_status set. For new clients prefer ops_status for ops-state filtering and status for connectivity-state filtering. Supports multiple values separated by , (e.g., "online,stale") or multiple query parameters (e.g., "status=online&status=stale"). Available statuses:

  • online: Miner is actively mining and connected
  • offline: Miner is not connected or powered off
  • stale: Miner data is stale (no recent updates)
  • archived: (Asset) Miner has been archived
  • off_rack: (Asset) Miner is removed from rack
  • transit: (Asset) Miner is in transit
  • maintenance: (Asset) Miner is under maintenance
  • retired: (Asset) Miner has been retired
  • error: Deprecated. Use anomaly_filters.
  • low_hashrate: Deprecated. Use hashrate_realization range.
  • overheated: Deprecated. Use anomaly_filters=temperature.
  • overpower: Deprecated. Use anomaly_filters=power.
  • underpower: Deprecated. Use anomaly_filters=power.
  • overclocking: Deprecated. Use mining_modes_in with overclocking presets.
Example:

"online"

status_exclude
string

Exclude miners by status (NOT IN semantics) — the complement of status. Accepts the same values as status; combine with status to include some and exclude others. Primary use: status_exclude=stale selects the online scope (status <> stale), matching the overview "online/healthy/abnormal/sleep" cards. Supports ,-separated or repeated params.

Example:

"stale"

ops_status
string

Filter miners by ops status (operator-managed state). Values: maintenance, retired, off_rack, transit, archived. Supports multiple values separated by , or multiple query parameters.

Example:

"archived"

unstable
string

Unstable filter. true returns only miners with non-null unstable_reason (mac/sn unreliable). Omit, null, or false to include unstable miners.

Example:

false

has_anomaly
string

Abnormal axis (the whole anomaly_flags bitmask, not a specific type). true = any anomaly bit set (anomaly_flags <> 0) — the overview "abnormal" scope. false = no anomaly bits (anomaly_flags = 0) — the fault-free scope behind "healthy"/"sleep". Omit to include both. Prefer this over OR-ing all anomaly_filters for the abnormal aggregate.

Example:

false

anomaly_filters
enum<string>[]

Filter miners by anomaly type (OR semantics — returns miners matching ANY of the specified types). Available values: fan, power, temperature, hashboard, network, firmware, unknown, control_board, pool, low_hashrate. Corresponds to bits in the anomaly_flags bitmask field on each miner. Accepts repeated array (anomaly_filters[]=fan&anomaly_filters[]=power), comma-separated string (anomaly_filters=fan,power), or single value (anomaly_filters=fan).

Available options:
fan,
power,
temperature,
hashboard,
network,
firmware,
unknown,
control_board,
pool,
low_hashrate
hashrate_realization_min
string

Lower bound of hashrate realization rate (actual / expected). 1.0 = 100%. Miners with NULL or 0 expected_hashrate are excluded.

Example:

0.8

hashrate_realization_max
string

Upper bound of hashrate realization rate. No hard cap (allows >1 for overclocked miners).

Example:

1.2

mining_modes_in
string[]

Filter miners by mining_mode value (OR semantics — returns miners matching ANY of the specified modes). Accepts repeated array (mining_modes_in[]=high&mining_modes_in[]=power_tuning), comma-separated string (mining_modes_in=high,power_tuning), or single value (mining_modes_in=high).

Example:
["high", "power_tuning", "hashrate_tuning"]
mining_modes_not_in
string[]

Exclude miners by mining_mode value (NOT IN semantics) — the complement of mining_modes_in. Primary use: mining_modes_not_in=sleep excludes sleepers, matching the overview "healthy" card (fault-free, non-sleep). Accepts repeated array, comma-separated string, or single value.

Example:
["sleep"]
ip_ranges
string

Filter miners by IPv4 ranges. A miner matches if its IP falls into any of the provided ranges. Each item accepts one of three forms:

  • single address (e.g. 192.168.1.5)
  • CIDR (e.g. 192.168.1.0/24)
  • hyphen range (e.g. 192.168.1.1-192.168.1.254, inclusive) Supports multiple values separated by , or repeated query parameters.
Example:

"192.168.1.5,192.168.144.0/24,10.0.0.1-10.0.0.50"

Response

Successfully retrieved granted miner status

success
boolean
required

Indicates if the request was successful

Example:

true

data
Miner · object[]
required

Array of items

pagination
object
required

Pagination metadata

error
null
required

Error object (null on success)

Example:

null