Enable API access on ASIC miners

Almost all ASIC miners provides an API which is a monitoring interface for applications like Awesome Miner to connect to. Awesome Miner can connect to this interface in order to get information about hashrates, accepted shares, pools and more. The interface can often be used for controlling the mining operations as well, for example restart the miner or change the pool.

Awesome Miner can connect to all standard based ASIC API's based on the Cgminer API. This also includes Cgminer API compatible mining software like Bmminer and Sgminer.

Restricted and Privileged mode

The API can run in two different modes.

  • Restricted (read-only mode)
    This will allow Awesome Miner to connect to the miner and display mining statistics. It is however not possible to make any changes to the miner, like restarting or changing the pool. These operations will be disabled in Awesome Miner when selecting a miner with Restricted mode.
  • Privileged (write/modify mode)
    This mode will give Awesome Miner full access to the operations of the miner.

Antminer

Antminers are by default running in Restricted mode. Awesome Miner can reconfigure them to run in Privileged mode. See Automatic setup of API access for Antminer.

Other ASIC miners

For ASIC miners except Antminer, it's a manual procedure to configure the API access. This is specific to each miner, but can typically be found in the web interface for the miner, in sections about Cgminer or API access.

Manually configure Cgminer

When connecting to an External Miner, the API access must be enabled in Cgminer configuration for that miner. There are two important parameters that are used to define API access.
  • api-listen
    This setting defines if the API should be enabled or disabled. When enabled, it will allow Awesome Miner to connect to the Cgminer/Sgminer API and request mining statistics.
  • api-allow
    If only api-listen is defined, the API will run in restricted mode. In order to enable privileged mode, api-allow needs to be defined with a prefix and IP address.

    There are two prefixes. R defines the restricted mode (read-only). W defines the privileged mode (write).

    The IP address specifies either a single IP address or a IP subnet (range of IP addresses).
    192.168.1.10 specifies that the API allows connections only from the IP address 192.168.1.10.
    192.168.1.0/24 specifies that the API allows connections from the IP address range 192.168.1.0 - 192.168.1.255 (will be written as 192.168.1.X in further examples).

Examples of api-allow usage
Configuration Description
192.168.1.10 Restricted access to IP address 192.168.1.10
W:192.168.1.10 Privileged access to IP address 192.168.1.10
W:192.168.1.0/24 Privileged access to IP addresses 192.168.1.X
W:192.168.0.0/16 Privileged access to IP addresses 192.168.X.X
W:192.168.0.0/16,W:127.0.0.1 Privileged access to IP addresses 192.168.X.X and 127.0.0.1
W:192.168.1.10,R:192.168.0.0/16 Privileged access to IP addresses 192.168.1.10 and restricted access to IP addresses 192.168.X.X (except 192.168.1.10 that will have privileged access)
W:0/0 Privileged access to all IP addresses
Back to help section