Bitcoin Widgets

Embed widgets on your website

Widget Examples

Scroll to the bottom of the page for installation instructions. Box shadows can be disabled with the bw-noshadow="true" option (see the first price chart example below)

Bitcoin Cash (BCH) Price Chart Widget

<div class="btcwdgt-chart" bw-cash="true" bw-noshadow="true"></div>
<div class="btcwdgt-chart" bw-cash="true" bw-theme="light"></div>

Bitcoin (BTC) Price Chart Widget

<div class="btcwdgt-chart" bw-noshadow="true"></div>
<div class="btcwdgt-chart" bw-theme="light"></div>

Simple Bitcoin Cash (BCH) Price Widget

<div class="btcwdgt-price" bw-cash="true"></div>
<div class="btcwdgt-price" bw-cash="true" bw-theme="light" bw-cur="jpy"></div>
<div class="btcwdgt-price" bw-cash="true" bw-theme="light"></div>
<div class="btcwdgt-price" bw-cash="true" bw-theme="light" bw-cur="eur"></div>

Simple Bitcoin (BTC) Price Widget

<div class="btcwdgt-price"></div>
<div class="btcwdgt-price" bw-theme="light" bw-cur="jpy"></div>
<div class="btcwdgt-price" bw-theme="light"></div>
<div class="btcwdgt-price" bw-theme="light" bw-cur="eur"></div>

Step 1

Place a simple bit of code in the HTML of your website in each location where you want a widget. You may place multiple widgets on the same page with one <b>div</b> per widget. Code for each widget type is shown at right.

Customize

Widgets may be customized by placing additional attributes in the <b>div</b> element.<br />Control the number of items displayed with <b>bw-entries="N"</b> (1-10)<br />Use a different color scheme for the widget with <b>bw-theme="X"</b>. Possible values are "light", "dark".<br />To enable Bitcoin Cash (BCH) price information, add bw-cash="true"

<!-- Bitcoin Cash (BTC) Price Chart Widget -->
<div bw-cash="true" class="btcwdgt-chart"></div>

<!-- Bitcoin (BTC) Price Chart Widget -->
<div class="btcwdgt-chart"></div>

<!-- Active Forum Topics Widget -->
<div class="btcwdgt-forum"></div>

<!-- News Stories Widget -->
<div class="btcwdgt-news"></div>

<!-- News Ticker Widget -->
<div class="btcwdgt-news-ticker"></div>

<!-- Simple Price Widget -->
<div class="btcwdgt-price" bw-cur="usd"></div>

<!-- Bitcoin.com Mining Pool Hash Rate -->
<div class="btcwdgt-pool"></div>

Step 2

Copy-Paste the script code on the right anywhere within your webpage HTML. Even if you have multiple widgets, you only need to include the code once.

<script>
  (function(b,i,t,C,O,I,N) {
    window.addEventListener('load',function() {
      if(b.getElementById(C))return;
      I=b.createElement(i),N=b.getElementsByTagName(i)[0];
      I.src=t;I.id=C;N.parentNode.insertBefore(I, N);
    },false)
  })(document,'script','https://widgets.bitcoin.com/widget.js','btcwdgt');
</script>

Bitcoin.com in your inbox

A weekly rundown of the news that matters, plus educational resources and updates on products & services that support economic freedom