Update Bitstamp to new Bitpay api version

This commit is contained in:
Neal Conner 2019-10-14 12:24:24 -04:00 committed by Josh Harvey
parent d083ae5a40
commit 52ccea0e5f

View file

@ -18,9 +18,9 @@ exports.ticker = function ticker (account, fiatCode, cryptoCode) {
return getCurrencyRates(fiatCode, cryptoCode)
}
return axios.get('https://bitpay.com/api/rates')
return axios.get('https://bitpay.com/rates')
.then(response => {
const fxRates = response.data
const fxRates = response.data.data
const usdRate = findCurrency(fxRates, 'USD')
const fxRate = findCurrency(fxRates, fiatCode).div(usdRate)