Hive API. Let’s call Ey Pi Ay)
Go to your Account
https://hiveos.farm/a/account/#pane-user
At the bottom you will be able to generate API keys. Save them.
Authentication
Every API call has a SHA-256 HMAC signature generated with your secret key. Our server generates it’s own HMAC signature and compares it with the API caller’s. If they don’t match the API call is discarded. The HMAC signature is sent as a HTTP header called ‘HMAC’.
The HMAC signature is created from the full raw POST data of your request.
Field “public_key” with your public key should be included in the request.
Example of your POST raw data:
method=getRigs&public_key=<your public key>
and the HMAC sha256 would be something like “db8c07bc43c7ca12b3df1cd5d46ad3ec76b772158f279a1c7a1eb3b45722be69” which you create with your secret key.
Then you add this hmac hash to HTTP header “HMAC: db8…” and make a HTTP POST with all this stuff.
POST URL is:
https://api.hiveos.farm/worker/eypiay.php
API Response
Responses fool the JSON RPC API http://www.jsonrpc.org/specification
So you will have “error” in json if something fails
{"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found"}, "id": null}
Or a valid response with “result” field in it:
{"jsonrpc": "2.0", "result": {"your precious data": "lalala"}, "id": null}
API methods
getWallets - get all your wallets data
getOC - get all your Overclocking profiles
getRigs - get the list of your rigs
getCurrentStats - get current monitor data
multiRocket - apply settings to multiple rigs. This method has extra parameters (POST fields). At least one is required.
[list]
[] rig_ids_str - coma separated string with rig ids “1,2,3,4”
[] miner - Miner to set. Leave it null if you do not want to change. “claymore”, “claymore-z”, “ewbf”, …
[] miner2 - Second miner to set. Leave it null if you do not want to change. “0” - if you want to unset it.
[] id_wal - ID of wallet. Leave it null if you do not want to change.
[*] id_oc - ID of OC profile. Leave it null if you do not want to change.
[/list]
So the request will look like
method=multiRocket&rig_ids_str=1,2,3&miner=claymore&public_key=<your public key>
Code examples are attached.
- PHP
- Python
- Java
If you can do other languages please send them here or with email.