opening and closing an order

I check the operation of the api, the algorithm is as follows: create a buy order and after 1 second create a sell order. This does not work stably, I can get an error on the 20th cycle or on the 3rd (I attached the logs). How can I have insufficient balance with this kind of logic?

I wrote to the chat, but did not receive a response since yesterday, I tried to write to, but I was also banned there since yesterday. I wrote in telegram: “help, I cannot write to” and received the answer: “write to on this issue” WHAT ??? And I had to look for another account from which I just wrote.

disappointed with this attitude, not to mention the clumsy documentation, which in the end I have to debug on a real account losing on commissions. How do you think I should close a deal by / order / test, if I need to close the amount of purchased crypt, and in response I get an empty array? You say: “go to it is indicated in the documentation as a test one” and I was there, only it has little to do with the combat api.

[url] =>
[content_type] => application/json;charset=UTF-8
[http_code] => 400
[header_size] => 912
[request_size] => 380
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.563
[namelookup_time] => 0
[connect_time] => 0.078
[pretransfer_time] => 0.266
[size_upload] => 0
[size_download] => 77
[speed_download] => 136
[speed_upload] => 0
[download_content_length] => 77
[upload_content_length] => -1
[starttransfer_time] => 0.563
[redirect_time] => 0
[redirect_url] =>
[primary_ip] =>
[certinfo] => Array

[primary_port] => 443
[local_ip] =>
[local_port] => 11238

[code] => -2010
[msg] => Account has insufficient balance for requested action.

When you do symbol=BTCUSDT&side=SELL&type=MARKET&quoteOrderQty=14.99626496, you’re using 14.99626496 USDT worthy of BTC to sell BTC, but you need to be aware that the market price is constantly changing, so if the price decreases a lot, 14.99626496I USDT is worthy more BTC than what you have available and hence the error message.

Also, the ban is automated by a bot which considered your post suspicious by writing the post too fast and these are community help, no official support. Plus, please don’t share your signature for you own safety.