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. 

Mining

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 raw API report data for a specific miner

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


Pools

Get list of all pools

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

Response example 


{
    "canAction": true,
    "list": [
        {
            "id": 1,
            "description": "Antpool Bitcoin",
            "coinClass": "PreDefined",
            "coinShortName": "BTC",
            "coinDisplayName": "Bitcoin",
            "coinAlgorithm": "SHA256",
            "url": "stratum+tcp://stratum.antpool.com:3333",
            "workerName": "awesomeuser.1",
            "walletAddress": "",
            "plainWorkerPassword": ""
        },
        {
            "id": 2,
            "description": "Nicehash Ethereum",
            "coinClass": "PreDefined",
            "coinShortName": "ETH",
            "coinDisplayName": "Ethereum",
            "coinAlgorithm": "Ethereum",
            "url": "stratum+tcp://daggerhashimoto.usa.nicehash.com:3353",
            "workerName": "",
            "walletAddress": "15i...",
            "plainWorkerPassword": ""
        }
    ]
}
                
 

Get information about a specific pool

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

Response example 


{
    "id": 1,
    "description": "Antpool Bitcoin",
    "coinClass": "PreDefined",
    "coinShortName": "BTC",
    "coinDisplayName": "Bitcoin",
    "coinAlgorithm": "SHA256",
    "url": "stratum+tcp://stratum.antpool.com:3333",
    "workerName": "awesomeuser.1",
    "walletAddress": "",
    "plainWorkerPassword": ""
}
                

Add or update a pool

POST http://mypc:17790/api/pools
POST body: If the ID is 0 or not specified, the pool will be added. If the ID matches an existing pool, the properties of the pool will be updated
POST body example 
{
    "id": 3
    "description": "New Antpool Bitcoin",
    "coinClass": "PreDefined",
    "coinShortName": "BTC",
    "coinAlgorithm": "SHA256",
    "url": "stratum+tcp://stratum.antpool.com:3333",
    "workerName": "awesomeuser.3",
    "walletAddress": "",
    "plainWorkerPassword": ""
}
                

 

Remove a pool

DELETE http://mypc:17790/api/pools/{id}
id: The ID of the pool to remove


Get list of all Pool Groups

GET http://mypc:17790/api/poolgroups

Response example 


[
    {
        "id": "1",
        "name": "Dual Mining Eth + Dec"
    },
    {
        "id": "2",
        "name": "Equihash group"
    }
]
                

Managed Hosts

Properties:
  • id: ID of host
  • description: Description of host (optional)
  • hostname: Hostname or IP address of remote computer running Awesome Miner Remote Agent
  • protocolVersion: Specifies communication protocol version. Use 1 for Remote Agent on Windows and 2 for Remote Agent on Linux

Get list of all hosts

GET http://mypc:17790/api/hosts

Response example 


[    
    {
        "id": 2,
        "description": "RemoteMiner nVidia",
        "hostname": "192.168.0.228",
        "protocolVersion": 1
    },
    {
        "id": 5,
        "description": "RemoteMiner AMD",
        "hostname": "192.168.0.237",
        "protocolVersion": 1
    }
]
                

Get information about a specific host

GET http://mypc:17790/api/hosts/{id}
id: The ID of the host

Response example 


{
    "id": 5,
    "description": "RemoteMiner AMD",
    "hostname": "192.168.0.237",
    "protocolVersion": 1
}
                

Add or update a host

POST http://mypc:17790/api/hosts
POST body: If the ID is 0 or not specified, the host will be added. If the ID matches an existing host, the properties of the host will be updated


Response: When adding a new Managed Host, the response will contain the unique ID that was assigned to the new host.

{
    "id": 0,
    "description": "My new host to be added",
    "hostname": "192.168.0.241",
    "protocolVersion": 1
}
                

 

Remove a Managed Host

DELETE http://mypc:17790/api/hosts/{id}
id: The ID of the host to remove


Get GPU system information for a specific host

Properties:
  • name: Name of the GPU
  • id: Unique identifier for a specific GPU
  • vendorId: Unique number among the AMD or nVidia cards. The first AMD card and the first nVidia card both have VendorId 0.
  • pciBusId: The ID of the PCI bus where the GPU is installed


GET http://mypc:17790/api/hosts/{id}/systeminfo
id: The ID of the host

Response example 


{
    "gpuStatusList": [
        {
            "name": "Radeon RX 580 Series",
            "id": 0,
            "vendorId": 0,
            "pciBusId": 1
        },
        {
            "name": "NVIDIA GeForce GTX 1080 Ti",
            "id": 1,
            "vendorId": 0,
            "pciBusId": 2
        },
        {
            "name": "NVIDIA GeForce GTX 1080 Ti",
            "id": 2,
            "vendorId": 1,
            "pciBusId": 3
        },
        {
            "name": "NVIDIA GeForce GTX 1080 Ti",
            "id": 3,
            "vendorId": 2,
            "pciBusId": 4
        }
    ]
}
                
 

