V2 Worker Endpoint
https://api.grinmint.com
Returns json data about all the workers of a single user.
URL
/v2/user/:user/workers
Method:
GET
URL Params
Required:
user=[string]
Data Params
None
Success Response:
-
Code: 404 or 500
-
Content:
Field Type Description status bool Response status workers []object Array of workers - name string Name of the worker - agent string Agent of the worker - last_seen string Last time the worker submitted a share - statistics []object Array of algorithm statistics for this worker -- algorithm string Name of the algorithm stats -- current_hashrate number Current user hashrate for this algorithm -- average_hashrate number Current user average hashrate for this algorithm -- valid_shares number Number of valid shares submitted for this algorithm -- invalid_shares number Number of invalid shares submitted for this algorithm -- stale_shares number Number of stale shares submitted for this algorithm
Error Response:
-
Code: 200
-
Content:
Field Type Description status bool Response status message string Reason for error
Sample Call:
$.ajax({
url: "/v2/user/quentin@blockcypher.com/workers",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Returns json data about a single worker.
URL
/v2/user/:user/worker/:worker/workerStats
Method:
GET
URL Params
Required:
user=[string]
worker=[string]
Data Params
None
Success Response:
-
Code: 200
-
Content:
Field Type Description status bool Response status worker object Worker statistics - name string Name of the worker - agent string Agent of the worker - last_seen string Last time the worker submitted a share - statistics []object Array of algorithm statistics for this worker -- algorithm string Name of the algorithm stats -- current_hashrate number Current user hashrate for this algorithm -- average_hashrate number Current user average hashrate for this algorithm -- valid_shares number Number of valid shares submitted for this algorithm -- invalid_shares number Number of invalid shares submitted for this algorithm -- stale_shares number Number of stale shares submitted for this algorithm
Error Response:
-
Code: 404 or 500
-
Content:
Field Type Description status bool Response status message string Reason for error
Sample Call:
$.ajax({
url: "/v2/user/quentin@blockcypher.com/worker/rig1/workerStats",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Returns json data about the worker hashrate historical data.
URL
/v2/user/:user/worker/:worker/workerHistory
Method:
GET
URL Params
user=[string]
worker=[string]
Data Params
None
Success Response:
-
Code: 200
-
Content:
Field Type Description status bool Response status name string Name of the worker agent string Agent of the worker last_seen string Last time the worker submitted a share hashrates []object Array of primary PoW hashrate data - time number Time of the data - hashrates number Array ([c29, c31, c32, c33]) of hashrates at that time - average_hashrates number Array ([c29, c31, c32, c33]) of average hashrates at that time
Error Response:
-
Code: 404 or 500
-
Content:
Field Type Description status bool Response status message string Reason for error
Sample Call:
$.ajax({
url: "/v2/user/quentin@blockcypher.com/worker/rig1/workerHistory",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});