Cancel all sent requests to binance

Hello guys,
I work in jupyter notebook and I did the following code:

while True:
    now = datetime.now()
    if now.hour >= 0 and now.minute >= 0 and now.minute <=57:
        for ticker in dict_tickers.items():
              client.enable_isolated_margin_account(symbol=ticker[1])
              client.transfer_spot_to_isolated_margin(
                        asset='USDT', 
                        symbol=ticker[1], 
                        amount='20'
                    )

So because of some errors in my code I entered in endless loop and I think my program sent many request for spot transfer to margin account. In this case I am unable to cancel all those request and all the money in my spot account goes to margin pair.

Could you please help me stop / revert the requests?

Thank you :slight_smile:

Cancel already successfully executed requests is not possible, so there’s no “revert the requests”.
The only way is to create another method to transfer the USDT in your Isolated Margin account for the several symbols back to spot account. This is the related endpoint: Binance API Documentation

You can also do this in the UI, which might be be easier to understand and track.

1 Like

Hello aisling2!

Thank you for your recommendation.
I will do so as advised.