You're viewing the legacy docs. They are deprecated as of May 18, 2016.
Go to current docs

Firebase Open Data Sets

Cryptocurrencies Open Data Sets

Get the latest USD/BTC and USD/LTC exchange rates in realtime!

Firebase Open Data Sets are deprecated and will be shut down on March 30th, 2016.

Overview

You can view the realtime cryptocurrency data in the App Dashboard.

Live Example

We've used this open data set to create an embeddable Bitcoin price ticker, which updates in real-time.

Data Structure

Supported cryptocurrencies are organized at the root of the Firebase database by their full name.

{
    (bitcoin, litecoin): {
        last: Number,       // The last exchange rate.
        ask: Number,        // The current ask rate.
        bid: Number,        // The current bid rate
        _credits: String,   // The source of the data.
        _updated: String,   // A timestamp of the last update.
    }
}

Example Code

Retrieve the latest Bitcoin "Bid", "Ask", and "Last" prices:

var bitcoinRef = new Firebase("https://publicdata-cryptocurrency.firebaseio.com/bitcoin");

bitcoinRef.child("bid").on("value", showPrice);
bitcoinRef.child("ask").on("value", showPrice);
bitcoinRef.child("last").on("value", showPrice);

function showPrice(snapshot) {
  console.log(snapshot.key() + ": " + snapshot.val());
}

Retrieve the latest Litcoin "Bid", "Ask", and "Last" prices:

var litecoinRef = new Firebase("https://publicdata-cryptocurrency.firebaseio.com/litecoin");

litecoinRef.child("bid").on("value", showPrice);
litecoinRef.child("ask").on("value", showPrice);
litecoinRef.child("last").on("value", showPrice);

function showPrice(snapshot) {
  console.log(snapshot.key() + ": " + snapshot.val());
}

Data Sources

Bitcoin to USD exchange rate data is provided by Coinbase.
Litecoin to USD exchange rate data is provided by Bitfinex.