|
|
@@ -46,11 +46,12 @@ const holdingHandler = async function(context, task, token, pair) {
|
|
|
// 交易数据持久化
|
|
|
await token.save()
|
|
|
|
|
|
- fileLogger.info(`[${isTimeOverStop ? '时' : '强'}${isStopWin ? '盈+' : '损-'}]${pair}, `
|
|
|
- .concat(`成交额${cummulativeQuoteQty}, 均价${orderPrice}->${price}, 卖出${orderAmount}个.`)
|
|
|
- )
|
|
|
+ const log = `[${isTimeOverStop ? '时' : '强'}${isStopWin ? '盈+' : '损-'}]${pair}, `
|
|
|
+ + `成交额${cummulativeQuoteQty}, 均价${orderPrice}->${price}, 卖出${orderAmount}个.`
|
|
|
+ fileLogger.info(log)
|
|
|
} catch (e) {
|
|
|
- fileLogger.error(`[${isTimeOverStop ? '时' : '强'}止${isStopWin ? '盈' : '损'}失败]${pair}, ${e}`)
|
|
|
+ const log = `[${isTimeOverStop ? '时' : '强'}止${isStopWin ? '盈' : '损'}失败]${pair}, ${e}`
|
|
|
+ fileLogger.error(log)
|
|
|
}
|
|
|
}
|
|
|
}
|