Worker Endpoint

  • Access to the API is limited to 150 requests / minutes / ip.
  • All API Response are cached for 2 minutes.
  • All endpoints are CORS enabled.
  • Endpoint: http://api.grinmint.com

Workers

Returns json data about all the workers of a single user.

  • URL

    /v1/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
      - current_hashrate number Current user hashrate
      - average_hashrate number Average user hashrate
      - valid_shares number Number of valid shares submitted
      - rejected_shares number Number of rejected shares submitted
      - stale_shares number Number of stale shares submitted
  • Error Response:

    • Code: 200

    • Content:

      Field Type Description
      status bool Response Status
      message string Reason for error
  • Sample Call:

      $.ajax({
        url: "/v1/user/quentin@blockcypher.com/workers",
        dataType: "json",
        type : "GET",
        success : function(r) {
          console.log(r);
        }
      });
    

Worker Stats

Returns json data about a single worker.

  • URL

    /v1/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 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
      - current_hashrate number Current user hashrate
      - average_hashrate number Average user hashrate
      - valid_shares number Number of valid shares submitted
      - rejected_shares number Number of rejected shares submitted
      - stale_shares number Number of stale shares submitted
  • Error Response:

    • Code: 404 or 500

    • Content:

      Field Type Description
      status bool Response Status
      message string Reason for error
  • Sample Call:

      $.ajax({
        url: "/v1/user/quentin@blockcypher.com/worker/rig1/workerStats",
        dataType: "json",
        type : "GET",
        success : function(r) {
          console.log(r);
        }
      });
    

Worker History

Returns json data about the worker hashrate historical data.

  • URL

    /v1/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 hashrate data
      - time number Time of the data
      - hashrate number Hashrate at that time
      - average_hashrate number Average Hashrate 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: "/v1/user/quentin@blockcypher.com/worker/rig1/workerHistory",
        dataType: "json",
        type : "GET",
        success : function(r) {
          console.log(r);
        }
      });