/v1/difficulty
Difficulty & hashrate
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/bitcoin-api/v1/difficulty" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bitcoin-api/v1/difficulty", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bitcoin-api/v1/difficulty");
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/bitcoin-api/v1/difficulty",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"current_hashrate": 1.010240014129629e+21,
"progress_percent": 17.91,
"remaining_blocks": 1655,
"current_difficulty": 138955357012247.3,
"average_block_time_s": 614,
"next_retarget_height": 953568,
"estimated_retarget_date": 1781273566580,
"difficulty_change_percent": -0.64
},
"meta": {
"timestamp": "2026-06-01T00:03:52.866Z",
"request_id": "55091d2f-9729-4836-ba2f-b2139a8a1eb9"
},
"status": "ok",
"message": "Difficulty retrieved",
"success": true
}