下面是未成交订单返回的信息 [{“Info”:{“symbol”:“ALICEUSDT”,“status”:“PARTIALLY_FILLED”,“clientOrderId”:“x-PtW46NoE_20FD0D3794C8F944”,“executedQty”:“1.3”,“cumQuote”:“10.4819”,“type”:“LIMIT”,“reduceOnly”:false,“orderId”:708818902,“price”:“8.063”,“avgPrice”:“8.0630”,“origQty”:“11.6”,“closePosition”:false,“time”:1626332174412,“side”:“SELL”,“workingType”:“CONTRACT_PRICE”,“priceProtect”:false,“updateTime”:1626332174485,“timeInForce”:“GTC”,“positionSide”:“SHORT”,“stopPrice”:“0”,“origType”:“LIMIT”},“Id”:“708818902”,“Price”:8.063,“Amount”:11.6,“DealAmount”:1.3,“AvgPrice”:8.063,“Status”:0,“Type”:1,“Offset”:0,“ContractType”:“swap”}]
上面显示的是挂单数量为11.6,但只成交1.3个,然后再次卖出未成交的数量 但是两个数字srvOrder.Amount - srvOrder.DealAmount相减得出竟然得出 10.299999999999,而不是10.3 导致出现下面的精度溢出错误
Sell(8.054, 10.299999999999): 400: {“code”:-1111,“msg”:“Precision is over the maximum defined for this asset.”}
使用语言是JavaScript