Update to new bitpay api version
This commit is contained in:
parent
96e0c0198d
commit
8a43d4ee7c
1 changed files with 2 additions and 2 deletions
|
|
@ -2,9 +2,9 @@ const axios = require('axios')
|
||||||
const BN = require('../../../bn')
|
const BN = require('../../../bn')
|
||||||
|
|
||||||
function ticker (account, fiatCode, cryptoCode) {
|
function ticker (account, fiatCode, cryptoCode) {
|
||||||
return axios.get('https://bitpay.com/api/rates/' + cryptoCode + '/' + fiatCode)
|
return axios.get('https://bitpay.com/rates/' + cryptoCode + '/' + fiatCode)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
const data = r.data
|
const data = r.data.data
|
||||||
const price = BN(data.rate.toString())
|
const price = BN(data.rate.toString())
|
||||||
return {
|
return {
|
||||||
rates: {
|
rates: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue