WhatToMine API Documentation

API Authorization

To access the API endpoints, you need to include your API token for authorization. There are two ways to include your token:

1. Authorization Header

Include the following header in your HTTP request:

Authorization: Token <your_api_token>

2. Query Parameter

Alternatively, you can include your API token as a query parameter in the URL:

?api_token=<your_api_token>

Replace <your_api_token> with your actual API token.

Rate Limiting

API requests are subject to monthly rate limits based on your subscription plan. Every API response includes headers to help you track your usage:

Rate Limit Headers

  • X-RateLimit-Limit: Your monthly request limit
  • X-RateLimit-Used: Number of requests made this month
  • X-RateLimit-Remaining: Number of requests remaining this month

Example response headers:

X-RateLimit-Limit: 10000
X-RateLimit-Used: 150
X-RateLimit-Remaining: 9850

Calculation Endpoint

GET https://whattomine.com/api/v1/calculate

Calculate mining profitability based on provided parameters.

This endpoint provides a shorthand syntax for passing in per-algorithm settings, so that they fit within the request URL limits. See the POST version for a more machine-friendly format.

Request Parameters

  • cost: Electricity cost (optional)
  • Algorithm parameters: Format {algorithm_name}={power}|{hashrate}{unit}

Example:

https://whattomine.com/api/v1/calculate?cost=0.1&lrev2=1500|145M&eth=2000|100G

Response

Returns a list of coins with their profitability metrics based on the input parameters.

POST https://whattomine.com/api/v1/calculate

Calculate mining profitability based on provided parameters.

Request Parameters

  • cost: Electricity cost (float)
  • settings: Array of algorithm settings

Example request body:


  {
    "cost": 0.1,
    "settings": [
      {
        "algorithm": "sha256",
        "power": 3500,
        "hashrate": 110000000000000
      },
    ]
  }
  

Response

Returns a list of coins with their profitability metrics based on the input parameters.


[
  {
    "id": 1,
    "tag": "BTC",
    "name": "Bitcoin",
    "estimated_rewards": "0.03116",
    "estimated_rewards24": "0.02996",
    "btc_revenue": "0.03115865",
    "btc_revenue24": "0.02996024",
    "revenue": "121.18",
    "revenue24": "116.52",
    "profit": "112.78",
    "profit24": "108.12"
  }
]
  

Algorithms Endpoint

GET https://whattomine.com/api/v1/algorithms

Retrieve a list of supported mining algorithms.

Request Parameters

None required.

Response

Returns a list of available mining algorithms.


[
  {
    "name": "Aion",
    "param_name": "eqa"
  },
  {
    "name": "Argon2d-NIM",
    "param_name": "a2n"
  },
  {
    "name": "Autolykos",
    "param_name": "al"
  },
  # ...
]
      

Coins Endpoint

GET https://whattomine.com/api/v1/coins

Retrieve a list of active coins with their current statistics and exchange rates.

Request Parameters

None required.

Response

Returns a list of active coins, including their latest statistics and current exchange rates.


[
  {
    "id": 57,
    "tag": "ALPH",
    "name": "Alephium",
    "algorithm": "Blake3",
    "algo_param_name": "b3",
    "lagging": false,
    "testing": false,
    "last_update": "2018-12-17T10:37:01.000Z",
    "nethash": 877038100746891,
    "last_block": 1451338,
    "difficulty": 3.508152402987565e+15,
    "difficulty24": 3.808152402987565e+15,
    "difficulty3": 3.608152402987565e+15,
    "difficulty7": 3.308152402987565e+15,
    "difficulty14": 3.408152402987565e+15,
    "difficulty30": 3.708152402987565e+15,
    "exchanges": [
      {
        "name": "Poloniex",
        "last_update": "2018-12-17T10:37:01.000Z",
        "price": 2.5e-05,
        "price24": 2.5e-05,
        "price3": 2.5e-05,
        "price7": 2.5e-05,
        "price14": 2.5e-05,
        "price30": 2.5e-05,
        "volume": 1.0
      }
    ]
  },
  # ...
]
      

GPUs Endpoint

GET https://whattomine.com/api/v1/gpus

Retrieve a list of available GPUs with their mining performance data.

Request Parameters

None required.

Response

Returns a list of GPUs with their supported algorithms, hashrates, and power consumption.


[
  {
    "id": 1,
    "name": "NVIDIA GeForce RTX 4090",
    "release_date": "2022-10-12",
    "algorithms": [
      {
        "name": "Ethash",
        "hashrate": 125000000,
        "power": 350
      },
      {
        "name": "KawPow",
        "hashrate": 62000000,
        "power": 370
      }
    ]
  },
  # ...
]
      

GET https://whattomine.com/api/v1/gpus/{gpu_id}/history

Retrieve historical mining revenue data for a specific GPU.

Request Parameters

  • gpu_id: The ID of the GPU (required, in URL path)
  • coin_tag: Force showing history for specific coin instead of highest daily revenue coin (optional, in URL query)

Response

Returns historical revenue data for the specified GPU, showing daily performance metrics.


[
  {
    "coin": {
      "id": 151,
      "tag": "ETH"
    },
    "date": "2023-12-01",
    "revenue24_btc": "0.00045123",
    "revenue24_usd": "18.45"
  },
  # ...
]
      

ASICs Endpoint

GET https://whattomine.com/api/v1/asics

Retrieve a list of available ASIC miners with their mining performance data.

Request Parameters

None required.

Response

Returns a list of ASIC miners with their supported algorithms, hashrates, and power consumption.


[
  {
    "id": 1,
    "name": "Antminer S19 XP",
    "release_date": "2022-03-15",
    "algorithms": [
      {
        "name": "SHA-256",
        "hashrate": 140000000000000,
        "power": 3010
      }
    ]
  },
  # ...
]
      

GET https://whattomine.com/api/v1/asics/{asic_id}/history

Retrieve historical mining revenue data for a specific ASIC miner.

Request Parameters

  • asic_id: The ID of the ASIC miner (required, in URL path)
  • coin_tag: Force showing history for specific coin instead of highest daily revenue coin (optional, in URL query)

Response

Returns historical revenue data for the specified ASIC miner, showing daily performance metrics.


[
  {
    "coin": {
      "id": 1,
      "tag": "BTC"
    },
    "date": "2023-12-01",
    "revenue24_btc": "0.00312456",
    "revenue24_usd": "128.75"
  },
  # ...
]
      

These endpoints provide essential information for cryptocurrency mining calculations and decision-making. The API is designed to be user-friendly and provide up-to-date information on algorithms, coins, mining hardware, and profitability calculations.