May 3, 2018

BMiner API

BMiner offers you an easy to use API will all versions.

This API will continue to be enriched, stay tune…

GetStatus

get you the general state of your farm

GET http://localhost:34567/api/getstatus
Click here to see a typical response
{ "Miners": { "Alive": 9, "Dead": 0, "Degraded": 0, "Disabled": 3, "Total": 12, "TotalHashRate5s": "119531.39", "TotalHashRateAvg": "120067.21" }, "USDperDAY": "99.15" }

Miners

get you information about all miners

GET http://localhost:34567/api/miners
Click here to see a typical response
{ "Miners": [ { "activepool": { "coin": "BlockMunch", "number": 1, "url": "stratum+tcp://blockmasters.co:3433", "user": "<btc address>" }, "algorythm": "Scrypt", "difficulty": "", "health": { "fan": [ 3780, 2670 ], "frequency": 406, "temperature": [ 53, 51, 51 ] }, "hostname": "192.168.1.132", "id": 1, "isdisabled": false, "name": "L3+", "powerconsumption": 800, "progress": { "accepted": 469, "hwerrorratio": "0", "hwerrors": [ 0, 95, 0 ], "lstime": "0:0:39", "rejected": 1 }, "speed": { "hashrate5s": "532.46 MH/s", "hasrateavg": "528.92 MH/s" }, "status": { "state": "Mining", "type": "Antminer L3+", "uptime": " 0 d, 21:33:11" }, "workername": "L3" }, ... }

get information about a specific miner

GET http://localhost:34567/api/miners/[miner id]
Click here to see a typical response
{ "Miners": [ { "activepool": { "coin": "MiningDutch", "number": 1, "url": "stratum+tcp://sha256.mining-dutch.nl:9994", "user": "myusername.S92" }, "algorythm": "SHA-256", "difficulty": "_diff16384", "health": { "fan": [ 5520, 4320 ], "frequency": 550, "temperature": [ 64, 62, 64 ] }, "hostname": "192.168.1.129", "id": 5, "isdisabled": false, "name": "S9-2", "powerconsumption": 1375, "progress": { "accepted": 520, "hwerrorratio": "0.0007", "hwerrors": [ 655, 847, 981 ], "lstime": "0:0:5", "rejected": 9 }, "speed": { "hashrate5s": "11.83 TH/s", "hasrateavg": "11.86 TH/s" }, "status": { "state": "Mining", "type": "Antminer S9", "uptime": " 1 d, 10:16:49" }, "workername": "S92" } ] }

Pools

get you information about all pools

GET http://localhost:34567/api/pools
Click here to see a typical response
{ "Pools": [ { "adddifficulty": false, "addminerpoolpassword": false, "algorythm": "X11", "coin": "INFX", "dontaddworkername": false, "id": 22, "name": "Chainworksindustries", "password": "123", "passwordworkerprefix": "", "url": "stratum+tcp://ame-st01.chainworksindustries.com:7002", "worker": "<your username>" }, { "adddifficulty": false, "addminerpoolpassword": false, "algorythm": "SHA-256", "coin": "BCH", "dontaddworkername": false, "id": 1, "name": "ViaBTC", "password": "x", "passwordworkerprefix": "", "url": "stratum+tcp://bch.viabtc.com:3333", "worker": "<your username>" } ] }

get you information about a specific pool

GET http://localhost:34567/api/pools/[miner id]
Click here to see a typical response
{ "Pools": [ { "adddifficulty": false, "addminerpoolpassword": false, "algorythm": "SHA-256", "coin": "BTC", "dontaddworkername": false, "id": 48, "name": "Antpool", "password": "123", "passwordworkerprefix": "", "url": "stratum+tcp://stratum.antpool.com:443", "worker": "tkitoa" } ] }

API Security

If BMiner has been configured with “Use Authentication for API” on, then every request will require a valid API key. The key is automatically created while the user is created (see above picture). The key must be passed as a parameter to every single request like this (example):

GET http://localhost:34567/api/getstatus?key=077668976810116