Managed Miners

Properties:
  • id: ID of miner
  • description: Description of miner (optional)
  • hostId: ID of Managed Host where the mining will be running
  • isPoolGroup: Specifies if the pool is a Pool Group (true) or a single Pool (false)
  • poolId: ID of the pool, either the ID of a Pool Group or a single Pool
  • commandLineParams: Command line to use when starting the mining software
  • softwareAutoDownload: Specifies if the mining software should be automatically downloaded (true) or if a custom software path should be used (false)
  • softwareType: ID of the mining software to use (see /api/miningsoftware)
  • softwarePath: Custom software path to use when automatic download isn't used
  • algorithm: The ID of algorithm to use for mining (see /api/algorithms)
  • dualAlgorithm: The ID of algorithm to use for dual mining (see /api/algorithms). Only supported for Claymore Dual Ethereum miner and Excavator miner.  If dual mining isn't used, the value is Unspecified.
  • tagList: An array of ID's of the tags set on the miner (see /api/tags)

Get list of all Managed Miners

GET http://mypc:17790/api/managedminers

Response example 


[
    {
        "id": 6,
        "description": "My AMD Ethereum Miner",
        "hostId": 2,
        "isPoolGroup": true,
        "poolId": 15,
        "commandLineParams": "",
        "softwareAutoDownload": true,
        "softwareType": "EthClayMiner",
        "softwarePath": "",
        "algorithm": "Ethereum",
        "dualAlgorithm": "Blake2b",
        "tagList": [
            2,
            4
        ]
    },
    {
        "id": 7,
        "description": "EWBF Equihash miner",
        "hostId": 1,
        "isPoolGroup": false,
        "poolId": 4,
        "commandLineParams": "",
        "softwareAutoDownload": true,
        "softwareType": "ZecEwbfMiner",
        "softwarePath": "",
        "algorithm": "Equihash",
        "dualAlgorithm": "Unspecified",
        "tagList": [
        ]
    }
]
                

Get information about a specific Managed Miner

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

Response example 


{
    "id": 6,
    "description": "My AMD Ethereum Miner",
    "hostId": 2,
    "isPoolGroup": true,
    "poolId": 15,
    "commandLineParams": "",
    "softwareAutoDownload": true,
    "softwareType": "EthClayMiner",
    "softwarePath": "",
    "algorithm": "Ethereum",
    "dualAlgorithm": "Blake2b",
    "tagList": [
        2,
        4
    ]
}
                

Add or update a Managed Miner

POST http://mypc:17790/api/managedminers
POST body: If the ID is 0 or not specified, the Managed Miner will be added. If the ID matches an existing Managed Miner, the properties of the Managed Miner will be updated


Response: When adding a new Managed Miner, the response will contain the unique ID that was assigned to the new Managed Miner.

{
    "id": 0,
    "description": "My nVidia Ethereum Miner",
    "hostId": 1,
    "isPoolGroup": false,
    "poolId": 2,
    "commandLineParams": "-platform 2",
    "softwareAutoDownload": true,
    "softwareType": "EthClayMiner",
    "softwarePath": "",
    "algorithm": "Ethereum",
    "dualAlgorithm": "",
    "tagList": [
        2,
        4,
        5
    ]
}
                

 

Remove a Managed Miner

DELETE http://mypc:17790/api/managedminers/{id}
id: The ID of the managed miner to remove


External Miners

Properties:
  • id: ID of miner
  • description: Description of miner (optional)
  • hostname: The IP address or hostname where the miner is located
  • softwareType: ID of the mining software to use (see /api/miningsoftware)
  • algorithm: The ID of algorithm used by the miner (see /api/algorithms). Used to filter mining software and pools. (optional)
  • dualAlgorithm: The ID of algorithm to use for dual mining (see /api/algorithms). Only supported for Claymore Dual Ethereum miner and Excavator miner.  If dual mining isn't used, the value is Unspecified.
  • tagList: An array of ID's of the tags set on the miner (see /api/tags)
  • softwarePath: Custom software path to use when automatic download isn't used
  • useAddToWorkerName: Specify if the concept of adding miner unique worker name should be used (true or false)
  • addToWorkerName: Specify the miner unique worker name
  • enableProfitSwitching: Specify if the profit switching for ASIC miners should be enabled (true or false)
  • profitProfileId: ID of profit profile to use (default: -1)

Get list of all External Miners

GET http://mypc:17790/api/externalminers

Response example 


