|
|
@@ -3,7 +3,6 @@ const OneInch = require('../../libs/web3/1inch')
|
|
|
const BinanceSpot = require('../../libs/binance/binance-spot')
|
|
|
const Config = require('../../config/config')
|
|
|
|
|
|
-// TODO 下一步:将特定的价格数据输出到日志文件
|
|
|
const showPrices = function(context, task) {
|
|
|
const logger = task.logger
|
|
|
const fileLogger = task.fileLogger
|
|
|
@@ -21,7 +20,9 @@ const showPrices = function(context, task) {
|
|
|
const BinancePrice = token.BinancePrice
|
|
|
const distancePrice = BinancePrice - OneInchPrice
|
|
|
|
|
|
- fileLogger.info(`${OneInchPrice}, ${BinancePrice}, ${distancePrice}`)
|
|
|
+ if (distancePrice > 0) {
|
|
|
+ fileLogger.info(`| ${pair}\t\t| ${OneInchPrice}\t\t| ${BinancePrice}\t\t| ${distancePrice}\t\t|`)
|
|
|
+ }
|
|
|
console.info(`| ${pair}\t\t| ${OneInchPrice}\t\t| ${BinancePrice}\t\t| ${distancePrice}\t\t|`)
|
|
|
})
|
|
|
console.info(`-----------------------------------------------------------------------------------------------------------------`)
|