UNPKG

insight-bitcore-api

Version:

An open-source bitcoin blockchain API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.

16 lines (13 loc) 330 B
var _ = require('lodash'); module.exports.id = 'BitPay'; module.exports.url = 'https://bitpay.com/api/rates/'; module.exports.parseFn = function(raw) { var rates = _.compact(_.map(raw, function(d) { if (!d.code || !d.rate) return null; return { code: d.code, rate: d.rate, }; })); return rates; };