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

Response example
{
	"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",
					"hostname": "192.168.0.123",
					"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": "2017-09-26 19:28:31",
        "edition": "Ultimate Edition 200",
        "version": "4.0.3",
        "infoList": [],
        "warningList": []
    }
}
                

 

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

Response example
{
	"id": 1000000002,
	"name": "Antminer S9 #1",
	"hostname": "192.168.0.123",
	"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": "2017-09-26 19:28:31",
        "edition": "Ultimate Edition 200",
        "version": "4.0.3",
        "infoList": [],
        "warningList": []
    }
}
                

 

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
  • apply_template: Apply Managed Template specified by template_id
  • rule: Run actions for rule specified by rule_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)
template_id: The ID of the Managed Template to apply. (Only applicable for apply_template action)
rule_id: The ID of the Rule (Manual Action) to apply. (Only applicable for rule action)

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
POST http://mypc:17790/api/miners/14?action=apply_template&template_id=2

 

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

Response example
{
	"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

Response example
{
	"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

Response example
{
	"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

 

Get list of all Managed Templates

GET http://mypc:17790/api/managedtemplates

Response example
{
    "managedTemplateList": [
        {
            "id": 3,
            "name": "CcMiner X11 template"
        },
        {
            "id": 2,
            "name": "Eth Dec Template"
        }
    ],
    "metaData": {
        "updated": "2017-09-26 19:28:31",
        "edition": "Ultimate Edition 200",
        "version": "4.0.3",
        "infoList": [],
        "warningList": []
    }
}
                

 

Get dashboard summary

GET http://mypc:17790/api/summary

Response example
{
    "runningCount": 1,
    "totalCount": 4,
    "gpuCount": 1,
    "pgaCount": 0,
    "asicCount": 0,
    "exchangeRate": "$3 912,97",
    "revenuePerDay": "$0,84",
    "revenuePerMonth": "$25,35",
    "coinList": [
        {
            "name": "Unspecified Ethereum",
            "activeCount": 1,
            "hashRate5s": "19,01 MH\/s",
            "hashRateAvg": "19,01 MH\/s",
            "revenue": "$0,84"
        }
        ],
        "algorithmList": [
        {
            "name": "Ethereum",
            "activeCount": 1,
            "hashRate5s": "19,01 MH\/s",
            "hashRateAvg": "19,01 MH\/s",
            "revenue": "$0,84"
        }
    ],
    "metaData": {
        "updated": "2017-09-26 19:28:31",
        "edition": "Ultimate Edition 200",
        "version": "4.0.3",
        "infoList": [],
        "warningList": []
    }
}
                

 

Get User ID for a given username

GET http://mypc:17790/api/user/{username}
username: The username of the user as defined in the Options dialog, Security section.

Response example
{
    "userId": 5
}
                

 

API security

Awesome Miner can be configured to require a valid API key in order to give access any of the API methods. The key can be configured in Options dialog, Awesome Miner API section where Require API key can be set. When enabled, the same API key must be passed as an URL parameter as indicated below.

GET http://mypc:17790/api/summary?key=1234567890

Filter data per user account

This API method can be used with the multi-user access feature in Awesome Miner, where multiple user accounts and permissions to specific miners are configured in the Options dialog, Security section. By specifying the User ID as a parameter to the API calls, the result will be based on what the specified user is allowed to see.

These are two examples of how the API methods above can be used together with restriction based on the User ID.
GET http://mypc:17790/api/summary?user_id=5
GET http://mypc:17790/api/miners?user_id=2

In order to get the User ID for a user account, see the section above: Get User ID for a given username.

Back to help section