Skip to content
xmrig edited this page Oct 6, 2017 · 5 revisions

In version 2.4.0 added HTTP API. If you build miner from source, libmicrohttpd dependency added. If you want use API you need choice a port where is internal HTTP server will listen for incoming connections.

Example configuration:

"api": {
    "port": 8080,
    "access-token": "Optional Bearer Token used for authorization",
    "worker-id": "Optional miner name"
}

If you prefer use command line options instead of config file, you can use options: --api-port, --api-access-token and --api-worker-id.

GET / endpoint

{
    "id": "150216641909d91c",
    "worker_id": "worker",
    "version": "2.4.0",
    "kind": "cpu",
    "ua": "XMRig/2.4.0-dev (Linux x86_64) libuv/1.8.0 gcc/5.4.0",
    "cpu": {
        "brand": "Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz",
        "aes": true,
        "x64": true,
        "sockets": 1
    },
    "algo": "cryptonight",
    "hugepages": true,
    "donate": 5,
    "hashrate": {
        "total": [
            232.1,
            252.6,
            252.8
        ],
        "highest": 274.1,
        "threads": [
            [
                57.1,
                62.5,
                62.9
            ],
            [
                58.8,
                62.5,
                63.1
            ],
            [
                57.2,
                63.7,
                63.5
            ],
            [
                58.9,
                63.7,
                63.2
            ]
        ]
    },
    "results": {
        "diff_current": 10000,
        "shares_good": 1849,
        "shares_total": 1849,
        "avg_time": 41,
        "hashes_total": 18490000,
        "best": [
            10674268,
            5505855,
            5346760,
            4975689,
            4011628,
            3687853,
            3148608,
            2876595,
            2619473,
            2451160
        ],
        "error_log": []
    },
    "connection": {
        "pool": "pool.minemonero.pro:5555",
        "uptime": 75884,
        "ping": 25,
        "failures": 0,
        "error_log": []
    }
}
Clone this wiki locally