BinanceAPIException: APIError(code=51097): The currency is unavailable to do this action due to policy reasons.

Hy everyone I get this error when Im trying to borrow some assets on cross-margin account.

I’m using this code snippet in jupyter notebooks with my custom-implemented trading bots and if I run this code as an example tryout standalone its working properly for different assets as well.
I’m able to borrow the asset using the python-binance client and I dont get any error.

exchange_info = client.get_symbol_info('TKOUSDT')
lot_size_filter = next(filter(lambda f: f['filterType'] == 'LOT_SIZE', exchange_info['filters']))
min_qty = float(lot_size_filter['minQty'])
max_qty = float(lot_size_filter['maxQty'])
step_size = float(lot_size_filter['stepSize'])
tick_size = float(exchange_info['filters'][0]['tickSize'])

borrow_quant = calculate_quantity_to_borrow(6, 0.4000)
print(f'Normal quantity: {borrow_quant}')
rounded_borrow_quant = round_to_step_size(borrow_quant, step_size)
print(f'Rounded quantity: {rounded_borrow_quant}')

loan_resp = client.create_margin_loan(asset='TKO', amount=rounded_borrow_quant)
sell_resp = place_sell_order('TKOUSDT', rounded_borrow_quant)

But when my running bots trying to use the same implemented solution I get this error:
BinanceAPIException: APIError(code=51097): The currency is unavailable to do this action due to policy reasons.

I don’t found any information or helpful documentation about this error in the binance docs, and I dont have a clue what is the problem.

Here is how the bots are using it while iterating over the assets:

                if (
                    short position entry condition satisfied
                ):
                    pos_size = 6
                    if max_loan_amount > pos_size:
                        borrow_quant = calculate_quantity_to_borrow(6, current_price)
                        rounded_borrow_quant = round_to_step_size(borrow_quant, step_size)
                        asset = [symbol[:-4]]
                        loan_resp = client.create_margin_loan(asset=asset, amount=rounded_borrow_quant)
                        sell_order = place_sell_order(symbol, rounded_borrow_quant)

Anybody can help with this problem maybe?