[
    {
        "id": 1000000005,
        "description": "My Antminer D9",
        "hostname": "192.168.0.120",
        "softwareType": "CgMinerCustom",
        "algorithm": "X11",
        "dualAlgorithm": "Unspecified",
        "tagList": [
            3,
            5
        ],
        "useAddToWorkerName": true,
        "addToWorkerName": "001",
        "enableProfitSwitching": true,
        "profitProfileId": 5
    },
    {
        "id": 1000000004,
        "description": "My Antminer L3+",
        "hostname": "192.168.0.121",
        "softwareType": "CgMinerCustom",
        "algorithm": "Scrypt",
        "dualAlgorithm": "Unspecified",
        "tagList": [],
        "useAddToWorkerName": false,
        "addToWorkerName": "",
        "enableProfitSwitching": false,
        "profitProfileId": -1
    }
]

Get information about a specific External Miner

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

Response example 


{
    "id": 1000000005,
    "description": "My Antminer D9",
    "hostname": "192.168.0.120",
    "softwareType": "CgMinerCustom",
    "algorithm": "X11",
    "dualAlgorithm": "Unspecified",
    "tagList": [
        3,
        5
    ],
    "useAddToWorkerName": true,
    "addToWorkerName": "001",
    "enableProfitSwitching": true,
    "profitProfileId": 5
}

Add or update an External Miner

POST http://mypc:17790/api/externalminers
POST body: If the ID is 0 or not specified, the External Miner will be added. If the ID matches an existing External Miner, the properties of the External Miner will be updated


Response: When adding a new External Miner, the response will contain the unique ID that was assigned to the new External Miner.

{
    "id": 1000000005,
    "description": "My Antminer D9",
    "hostname": "192.168.0.120",
    "softwareType": "CgMinerCustom",
    "algorithm": "X11",
    "dualAlgorithm": "Unspecified",
    "tagList": [
        3
    ],
    "useAddToWorkerName": true,
    "addToWorkerName": "001",
    "enableProfitSwitching": false,
    "profitProfileId": -1
}

 

Remove an External Miner

DELETE http://mypc:17790/api/externalminers/{id}
id: The ID of the External Miner to remove


Tags

Get list of all tags

GET http://mypc:17790/api/tags


Response: The ID field is a unique identifier for a specific tag, and can be used to refer to the tags in API calls. The description field is only used for display purpose. The color field is a hexadecimal representation of the color to be used for the tag, and must always start with a '#'.

[
    {
        "id": 2,
        "description": "AMD",
        "color": "#A00000"
    },
    {
        "id": 3,
        "description": "nVidia",
        "color": "#00B050"
    },
    {
        "id": 4,
        "description": "Remote Site",
        "color": "#366092"
    }
]
                

 

Get information about a specific tag

GET http://mypc:17790/api/tags/{id}
id: The ID of the tag

Response example 


{
    "id": 2,
    "description": "AMD",
    "color": "#A00000"
}
                
 

Add or update a tags

POST http://mypc:17790/api/tags
POST body: If the ID is 0 or not specified, the tag will be added. If the ID matches an existing tag, the properties of the tag will be updated


Response: When adding a new tag, the response will contain the unique ID that was assigned to the new tag.

{
    "id": 0,
    "description": "My New Tag",
    "color": "#FF00FF"
}
                

 

Remove a tag

DELETE http://mypc:17790/api/tags/{id}
id: The ID of the tag to remove


Mining software and algorithms

Get list of all mining software

GET http://mypc:17790/api/miningsoftware


Response: The ID field is a unique identifier for a specific mining software, and can be used to refer to the mining software in API calls. The name field  is only intended for display purposes.

[
    {
        "id": "SgMiner",
        "name": "SgMiner"
    },
    {
        "id": "EthClayMiner",
        "name": "Claymore's Dual Ethereum Miner"
    },
    {
        "id": "ZecClayMiner",
        "name": "Claymore's Zcash Miner"
    },
    {
        "id": "GenericMiner",
        "name": "Generic Miner"
    }
]
                

 

Get list of all algorithms

GET http://mypc:17790/api/algorithms


Response: The ID field is a unique identifier for a specific algorithm, and can be used to refer to the algorithm in API calls. The name field  is only intended for display purposes.

[
    {
        "id": "Bitcore",
        "name": "Bitcore"
    },
    {
        "id": "Blake2b",
        "name": "Blake 2b"
    },
    {
        "id": "Yescrypt",
        "name": "Yescrypt"
    },
]
                

 

Notifications

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


Managed Templates

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": []
    }
}
                

 

Dashboard

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": []
    }
}
                

 

Coins

Set coin profitability

POST http://mypc:17790/api/coins/{shortname}?profit=...
shortname: The short name of the coin (for example LTC for Litecoin)
profit: The profit of the coin expressed in BTC per MH/s


Example:

POST http://mypc:17790/api/coins/LTC?profit=0.000014


