Independent project — BTCBench is not affiliated with Bitcoin.org, mempool.space, CoinGecko, Yahoo Finance, exchanges, wallets, or blockchain explorers. Data is for informational use only.
Free Public Bitcoin Fee API — No Key Required

Bitcoin fee data, widgets and developer examples

Simple, copy-paste public examples for using the free BTCBench Bitcoin fee API in dashboards, crypto blogs, WordPress sites, newsletters, and developer experiments. JavaScript, Python, PHP, and WordPress shortcode — all in one place. This repository contains example files only, not BTCBench production source code.

GET https://www.btcbench.com/api/v1/fees.json

Current example files

Each file is standalone and designed to be opened, read, and copied without a build process. Preview the live version on BTCBench.com, view the file on GitHub, or download directly from GitHub.

JS

JavaScript Example

Fetch and display current Bitcoin fee estimates directly in the browser. No dependencies required.

examples/javascript/current-fees.html
PY

Python Example

Command-line script using the Python standard library only. No third-party packages needed.

examples/python/current-fees.py
PHP

PHP Example

Server-side PHP page that fetches and renders current Bitcoin fee estimates with USD cost estimates.

examples/php/current-fees.php
WP

WordPress Shortcode

Drop a fee widget into any post, page, or sidebar using a simple shortcode. Includes PHP, JS, and CSS.

examples/wordpress/shortcode-example.php
HTML

Simple Fee Card Widget

A compact, self-contained Bitcoin fee card widget. Drop it into any HTML page or iframe it into a blog.

widgets/simple-fee-card.html
MD

Endpoint Reference

Field-by-field notes on the BTCBench fee JSON response, CSV endpoint, and status endpoint.

docs/endpoints.md

Copy and paste to get started

These short snippets are enough to pull live Bitcoin fee data into your project. Each full example file includes error handling, USD cost estimates, and a styled display.

// Fetch current Bitcoin fee estimates from BTCBench
fetch("https://www.btcbench.com/api/v1/fees.json")
  .then(response => response.json())
  .then(data => {
    const fees = data.fees;
    console.log("Fastest: ",  fees.fastest,  "sat/vB");
    console.log("Normal:  ",  fees.halfHour, "sat/vB");
    console.log("Economy: ",  fees.economy,  "sat/vB");
    console.log("BTC/USD: $", data.btc_price_usd);
  })
  .catch(err => console.error("BTCBench error:", err));

// Full example → examples/javascript/current-fees.html

Public BTCBench resources

All endpoints below are free and public. No authentication or API key is required.

Resource Endpoint / URL
Current fee data (JSON) https://www.btcbench.com/api/v1/fees.json
Current fee data (CSV) https://www.btcbench.com/api/v1/fees.csv
API status https://www.btcbench.com/api/v1/status.json
AI data manifest https://www.btcbench.com/data/ai-data-manifest.json
API documentation btcbench.com/api-docs.html
Embed widget page btcbench.com/embed.html
Daily fee reports btcbench.com/reports/daily-v2/
Weekly fee reports btcbench.com/reports/weekly-v2/
Monthly fee reports btcbench.com/reports/monthly-v2/
Methodology notes btcbench.com/methodology.html

Public tools for Bitcoin users

All tools are free, public, and require no account or login.

Estimate transaction cost in sat/vB and USD before you send.
Short-term fee outlook to help time your Bitcoin transactions.
Decision tool based on current mempool conditions and fee trends.
Guidance for underpriced pending Bitcoin transactions.
Historical Bitcoin fee charts from BTCBench data.
Day and hour patterns for lower Bitcoin transaction fees.
Dollar-cost averaging returns calculator for Bitcoin.
Long-term Bitcoin price chart with historical context.
Copy-paste iframe widgets for blogs, sites, and newsletters.

What can you build with this?

BTCBench fee data and examples are suitable for a wide range of projects.

Bitcoin fee dashboards
Crypto blogs and education pages
Wallet education and cost guides
Transaction cost widgets
Bitcoin newsletter resources
WordPress sites and sidebars
Fee-monitoring side projects
Internal monitoring dashboards
AI and citation-friendly references

Safe integration notes

This GitHub repository is intentionally limited to public example files, endpoint notes, and lightweight widget references. It does not include BTCBench production code, private scripts, deployment files, or internal monitoring logic. Never commit any of the following to a public repository:

  • Private API keys or tokens
  • Authentication secrets
  • Private analytics config or server-side tracking secrets
  • Contact form endpoints
  • Internal server paths
  • Database credentials
  • Internal cron schedules or automation scripts
  • Production deployment scripts
  • Full BTCBench production source code
Disclaimer: BTCBench data is provided for informational purposes only. Bitcoin network fees can change quickly. Actual transaction costs depend on transaction size, inputs, outputs, address type, wallet behaviour, and current mempool conditions. Always verify fee recommendations in your own wallet before sending a Bitcoin transaction. Full disclaimer: btcbench.com/disclaimer.html