You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
356 B
18 lines
356 B
var _ = require('lodash');
|
|
|
|
var provider = {
|
|
name: 'BitPay',
|
|
url: 'https://bitpay.com/api/rates/',
|
|
parseFn: function(raw) {
|
|
var rates = _.compact(_.map(raw, function(d) {
|
|
if (!d.code || !d.rate) return null;
|
|
return {
|
|
code: d.code,
|
|
value: d.rate,
|
|
};
|
|
}));
|
|
return rates;
|
|
},
|
|
};
|
|
|
|
module.exports = provider;
|
|
|