Add user defined coin with profitability
 Similar to the API call to set coin profitability, a new user defined coin can automatically be added if no coin with the specified short name exists. The name and algorithm parameters must be specified  for the coin to be added. If the coin already exists, the name and algorithm parameters will be ignored and only the profitability will be updated.

POST http://mypc:17790/api/coins/{shortname}?name=...&algorithm=...&profit=...
POST http://mypc:17790/api/coins/{shortname}?name=...&algorithm=...&difficulty=...&reward=...&btc=...
POST http://mypc:17790/api/coins/{shortname}?name=...&algorithm=...&difficulty=...&reward=...&usd=...
shortname: The short name of the coin (for example LTC for Litecoin)
name: The full name of the coin to be added
algorithm: The name of the algorithm to be added (as specified in Awesome Miner, Options dialog, Algorithms section)
 Specify either:
profit: The profit of the coin expressed in BTC per MH/s
 Or specify the following:
difficulty: The current coin difficulty
reward: The current coin block reward
btc: The exchange rate of the coin expressed in BTC. Specify either the btc property or the usd property.
usd: The exchange rate of the coin expressed in USD. Specify either the btc property or the usd property.


Examples:

POST http://mypc:17790/api/coins/ABC?name=MyAbcCoin&algorithm=Scrypt&profit=0.000015
POST http://mypc:17790/api/coins/ABC?name=MyAbcCoin&algorithm=Scrypt&difficulty=43.2&reward=10&btc=0.0012
POST http://mypc:17790/api/coins/ABC?name=MyAbcCoin&algorithm=Scrypt&difficulty=5510&reward=10&usd=1.44


Delete user defined coin

DELETE http://mypc:17790/api/coins/{shortname}
shortname: The short name of the user defined coin to be removed


Example:

DELETE http://mypc:17790/api/coins/ABC

 

Coin statistics

Get list of all coins with statistics

 The information can be requested for a specific Profit Profile by adding the parameter ?profile_id= followed by the ID number of a profit profile 
GET http://mypc:17790/api/coins/stats
 Response example 
[
    {
        "shortName": "ACM",
        "displayName": "Actinium",
        "algorithm": "Lyra2z",
        "revenuePerDayBtc": 0.00072806903420785034,
        "profitPerDayBtc": 0.00072667763306690143,
        "revenuePerDay": "$5,02",
        "profitPerDay": "$5,01",
        "profileHashrate": 26000000,
        "blocks": 79279,
        "minBlockTimeSec": 150,
        "difficulty": 131.31999584199585,
        "reward": 40,
        "networkHashRate": 3065914780.7751,
        "priceRelativeBtc": 0.00000457,
        "priceUSD": 0.031530806400000007
    },
    {
        "shortName": "AEON",
        "displayName": "Aeon",
        "algorithm": "CryptoNightLiteV7",
        "revenuePerDayBtc": 0,
        "profitPerDayBtc": 0,
        "revenuePerDay": "$0,00",
        "profitPerDay": "$0,00",
        "profileHashrate": 0,
        "blocks": 995125,
        "minBlockTimeSec": 240,
        "difficulty": 3082757077.9521828,
        "reward": 8.61,
        "networkHashRate": 12844821.1581341,
        "priceRelativeBtc": 0.00011198,
        "priceUSD": 0.7726082496
    },
...
]
                

 

Online Services statistics

Get list of all online services with statistics

 The information can be requested for a specific Profit Profile by adding the parameter ?profile_id= followed by the ID number of a profit profile   
GET http://mypc:17790/api/onlineservices/stats
 Response example 
[
    {
        "description": "NiceHash",
        "providerType": "NiceHash",
        "algorithm": "Scrypt",
        "btcPerMhsPerDay": 4.959e-7,
        "revenuePerDayBtc": 3.57048e-7,
        "profitPerDayBtc": 3.57048e-7,
        "revenuePerDay": "$0,0025",
        "profitPerDay": "$0,0025",
        "profileHashrate": 720000
    },
    {
        "description": "NiceHash",
        "providerType": "NiceHash",
        "algorithm": "X11",
        "btcPerMhsPerDay": 1.74e-8,
        "revenuePerDayBtc": 0.00174,
        "profitPerDayBtc": 0.00174,
        "revenuePerDay": "$12,03",
        "profitPerDay": "$12,03",
        "profileHashrate": 100000000000
    },
...
]
                

 

Profit profiles

Get list of all profit profiles

GET http://mypc:17790/api/profitprofiles
 Response example 
[
    {
        "id": "1",
        "name": "AMD GPU"
    },
    {
        "id": "3",
        "name": "Intel CPU"
    },
    {
        "id": "2",
        "name": "nVidia GPU"
    }
]
                

Users

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.