log raw ticker price within tx
This commit is contained in:
parent
5815a606f2
commit
578a39a721
8 changed files with 132 additions and 39 deletions
|
|
@ -41,6 +41,15 @@ function plugins (settings, deviceId) {
|
|||
}
|
||||
}
|
||||
|
||||
async function getRawTickerPrice (fiatCode, cryptoCode) {
|
||||
const tickers = await ticker.getRates(settings, fiatCode, cryptoCode)
|
||||
|
||||
return {
|
||||
cashIn: _.get(['rates', 'ask'], tickers),
|
||||
cashOut: _.get(['rates', 'bid'], tickers)
|
||||
}
|
||||
}
|
||||
|
||||
function buildRates (tickers) {
|
||||
const config = configManager.machineScoped(deviceId, settings.config)
|
||||
const cryptoCodes = config.cryptoCurrencies
|
||||
|
|
@ -793,7 +802,8 @@ function plugins (settings, deviceId) {
|
|||
sell,
|
||||
notificationsEnabled,
|
||||
notifyOperator,
|
||||
getCommissionPercentage
|
||||
getCommissionPercentage,
|
||||
getRawTickerPrice
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue