Insufficient balance when placing multiple consecutive limit buy orders.

I’m trying to place a limit buy SPOT IOC order, then check how much balance I have left in my account, and place another limit buy order with this remaining balance.

It works, however I have to try many times to place the second limit IOC order. It sometimes takes 5 seconds for the balance to become available again to spend (I assume the balance is locked).

Is there a better way of doing this that doesn’t lock up my balance, and doesn’t involve using market orders? A limit buy with the ability to specify quoteOrderQty would be perfect - but this isn’t possible.

Hello, let’s imagine you have initially 50 USDT, when you place a BUY order that spends 10USDT, the USDT balance with be with free: 40USDT and locked:10USDT, so when placing the 2nd BUY order and getting a “insufficient balance” shouldn’t be related with locked balance, 40USDT was never locked.

You can try the user data stream to check Account Update (https://binance-docs.github.io/apidocs/spot/en/#payload-account-update) and make sure you have enough balance before placing the next order.

See what I’m doing is placing a limit buy with all $50, and only some lesser amount will fill (e.g. $40). Leaving me with $10 because I got a better price that I bargained for. I want to spend this $10 immediately afterwards, though I have to wait up to 5 seconds for the balance to unlock.

Wondering if there is another way so that it is immediate!

Still have this problem. It works fine when I’m using small test amounts, but my funds get locked up for ages when transacting large amounts. Is this expected behaviour?