PhoenixMiner supports a Json-RPC based API for remote monitoring and control of your rigs. By default PhoenixMiner listens for incoming TCP connections on port 3333. You can change the default port number, or even disable this feature completely by using the following command-line options:

-cdm <n>

Selects the level of support of the remote monitoring and control API:

0

disabled

1

read-only - this is the default

2

full (only use on secure connections)

-cdmport <port>

Set the remote monitoring port (default is 3333). You can also specify <ip_addr:port> if you have a secure VPN connection and want to bind the remote monitoring port to it

NOTE: PhoenixMiner is backwards compatible with Claymore’s dual miner protocol for remote monitoring and management. This means that you can use any tools that are build to support Claymore’s dual miner.

IMPORTANT! All communication between the miner and the remote manager is send as plain text (including the password, if such is used), so you must not use this over publicly accessible network. If you want to use this API over public networks, you must use a VPN to encrypt the exchanges between the miner and the remote control application.

API requests

All Json-RPC requests must end with a new-line character (\n) in order to be processed by the miner.

If you have used the -cdmpass command-line parameter to set a password, you must add a psw parameter to your requests. Example: {"id":0,"jsonrpc":"2.0","method":"miner_getstat1","psw":"123456"}

miner_getstat1

Request:

{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}

Response:

{"result": ["5.5c - ETH", "46", "182724;51;0", "30502;30457;30297;30481;30479;30505", "0;0;0", "off;off;off;off;off;off", "53;71;57;67;61;72;55;70;59;71;61;70", "us1.ethermine.org:4444", "0;0;0;0"]}

Description:

This request returns information about the miner state. Here is how to parse the returned information:

“5.5c - ETH”

miner version and the currently mined coin (if known)

“46”

running time, in minutes

“182724;51;0”

total ethash hashrate in kH/s, number of ethash shares, number of ethash rejected shares.

“30502;30457;30297;30481;30479;30505”

ethash hashrate for each GPU in kH/s

“0;0;0”

total secondary coin hashrate in kH/s, number of secondary coin shares, number of secondary coin rejected shares.

“off;off;off;off;off;off”

secondary coin hashrate for each GPU in kH/s (or off if dual mining is not used)

“53;71;57;67;61;72;55;70;59;71;61;70”

temperature and fan speed in % for each GPU

“us1.ethermine.org:4444”

current mining pool. When using dual mode, the second pool will be listed too. The name of the pool may be prefixed by >, which indicates that the connection to the pool is down (e.g. during the initial pool connection, or if the miner is paused for more than a few minutes, and it disconnects from the pool until the mining is resumed)

“0;0;0;0”

number of ethash invalid shares, number of ethash pool switches, number of secondary coin invalid shares, number of secondary coin pool switches.

miner_getstat2

Request:

{"id":0,"jsonrpc":"2.0","method":"miner_getstat2"}

Response:

{"id":0,"jsonrpc":"2.0","result":["PM 5.5c - ETC", "5", "49055;7;0", "24701;24354", "0;0;0", "off;off", "60;21;55;36", "ssl://eu1-etc.ethermine.org:5555", "0;0;0;0", "3;4", "0;0", "0;0", "0;0", "0;0", "0;0", "1;3", "0;0;0", "216"]}

Description:

Returns extended information about the miner state. The first several elements in the response are the same as in the miner_getstat1 request. The rest are as follows:

“3;4”

ethash accepted shares for every GPU

“0;0”

ethash rejected shares for every GPU

“0;0”

ethash invalid shares for every GPU

“0;0”

secondary coin accepted shares for every GPU

“0;0”

secondary coin rejected shares for every GPU

“0;0”

secondary coin invalid shares for every GPU

“1;3”

PCI bus index for every GPU

“0;0;0”

min/max/average time (in ms) of accepting shares for the current pool in the last hour

“216”

total power consumption of GPUs in W

miner_restart

Request:

{"id":0,"jsonrpc":"2.0","method":"miner_restart"}

Response:

None.

Description:

Restarts miner. The action taken depends on the -rmode command line option.

miner_reboot

Request:

{"id":0,"jsonrpc":"2.0","method":"miner_reboot"}

Response:

None.

Description:

Reboots the computer. Under Windows the miner executes the batch file reboot.bat if it exists. Under Linux the miner executes the shell script reboot.sh if such exists.

control_gpu

Request:

{"id":0,"jsonrpc":"2.0","method":"control_gpu", "params":["0", "1"]}

Response:

None.

Description:

Enables or disables specific GPUs (or the whole miner). The first number in the params array is the index of the GPU to control, or -1 if we want to control the whole miner. The second number in the params array is the requested GPU state:

0

Disabled/paused

1

Enable ETH-only mode

2

Enable dual mining mode

miner_getfile

Request:

{"id":0,"jsonrpc":"2.0","method":"miner_getfile","params":["config.txt"]}

Response:

{"id":0,"jsonrpc":"2.0","error":null,"result":["config.txt","2e3c425323....4522342234"]}

Description:

Reads one file from the current folder of the miner. The only parameter is the name of the file to read (usually epools.txt, config.txt, or dpools.txt). The first element in the response result array is the name of the file, and then there is a string with hex digits with the contents of the file. Every two hex digits correspond to one byte from the file.

miner_file

Request:

{"id":0,"jsonrpc":"2.0","method":"miner_file","params":["config.txt","2e3c425323....4522342234"]}

Response:

{"id":0,"jsonrpc":"2.0","result":true,"error":null}

Description:

Uploads one file to the current folder of the miner. The first parameter is the name of the file to upload (usually epools.txt, config.txt, or dpools.txt). The second parameter is a string with hex digits with the contents of the file. Every two hex digits correspond to one byte from the file.