How to capture insufficient loanable assets while transfering fund from SPOT to ISOLATED margin?

Hi Everyone,
I am developing a Crypto Bot for trading. I am using python binance for the same and am looking for a way to capture the error message “Due to high borrowing demand, there are currently insufficient loanable assets for . Please adjust your borrowing amount or try again tomorrow”. I tried the following function but could’nt get any response related to above status;
Basically, i need to transfer fund from Spot to ISOLATED margin.

Hi. i am used GitHub - Binance-docs/Binance_Futures_python. its cool library
maybe you’ll find something here

This is what i am looking for. Is there any endpoint to capture this signal?

Hi Boney_Kalarickan

You can get this information in this endpoint:

If there are no borrowable assets, you will receive this ERROR message: -3045: The system does not have enough asset now.

If there are borrowable assets, you can receive two different results:

  1. If it is a cross margin account or an isolated and ENABLED margin account, you will receive the borrow limit and quantity data (see endpoint).
  2. If it is a DISABLED isolated margin account, you will receive this ERROR message: -3052: This isolated margin pair is disabled. Please activate it.

Best regards.