Suddenly my function stopped working, where is the error someone could tell me
https://api.binance.com/api/v3/order?symbol=BTCUSDT&side=BUY"eQtyOrder=10&type=MARKET&recvWindow=20000×tamp=1596683002947&signature=4aec203041c36703dd15cfc476761d15e8646a85
dino
August 6, 2020, 10:59am
2
what’s the error message?
This is what comes out
The error is starting to spread to other functions, this function still worked last night,
I do not understand what is happening, I thought it was an error by the API key so I created a new one but it remains the same, I also believed that it was an error in the method of the fetch function so I changed it to xmlHTTP and it did not work either, so the only thing I am left to think that it is a server error, note that they just recently added the isIsolated parameter so the only thing left to think is that it is an error caused by that update
dino
August 7, 2020, 4:03am
4
the order quantity is not correct in the first screenshot, here is the filter for the pair
{
"filterType": "LOT_SIZE",
"minQty": "0.00000100",
"maxQty": "9000.00000000",
"stepSize": "0.00000100"
}
I do not understand this well about the filters, does it mean that the quantities must be multiples of 0.00000100?
Even putting the quantity right I still get the error 400
https://api.binance.com/api/v3/order?symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC&quantity=0.000952&price=10500&recvWindow=60000×tamp=1596815034385&signature=e2beb1591e168455993b2a45a95e4e44726d4c5db2b1496c6cf36c3936f05ddb
where is the error now
dino
August 10, 2020, 12:16am
7
this request passed the LOT_SIZE
, but fail in MIN_NOTIONAL
filter
{
"filterType": "MIN_NOTIONAL",
"minNotional": "10.00000000",
"applyToMarket": true,
"avgPriceMins": 5
}
Please check the filters from /api/v3/exchangeInfo
, it shows all filters in each pair that related order type should follow.
It is correct, I had already corrected that part and it worked fine again but the next day it started to fail again, add code to validate the MIN_NOTIONAL and the stepSize of the LOT_SIZE and it worked again but the next day it started to fail again
var stepSize = symbols[symbol].filters.LOT_SIZE.stepSize,
minNotional = symbols[symbol].filters.MIN_NOTIONAL.minNotional,
fixQty = stepSize.indexOf(1, 0) - stepSize.indexOf('.', 0),
quantity = (10 / price).toFixed(fixQty);
if (parseFloat(quantity * price) >= parseFloat(minNotional)){
await marketOrder('SPOT', symbol, 'BUY', quantity, null, data => {
orderIDs.orderId = data.orderId
orderIDs.clientOrderId = data.clientOrderId
})
console.log(orderIDs)
await sleep(90000)
accountOrders('SPOT', symbol, null, orderIDs.clientOrderId, data => {
marketOrder('SPOT', symbol, 'SELL', data.origQty, null, m => console.log(m))
})
}
I tried with $ 11 and $ 12 usdt and it still fails, this is the request
And I mention again that it worked after it went from $ 10 to $ 11 usdt but now again neither with $ 11 nor with $ 12 usdt it works
dino
August 10, 2020, 2:56am
9
can you log the error message?