CoinCalculators provides a free public API for accessing mining profitability data. No API key required.
All endpoints return application/json. CORS is enabled for all origins.
/api/coins.json
— All mineable coins with live data
Returns all tracked cryptocurrencies with current network statistics and pricing.
curl https://coincalculators.io/api/coins.json
| Field | Type | Description |
|---|---|---|
tag | string | Coin ticker symbol (e.g. "ETC") |
algorithm | string | Mining algorithm name |
nethash | number | Network hash rate in h/s |
difficulty | number | Current difficulty |
difficulty24 | number | 24h average difficulty |
block_time | number | Average block time in seconds |
block_reward | number | Current block reward |
exchange_rate | number | Price in BTC |
market_cap | string | Market capitalisation (USD) |
volume | string | 24h trading volume |
profitability24 | number | Profitability relative to top coin (100 = top) |
{
"coins": {
"Ethereum Classic": {
"id": 162,
"tag": "ETC",
"algorithm": "Ethash",
"nethash": 186000000000000,
"difficulty": "3.04P",
"block_time": "13.29",
"block_reward": 2.56,
"exchange_rate": 0.000425,
"exchange_rate_curr": "BTC",
"market_cap": "$3.1B",
"volume": "$210M",
"profitability24": 100
}
}
}
/api/proxy.php
— WhatToMine mirror proxy
Proxies the WhatToMine coins.json endpoint with CORS headers. Useful if your client is blocked by WhatToMine's CORS policy.
curl https://coincalculators.io/api/proxy.php
Response is identical to whattomine.com/coins.json. Cached for 60 seconds.
// Fetch all coin data and calculate daily profit for your miner
const response = await fetch('https://coincalculators.io/api/proxy.php');
const { coins } = await response.json();
const myHashrateHs = 98e6; // 98 Mh/s (RTX 3080 on Ethash)
const myWatt = 225;
const elecPrice = 0.10; // $/kWh
const btcUSD = 50000; // fetch from CoinGecko
for (const [name, coin] of Object.entries(coins)) {
if (coin.algorithm !== 'Ethash') continue;
const nethash = parseFloat(coin.nethash);
const blockTime = parseFloat(coin.block_time);
const blockReward = parseFloat(coin.block_reward24 || coin.block_reward);
const priceUSD = parseFloat(coin.exchange_rate) * btcUSD;
const dailyCoins = (myHashrateHs / nethash) * (86400 / blockTime) * blockReward;
const dailyRevenue = dailyCoins * priceUSD;
const dailyCost = (myWatt / 1000) * 24 * elecPrice;
const dailyProfit = dailyRevenue - dailyCost;
console.log(`${name}: $${dailyProfit.toFixed(2)}/day`);
}
No rate limiting is currently enforced. Please cache responses on your end — the underlying data updates approximately every 5 minutes.
API questions? Contact us.