Why the MARKET order is partially executed, sometimes nothing is even sold, but EXPIRED writes. I work for TESTNET Binance API, might be because of this? And if so, then everything will work fine on Binance API?
On testnet, it might be related with not enough liquidity in the symbol that you’re trading on, plus what’s specified in your timeInForce parameter.