Awesome Miner HTTP API

Configuration

The API can be used by external applications to interact with Awesome Miner. By making HTTP requests, external applications can get information and perform operations.

The API feature can be enabled in the Options dialog, Awesome Miner API section. The address from where the API can be accessed is also displayed in the Awesome Miner API section.

Example of API address:

http://mypc:17790/api
The part 'mypc' should be replaced with either the hostname or IP address of the computer running Awesome Miner. The port is configured in the Web section of the Options dialog.

API documentation

Get information about all miners

GET http://mypc:17790/api/miners

{
	"totalHashrate5s": "14,18 TH/s",
	"hasManualAction": true,
	"manualActionList": [
		{
			"id": 1,
			"name": "Reboot all miners"
		}
	],
	"groupList": [
		{
			"id": 2,
			"name": "Bitcoin Miners",
			"minerList": [
				{
					"id": 1000000002,
					"name": "Antminer S9 #1",
                    "groupId": 2,
					"pool": "stratum.antpool.com",
					"temperature": "68 °C",
					"statusInfo": {
						"statusDisplay": "Mining",
						"statusLine3": "5h 44m "
					},
					"progressInfo": {
						"line1": "Accepted: 2169",
						"line2": "Rejected: 0",
						"line3": "HW Errors: 347"
					},
					"speedInfo": {
						"logInterval": 5,
						"hashrate": "14,18 TH/s",
						"avgHashrate": "13,89 TH/s",
						"workUtility": "200 540,59"
					},
					"coinInfo": {
						"displayName": "Bitcoin (BTC)",
						"revenuePerDay": "$10,06",
						"revenuePerDayValue": 10.062873988106617,
						"revenuePerMonth": "$304,91"
					},
					"updatedUtc": "2016-09-10T18:41:47.0777268Z",
					"updated": "2016-09-10 20:41:47",
					"poolList": [
						{
							"id": 0,
							"name": "My antpool",
							"statusInfo": {
								"statusDisplay": "Enabled",
								"statusLine3": null
							},
							"additionalInfo": {
								"displayUrl": "stratum.antpool.com:3333",
								"worker": "MyWorkerName.3"
							},
							"priorityInfo": {
								"priority": 0,
								"quota": 1
							},
							"progressInfo": {
								"line1": "2169",
								"line2": "0",
								"line3": "0"
							},
							"coinName": "Bitcoin (BTC)",
							"minerID": 1000000002,
							"minerName": "Antminer S9 #1",
							"canRemove": true,
							"canDisable": true,
							"canEnable": true,
							"canPrioritize": true
						}
					],
					"gpuList": [],
					"pgaList": [],
					"asicList": [
						{
							"name": "ASIC 0: BC50",
							"statusInfo": {
								"statusDisplay": "Enabled",
								"statusLine3": "Name: BC50"
							},
							"deviceInfo": {
								"deviceType": "ASIC",
								"gpuActivity": 0,
								"intensity": null,
								"name": null,
								"gpuClock": 0,
								"gpuMemoryClock": 0,
								"gpuVoltage": "0,00",
								"gpuPowertune": 0,
								"fanSpeed": 4200,
								"fanPercent": 0,
								"temperature": 65
							},
							"progressInfo": {
								"line1": "0",
								"line2": "0",
								"line3": "69"
							},
							"speedInfo": {
								"logInterval": 5,
								"hashrate": "4,65 TH/s",
								"avgHashrate": "0,00 H/s",
								"workUtility": "0,00"
							}
						},
						{
							"name": "ASIC 1: BC50",
							"statusInfo": {
								"statusDisplay": "Enabled",
								"statusLine3": "Name: BC50"
							},
							"deviceInfo": {
								"deviceType": "ASIC",
								"gpuActivity": 0,
								"intensity": null,
								"name": null,
								"gpuClock": 0,
								"gpuMemoryClock": 0,
								"gpuVoltage": "0,00",
								"gpuPowertune": 0,
								"fanSpeed": 4200,
								"fanPercent": 0,
								"temperature": 64
							},
							"progressInfo": {
								"line1": "0",
								"line2": "0",
								"line3": "72"
							},
							"speedInfo": {
								"logInterval": 5,
								"hashrate": "4,61 TH/s",
								"avgHashrate": "0,00 H/s",
								"workUtility": "0,00"
							}
						},
						{
							"name": "ASIC 2: BC50",
							"statusInfo": {
								"statusDisplay": "Enabled",
								"statusLine3": "Name: BC50"
							},
							"deviceInfo": {
								"deviceType": "ASIC",
								"gpuActivity": 0,
								"intensity": null,
								"name": null,
								"gpuClock": 0,
								"gpuMemoryClock": 0,
								"gpuVoltage": "0,00",
								"gpuPowertune": 0,
								"fanSpeed": 4200,
								"fanPercent": 0,
								"temperature": 68
							},
							"progressInfo": {
								"line1": "0",
								"line2": "0",
								"line3": "206"
							},
							"speedInfo": {
								"logInterval": 5,
								"hashrate": "4,63 TH/s",
								"avgHashrate": "0,00 H/s",
								"workUtility": "0,00"
							}
						}
					],
					"hasPool": true,
					"hasGpu": false,
					"hasPga": false,
					"hasAsic": true,
					"canReboot": false,
					"canStop": false,
					"canRestart": false,
					"canStart": false,
					"canPool": false,
					"hasValidStatus": true
				}
			]
		}
	],
    "metaData": {
        "updated": "2016-09-10 20:41:47",
        "edition": "Ultimate Edition",
        "version": "3.2",
        "cloudData": null
    }
}
                

 

