Widgets

Embed the Bitcoin.com widget in your website

Widget Examples

Scroll to the bottom of the page for installation instructions.

Bitcoin Price Chart Widget

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

Simple Bitcoin Price Widget

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

News Headlines Widget

<div class="btcwdgt-news" bw-cur="usd"></div>
<div class="btcwdgt-news" bw-cur="eur" bw-theme="light"></div>
<div class="btcwdgt-news" bw-entries="10"></div>
<div class="btcwdgt-news" bw-entries="3" bw-theme="light"></div>

Forum Topics Widget

<div class="btcwdgt-forum"></div>
<div class="btcwdgt-forum" bw-theme="light"></div>
<div class="btcwdgt-forum" bw-entries="10"></div>

 

 

 

 

News Ticker

<div class="btcwdgt-news-ticker"></div>
<div class="btcwdgt-news-ticker" bw-theme="light"></div>

Bitcoin.com Mining Pool Hash Rate

<div class="btcwdgt-pool"></div>
<div class="btcwdgt-pool" bw-theme="light"></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 div per widget. Code for each widget type is shown at right.

Customize

Widgets may be customized by placing additional attributes in the div element.

Control the number of items displayed with bw-entries="N" (1-10)

Use a different color scheme for the widget with bw-theme="X". Possible values are "light", "dark".

/* 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>