{"uid":"cap_lZ5A9xlCCTbxxzeyFnfw1","slug":"bitcoin-hashrate-difficulty-api-3a6f8bf1","name":"Bitcoin Hashrate & Difficulty API","description":"Bitcoin network hashrate (EH/s) with the last 3 daily averages, current difficulty, difficulty-epoch progress and expected change, and miner revenue over the last 144 blocks (about one day): total reward incl. fees in BTC, fee share and average reward per block. Network-wide figures from mempool.space, not per-miner.","url":"https://api.chainmarket-api.workers.dev/api/crypto/bitcoin-hashrate-difficulty?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"source":"https://mempool.space/api/v1/mining/hashrate/3d","checkedAt":"2026-10-23T09:35:55.592Z","difficultyEpoch":{"progressPct":51.44,"remainingBlocks":979,"expectedChangePct":4.87,"previousChangePct":5.92,"nextRetargetHeight":973728},"currentDifficulty":140577680051919.6,"currentHashrateEhs":1056.08,"dailyAvgHashrateEhs":[{"ehs":1151.84,"date":"2026-10-21"},{"ehs":1093.16,"date":"2026-10-22"}],"minerRevenueLast144Blocks":{"blocks":144,"feeSharePct":0.56,"totalFeeBtc":2.53198837,"totalRewardBtc":452.53198837,"avgRewardPerBlockBtc":3.142583}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DUQlrtmax1c8erZwszXxn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current Bitcoin network hashrate, mining difficulty, difficulty epoch progress, and miner revenue statistics from mempool.space data.","exampleAgentPrompt":"What's Bitcoin's current mining hashrate and difficulty, and how far along are we in the current difficulty epoch?","exampleUseCases":[{"title":"Difficulty adjustment forecast for miners","prompt":"How far are we into the current Bitcoin difficulty epoch, how many blocks are left until retarget, and what percentage change is expected?"},{"title":"Miner revenue breakdown dashboard","prompt":"Pull the latest Bitcoin miner revenue data — total BTC earned in the last 144 blocks, average reward per block, and what share came from fees versus block subsidy."},{"title":"Hashrate trend monitoring for analysts","prompt":"Give me Bitcoin's current network hashrate in EH/s plus the daily average hashrate for the past couple of days so I can track if it's trending up or down."}],"resultDescription":"A JSON object containing: the current Bitcoin difficulty value, current hashrate in EH/s, daily average hashrate array with date labels, difficulty epoch progress (percent complete, remaining blocks, expected change %, previous change %), next retarget block height, and miner revenue stats for the last 144 blocks (total fees in BTC, total reward in BTC, average reward per block, fee share percentage). Data is sourced from mempool.space and timestamped at time of check.","failureModes":["Upstream mempool.space API unavailable — returns error or stale data","Network timeout from Cloudflare Worker — returns HTTP 5xx","Payment failure — x402 payment not accepted, call not charged","Unexpected response schema if mempool.space changes its API structure"],"whenToPreferThis":"Choose this endpoint when you need a single, low-cost, pay-per-call lookup of Bitcoin mining fundamentals (hashrate, difficulty, epoch progress, miner revenue) without setting up API keys or subscriptions. Ideal for agents that need occasional on-demand Bitcoin network health snapshots rather than streaming or high-frequency data. Prefer this over general crypto data APIs when you specifically need proof-of-work mining metrics rather than price data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T12:42:16.719Z","isFirstParty":false,"canonicalSlug":"bitcoin-hashrate-difficulty-api-3a6f8bf1"}