Skip to content

Latest commit

 

History

History
228 lines (217 loc) · 5.61 KB

File metadata and controls

228 lines (217 loc) · 5.61 KB

API (v1.3)

TBMiner have a small built-in read only api.

The api is used for profit switching miners or other systems which requires basic knownledge of whats going on in the miner.

Default values

  • Default ip is 127.0.0.1
  • Default port is 4068.

Available api commands

  • help -- Overview of available commands.
  • miner -- Basic information about the miner and a totals overview.
  • threads -- Stats for all working gpu threads.
  • pool -- Information about the pool in use.
  • summary -- Miner, threads and pool info (all above)

Detailed list of api requests and responses

http://127.0.0.1:4068/help
{
    "commands":

    [
        "help",
        "miner",
        "threads",
        "pool",
        "summary"
    ]
}
http://127.0.0.1:4068/miner
{
    "name":"TBMiner",
    "version":"1.24",
    "api_version":"1.3",
    "num_gpu_threads":1,
    "total_hashrate":24132474,
    "total_accepted":2,
    "total_rejected":0,
    "total_stale":0,
    "uptime_minutes":5
}
"name"              -- Name of the miner.
"version"           -- Miner version number.
"api_version"       -- Current api version number. Any change will increase number.
"num_gpu_threads"   -- Total number of working gpu threads for the miner.
"total_hashrate"    -- Total hashrate for all working gpu threads. Not formatted.
"total_accepted"    -- Miners total accepted shares for algorithm in use. A sum of all working gpu threads.
"total_rejected"    -- Miners total rejected shares for algorithm in use. A sum of all working gpu threads.
"total_stale"       -- Miners total stale shares for algorithm in use. A sum of all working gpu threads.
"uptime_minutes"    -- Miner uptime in minutes.
http://127.0.0.1:4068/threads
{
    "0":

    {
        "gpu":0,
        "pcie_id":0,
        "board_name":"NVIDIA GeForce GTX 1070",
        "type":"Cuda",
        "xintensity": 400,
        "gpu_temp":76,
        "mem_temp":0,
        "fan":56,
        "core_clock":1860,
        "mem_clock":3802,
        "watt":138,
        "hashrate":23644237,
        "accepted":2,
        "rejected":0,
        "stale":0
    }
}
"index"         -- GPU id. Might not be the same order as PCIe id.
"gpu"           -- GPU id. Might not be the same order as PCIe id.
"pcie_id"       -- PCIe device id. The pysical placement of the GPU card.
"board_name"    -- Name of the GPU card.
"type"          -- Type of mining by thread. Cuda or OpenCL.
"xintensity"    -- The GPU threads intensity setting.
"gpu_temp"      -- GPU temperature.
"mem_temp"      -- GPU memory temperature if available.
"fan":56        -- Fan speed in percentage.
"core_clock"    -- The GPU core clock.
"mem_clock"     -- The GPU memory clock.
"watt"          -- Current power draw for the GPU.
"hashrate"      -- Current hashrate for the GPU thread. Not formatted.
"accepted"      -- The GPU threads number of accepted shares for algorithm in use.
"rejected"      -- The GPU threads number of rejected shares for algorithm in use.
"stale"         -- The GPU threads number of stale shares for algorithm in use.
http://127.0.0.1:4068/pool
{
    "url":"eu1.ethermine.org",
    "port":4444,
    "worker":"fr",
    "algo":"ethash",
    "job":"bbcd54",
    "epoch":444,
    "block":0,
    "diff":1,
    "ping":24
}
"url"       -- The pool in use.
"port"      -- The pool port in use.
"worker"    -- The worker registred on pool.
"algo"      -- The algorithm in use by the miner.
"job"       -- Current work. Latest work from pool.
"epoch"     -- The epoch number for the currency.
"block"     -- Block height if provided by pool protocol.
"diff"      -- Pool difficulty in double floating point precicion.
"ping"      -- Pool ping in milliseconds.
http://127.0.0.1:4068/summary
(Contains all of the above information)

API (v1.4)

This is a small update on the API:

- Threads now contain algorithm.
- There can be more than one thread per GPU with dualmining.
- There can be more than one pool with dualmining.
- Data should be valid Json data.
{
  "miner": {
    "name": "TBMiner",
    "version": "1.82",
    "api_version": "1.4",
    "num_gpu_threads": 2,
    "total_hashrate": 2360594,
    "total_accepted": 18,
    "total_rejected": 0,
    "total_stale": 0,
    "uptime_minutes": 3
  },
  "pool": {
    "0": {
      "url": "eu.crazypool.org",
      "port": 7000,
      "worker": "debug",
      "algo": "etchash",
      "job": "e921a6c1",
      "epoch": 280,
      "block": 0,
      "diff": 2.0000000009313013,
      "ping": 54.5
    },
    "1": {
      "url": "pool.eu.woolypooly.com",
      "port": 3102,
      "worker": "debug",
      "algo": "verthash",
      "job": "00000589",
      "epoch": 0,
      "block": 0,
      "diff": 0,
      "ping": 65.36842105263158
    }
  },
  "devices": {
    "0": {
      "gpu": 0,
      "pcie_id": 9,
      "board_name": "NVIDIA GeForce RTX 3080",
      "type": "Cuda",
      "algo": "etchash",
      "xintensity": 256,
      "gpu_temp": 66,
      "mem_temp": 0,
      "fan": 82,
      "core_clock": 1740,
      "mem_clock": 9501,
      "watt": 219,
      "hashrate": 819503,
      "dag": false,
      "accepted": 0,
      "rejected": 0,
      "stale": 0
    },
    "1": {
      "gpu": 0,
      "pcie_id": 9,
      "board_name": "NVIDIA GeForce RTX 3080",
      "type": "Cuda",
      "algo": "verthash",
      "xintensity": 0,
      "gpu_temp": 66,
      "mem_temp": 0,
      "fan": 82,
      "core_clock": 1740,
      "mem_clock": 9501,
      "watt": 219,
      "hashrate": 1500117,
      "dag": false,
      "accepted": 18,
      "rejected": 0,
      "stale": 0
    }
  }
}