fix: binance ticker default market fiat
This commit is contained in:
parent
c5f3caab2f
commit
b52ad6c8da
3 changed files with 12 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
const ccxt = require('ccxt')
|
||||
|
||||
const BN = require('../../bn')
|
||||
const { buildMarket, verifyFiatSupport } = require('../common/ccxt')
|
||||
const { buildMarket, verifyFiatSupport, defaultFiatMarket } = require('../common/ccxt')
|
||||
const { getRate } = require('../../../lib/forex')
|
||||
|
||||
const RETRIES = 2
|
||||
|
|
@ -33,7 +33,7 @@ function ticker (fiatCode, cryptoCode, tickerName) {
|
|||
return getRate(RETRIES, fiatCode)
|
||||
.then(({ fxRate }) => {
|
||||
try {
|
||||
return getCurrencyRates(ticker, 'USD', cryptoCode)
|
||||
return getCurrencyRates(ticker, defaultFiatMarket(tickerName), cryptoCode)
|
||||
.then(res => ({
|
||||
rates: {
|
||||
ask: res.rates.ask.times(fxRate),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue