-
Notifications
You must be signed in to change notification settings - Fork 338
API
xmrig edited this page Oct 2, 2017
·
6 revisions
In version 2.4.0 added HTTP API. If you build proxy 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 proxy 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
.
{
"id": "85ae231636d180c3",
"worker_id": "proxy",
"version": "2.4.0-dev",
"kind": "proxy",
"ua": "xmrig-proxy/2.4.0-dev (Windows NT 10.0; Win64; x64) libuv/1.13.1 gcc/7.1.0",
"donate_level": 2,
"donated": 0.0,
"uptime": 274,
"hashrate": {
"total": [
0.0,
0.0,
0.0,
0.0,
0.0
]
},
"miners": {
"now": 1,
"max": 1
},
"upstreams": 1,
"results": {
"accepted": 9,
"rejected": 0,
"invalid": 0,
"avg_time": 30,
"latency": 86,
"hashes_total": 18000,
"hashes_donate": 0,
"best": [
62072,
16792,
8239,
7117,
3872,
2776,
2350,
2327,
2076,
0
],
"error_log": []
}
}
Per worker and overall hashrate statistics.
{
"hashrate": {
"total": [
0.1,
0.0,
0.0,
0.0,
0.0
]
},
"workers": [
[
"x",
"192.168.1.2",
1,
14,
0,
0,
28000,
1506315222361,
0.1,
0.0,
0.0,
0.0,
0.0
]
]
}
Worker information:
- Worker name, any string, equal to username used in miner.
- Last worker ip address.
- Connection count.
- Accepted shares count.
- Rejected by upstream pool shares count.
- Invalid shares (expired, etc), not passed to upstream pool.
- Total hashes.
- Timestamp of last submitted hash.
- 1 minute hashrate.
- 10 minutes hashrate.
- 1 hour hashrate.
- 12 hours hashrate.
- 24 hours hashrate.