Эх сурвалжийг харах

cummulativeQuoteQty parse float

龚成明 2 жил өмнө
parent
commit
1eed1d0887

+ 2 - 2
libs/binance/binance-spot.js

@@ -172,7 +172,7 @@ class BinanceSpot {
 
     assert.notEqual(buyRst.executedQty, undefined, JSON.stringify(buyRst))
 
-    const cummulativeQuoteQty = buyRst.cummulativeQuoteQty
+    const cummulativeQuoteQty = parseFloat(buyRst.cummulativeQuoteQty)
     // 计算扣除手续费后的实际成交数量
     let executedQty = 0
     for (const fill of buyRst.fills) {
@@ -193,7 +193,7 @@ class BinanceSpot {
 
     assert.notEqual(sellRst.executedQty, undefined, JSON.stringify(sellRst))
 
-    let cummulativeQuoteQty = sellRst.cummulativeQuoteQty
+    let cummulativeQuoteQty = parseFloat(sellRst.cummulativeQuoteQty)
 
     // 计算扣除手续费后的实际成交数量
     let executedQty = 0