Get information about a specific miner

GET http://mypc:17790/api/miners/{id}
id: The ID of the miner

Example:

GET http://mypc:17790/api/miners/14

{
	"id": 1000000002,
	"name": "Antminer S9 #1",
    "groupId": 2,
	"pool": "stratum.antpool.com",
	"temperature": "68 °C",
	"statusInfo": {
		"statusDisplay": "Mining",
		"statusLine3": "5h 44m "
	},
	"progressInfo": {
		"line1": "Accepted: 2169",
		"line2": "Rejected: 0",
		"line3": "HW Errors: 347"
	},
	"speedInfo": {
		"logInterval": 5,
		"hashrate": "14,18 TH/s",
		"avgHashrate": "13,89 TH/s",
		"workUtility": "200 540,59"
	},
	"coinInfo": {
		"displayName": "Bitcoin (BTC)",
		"revenuePerDay": "$10,09",
		"revenuePerDayValue": 10.090333314548104,
		"revenuePerMonth": "$305,74"
	},
	"updatedUtc": "2016-09-10T18:53:24.6873562Z",
	"updated": "2016-09-10 20:53:24",
	"poolList": [
		{
			"id": 0,
			"name": "My antpool",
			"statusInfo": {
				"statusDisplay": "Enabled",
				"statusLine3": null
			},
			"additionalInfo": {
				"displayUrl": "stratum.antpool.com:3333",
				"worker": "MyWorkerName.3"
			},
			"priorityInfo": {
				"priority": 0,
				"quota": 1
			},
			"progressInfo": {
				"line1": "2169",
				"line2": "0",
				"line3": "0"
			},
			"coinName": "Bitcoin (BTC)",
			"minerID": 1000000002,
			"minerName": "Antminer S9 #1",
			"canRemove": true,
			"canDisable": true,
			"canEnable": true,
			"canPrioritize": true
		}
	],
	"gpuList": [],
	"pgaList": [],
	"asicList": [
		{
			"name": "ASIC 0: BC50",
			"statusInfo": {
				"statusDisplay": "Enabled",
				"statusLine3": "Name: BC50"
			},
			"deviceInfo": {
				"deviceType": "ASIC",
				"gpuActivity": 0,
				"intensity": null,
				"name": null,
				"gpuClock": 0,
				"gpuMemoryClock": 0,
				"gpuVoltage": "0,00",
				"gpuPowertune": 0,
				"fanSpeed": 4200,
				"fanPercent": 0,
				"temperature": 65
			},
			"progressInfo": {
				"line1": "0",
				"line2": "0",
				"line3": "69"
			},
			"speedInfo": {
				"logInterval": 5,
				"hashrate": "4,65 TH/s",
				"avgHashrate": "0,00 H/s",
				"workUtility": "0,00"
			}
		},
		{
			"name": "ASIC 1: BC50",
			"statusInfo": {
				"statusDisplay": "Enabled",
				"statusLine3": "Name: BC50"
			},
			"deviceInfo": {
				"deviceType": "ASIC",
				"gpuActivity": 0,
				"intensity": null,
				"name": null,
				"gpuClock": 0,
				"gpuMemoryClock": 0,
				"gpuVoltage": "0,00",
				"gpuPowertune": 0,
				"fanSpeed": 4200,
				"fanPercent": 0,
				"temperature": 64
			},
			"progressInfo": {
				"line1": "0",
				"line2": "0",
				"line3": "72"
			},
			"speedInfo": {
				"logInterval": 5,
				"hashrate": "4,61 TH/s",
				"avgHashrate": "0,00 H/s",
				"workUtility": "0,00"
			}
		},
		{
			"name": "ASIC 2: BC50",
			"statusInfo": {
				"statusDisplay": "Enabled",
				"statusLine3": "Name: BC50"
			},
			"deviceInfo": {
				"deviceType": "ASIC",
				"gpuActivity": 0,
				"intensity": null,
				"name": null,
				"gpuClock": 0,
				"gpuMemoryClock": 0,
				"gpuVoltage": "0,00",
				"gpuPowertune": 0,
				"fanSpeed": 4200,
				"fanPercent": 0,
				"temperature": 68
			},
			"progressInfo": {
				"line1": "0",
				"line2": "0",
				"line3": "206"
			},
			"speedInfo": {
				"logInterval": 5,
				"hashrate": "4,63 TH/s",
				"avgHashrate": "0,00 H/s",
				"workUtility": "0,00"
			}
		}
	],
	"hasPool": true,
	"hasGpu": false,
	"hasPga": false,
	"hasAsic": true,
	"canReboot": false,
	"canStop": false,
	"canRestart": false,
	"canStart": false,
	"canPool": false,
	"hasValidStatus": true,
    "metaData": {
        "updated": "2016-09-10 20:41:47",
        "edition": "Ultimate Edition",
        "version": "3.2",
        "cloudData": null
    }
}
                

 

