Display CoinDesk bitcoin price index.
var Coindesk = require('machinepack-coindesk');
// Display CoinDesk bitcoin price index.
Coindesk.getCoindeskBitcoinPriceIndex({
currency: 'USD',
}).exec({
// An unexpected error occurred.
error: function (err) {
},
// OK.
success: function (result) {
},
});
The currency used to calculate the price of the index.
'USD'
An unexpected error occurred.
OK.
{
code: 'USD',
symbol: '$',
rate: '244.0021',
description: 'United States Dollar',
rate_float: 244.0021
}