Aller au contenu
GET /v1/hashprice

Current Bitcoin hashprice (USD/PH/s/day) + inputs

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/hashprice-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/hashprice-api/v1/hashprice" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/hashprice-api/v1/hashprice", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/hashprice-api/v1/hashprice");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/hashprice-api/v1/hashprice",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "The Bitcoin hashprice — the network's daily mining revenue per unit of hashrate, the miner's revenue benchmark. hashprice_usd_per_phs_day is dollars earned per petahash per second per day; per_ths_day is the same per terahash. It equals (daily Bitcoin mined × BTC price) ÷ network hashrate, where daily Bitcoin mined is the block subsidy plus fees over the last ~144 blocks. It drops as difficulty/hashrate climbs, the subsidy halves, fees fall or the price drops. Live, cached ~5m.",
        "source": "mempool.space (hashrate + block rewards) + Yahoo Finance (BTC-USD), keyless",
        "btc_price_usd": 63579.9,
        "fee_share_pct": 0.82,
        "daily_btc_mined": 453.6983,
        "network_hashrate_ehs": 894.36,
        "daily_network_revenue_usd": 28846090,
        "hashprice_usd_per_phs_day": 32.25,
        "hashprice_usd_per_ths_day": 0.032253
    },
    "meta": {
        "timestamp": "2026-06-13T04:42:53.975Z",
        "request_id": "4dfc73ab-dd27-43bd-922c-19bae5de455f"
    },
    "status": "ok",
    "message": "Hashprice retrieved successfully",
    "success": true
}