Perform action on a specific miner

POST http://mypc:17790/api/miners/{id}?action=...&pool_id=...&pool_type=...
id: The ID of the miner
action: The action to perform, set to one of the following values:

  • reboot: Reboots the computer
  • stop: Stop the mining process
  • restart: Restart the mining process
  • start: Start the mining process
  • add_pool: Add the pool specified by pool_id
  • change_pool: Change to the pool specified by pool_id

pool_id: The Static ID of the pool to add. (Only applicable for add_pool and change_pool actions)
pool_type: The type of the pool to add. Either single or group. (Only applicable for add_pool and change_pool actions)

Example:

POST http://mypc:17790/api/miners/14?action=restart
POST http://mypc:17790/api/miners/14?action=change_pool&pool_id=3&pool_type=single

 

Get information about all pools that can be added or changed to for a specific miner

GET http://mypc:17790/api/miners/{id}/pools
id: The ID of the miner

Example:

GET http://mypc:17790/api/miners/14/pools

{
	"addPoolList": [
		{
			"name": "My antpool",
			"type": "single",
			"id": "1"
		},
		{
			"name": "NiceHash SHA-256",
			"type": "single",
			"id": "3"
		},
		{
			"name": "Awesome Profit Group",
			"type": "group",
			"id": "4"
		}
	]
}
                

 

Get information about a specific pool for a specific miner

GET http://mypc:17790/api/miners/{id}/pools/{active_pool_id}
id: The ID of the miner
active_pool_id: The Active ID of the pool

Example:

GET http://mypc:17790/api/miners/14/pools/3

{
	"id": 0,
	"name": "My antpool",
	"statusInfo": {
		"statusDisplay": "Enabled",
		"statusLine3": null
	},
	"additionalInfo": {
		"displayUrl": "stratum.antpool.com:3333",
		"worker": "MyWorkerName.3"
	},
	"priorityInfo": {
		"priority": 0,
		"quota": 1
	},
	"progressInfo": {
		"line1": "2169",
		"line2": "0",
		"line3": "0"
	},
	"coinName": "Bitcoin (BTC)",
	"minerID": 1000000002,
	"minerName": "Antminer S9 #1",
	"canRemove": true,
	"canDisable": true,
	"canEnable": true,
	"canPrioritize": true
}
                

 

Perform action on a specific pool for a specific miner

POST http://mypc:17790/api/miners/{id}/pools/{active_pool_id}?action=...
id: The ID of the miner
active_pool_id: The Active ID of the pool
action: The action to perform, set to one of the following values:

  • remove: Removes the pool from the active miner (the last remaining pool cannot be removed)
  • disable: Disable the pool
  • enable: Enable the pool
  • prioritize: Prioritize the pool (set priority to 0 = Highest)

Example:

POST http://mypc:17790/api/miners/14/pools/3?action=prioritize

 

Get list of all notifications

GET http://mypc:17790/api/notifications

{
	"notificationList": [
		{
			"id": 4,
			"minerName": "Awesome Profit Miner",
			"title": null,
			"timeUtc": "2016-09-10T19:03:23.130255Z",
			"time": "2016-09-10 21:03:23",
			"source": "System",
			"message": "Mining process not running, initiating restart",
			"isAcknowledged": false,
			"isWarning": true
		}
	],
	"notificationCount": 1,
	"unacknowledgedNotificationCount": 1
}
                

 

Perform action for all notifications

POST http://mypc:17790/api/notifications?action=...
action: The action to perform, set to one of the following values:

  • ack_all: Acknowledge all notifications
  • clear_all: Remove all notifications

Example:

POST http://mypc:17790/api/notifications?action=clear_all

 

Perform action on a single notification

POST http://mypc:17790/api/notifications/{id}?action=...
action: The action to perform, set to one of the following values:

  • ack: Acknowledge the specified notification
  • clear: Remove the specified notification

Example:

POST http://mypc:17790/api/notifications/3?action=clear

 

Set Antminer S7 / S9 frequency

POST http://mypc:17790/api/miners/{id}/antminer?username=...&password=...&frequency=...
id: The ID of the miner
username: SSH username to access the Antminer (default: root)
password: SSH password to access the Antminer (default: admin)
frequency: The new frequency in MHz.

Example:

POST http://mypc:17790/api/miners/14/antminer?username=root&password=admin&frequency=625

 

Back to help section