I used this code: def signal_generator(df):
    if df is None or len(df) < 2:
        return ''

    signal = []
    
    # Retrieve depth data
    threshold = 0.1
    depth_data = client.depth(symbol=symbol)
    bid_depth = depth_data['bids']
    ask_depth = depth_data['asks']
    buy_price = float(bid_depth[0][0]) if bid_depth else 0.0
    sell_price = float(ask_depth[0][0]) if ask_depth else 0.0
    mark_price_data = client.ticker_price(symbol=symbol)
    mark_price = float(mark_price_data['price']) if 'price' in mark_price_data else 0.0

    buy_qty = sum(float(bid[1]) for bid in bid_depth)
    sell_qty = sum(float(ask[1]) for ask in ask_depth)

    if sell_qty > buy_qty and (sell_qty / buy_qty) > (1 + threshold):
        signal.append('sell')
    elif buy_qty > sell_qty and (buy_qty / sell_qty) > (1 + threshold):
        signal.append('buy')
    else:
        signal.append('')
      
    return signal

end_time = int(time.time() * 1000)
start_time = end_time - lookback * 60 * 1000
    
secret_key = API_KEY_BINANCE
access_key = API_SECRET_BINANCE 

import binance

while True:
    lookback = 10080
    df = get_klines(symbol, interval, lookback)

    if df is not None:
        signals = signal_generator(df)
        print(f"The signal time is: {dt.datetime.now().strftime('%Y-%m-%d %H:%M:%S')} - Signals: {signals}")
        mark_price = client.ticker_price(symbol=symbol)
        
        if signals == ['buy']:
            try:
                quantity = 0.1
                client.new_order(symbol=symbol, side='BUY', type='MARKET', quantity=quantity)
                print("Long order executed!")

            except binance.error.ClientError as e:
                print(f"Error executing long order: ")
            
            time.sleep(1)

        if signals == ['sell']:
            try:
                quantity = 0.1
                client.new_order(symbol=symbol, side='SELL', type='MARKET', quantity=quantity)
                print("Short order executed!")

            except binance.error.ClientError as e:
                print(f"Error executing short order: ")
            
            time.sleep(1)
    
    time.sleep(1)

But I getting ERROR: Traceback (most recent call last):
  File "c:\Users\Alan\.vscode\jew_bot\jew_bot\jew_bot.py", line 182, in <module>
    client.new_order(symbol=symbol, side='SELL', type='MARKET', quantity=quantity)
  File "C:\Users\Alan\AppData\Roaming\Python\Python311\site-packages\binance\um_futures\account.py", line 113, in new_order
    return self.sign_request("POST", url_path, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Alan\AppData\Roaming\Python\Python311\site-packages\binance\api.py", line 83, in sign_request
    return self.send_request(http_method, url_path, payload, special)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Alan\AppData\Roaming\Python\Python311\site-packages\binance\api.py", line 118, in send_request
    self._handle_exception(response)
  File "C:\Users\Alan\AppData\Roaming\Python\Python311\site-packages\binance\api.py", line 173, in _handle_exception
    raise ServerError(status_code, response.text)
binance.error.ServerError: (503, '{"code":-1001,"msg":"Internal error; unable to process your request. Please try again."}')