I used this code: def get_klines(symbol, interval, lookback):
    API_KEY_BINANCE = 'your-api-key'  # Replace with your Binance API key
    symbol = symbol.replace("/", "")  # remove slash from symbol

    url = "https://api.binance.com/api/v3/klines"

    end_time = int(dt.datetime.now().timestamp() * 1000)  # end time is now
    start_time = end_time - (lookback * 60 * 1000)  # start time is lookback minutes ago

    params = {
        'symbol': symbol,
        'interval': interval,
        'startTime': start_time,
        'endTime': end_time
    }

    headers = {
        'X-MBX-APIKEY': API_KEY_BINANCE,
    }

    response = requests.get(url, params=params, headers=headers)
    response.raise_for_status()
    data = response.json()

    if not data:  # if data is empty, return None
        print('No data found for the given timeframe and symbol')
        return None

    ohlcv = []
    for d in data:
        timestamp = dt.datetime.fromtimestamp(d[0] / 1000).strftime('%Y-%m-%d %H:%M:%S')
        ohlcv.append({
            'Open time': timestamp,
            'Open': float(d[1]),
            'High': float(d[2]),
            'Low': float(d[3]),
            'Close': float(d[4]),
            'Volume': float(d[5])
        })

    df = pd.DataFrame(ohlcv)
    df.set_index('Open time', inplace=True)
    return df
interval = '1m'
lookback = 10080

df = get_klines(symbol, interval, lookback) 
# Import the necessary libraries

import numpy as np

def signal_generator(df):
    if df is None or len(df) < 2:
        return ''

    # Retrieve depth data
    depth_data = client.depth(symbol=symbol)
    bid_depth = depth_data['bids']
    ask_depth = depth_data['asks']

    depth_analysis = []
    
    depth_threshold = 100

    for i in range(1, len(bid_depth)):
        if (
            float(bid_depth[i][0]) >= depth_threshold and
            float(bid_depth[i - 1][0]) < depth_threshold
            ):
                depth_analysis.append('buy')
        elif (
            float(ask_depth[i][0]) >= depth_threshold and
            float(ask_depth[i - 1][0]) < depth_threshold
            ):
                depth_analysis.append('sell')

    # After adding your algorithm logic, check if there is a buy or sell signal
    if 'buy' in depth_analysis:
        return 'buy'
    elif 'sell' in depth_analysis:
        return 'sell'
    else:
        return ''

end_time = int(time.time() * 1000)
start_time = end_time - lookback * 60 * 1000
    
TradeType = "BUY" or "SELL"

secret_key = API_KEY_BINANCE  # Replace with your actual secret key obtained from MXC Exchange
access_key = API_SECRET_BINANCE # Replace with your actual access key obtained from MXC Exchange

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!")

                stop_loss_price = float(mark_price) - (float(mark_price) * 0.002)
                print(f"Stop loss set at: {stop_loss_price}")

                try:
                    client.new_order(
                        symbol=symbol,
                        side='SELL',
                        type='STOP_MARKET',
                        quantity=0.1,
                        stopPrice=stop_loss_price
                    )
                    print("Stop loss order placed!")
                except binance.error.ClientError as e:
                    print(f"Error placing stop loss order: {e}")

                time.sleep(1)

            except binance.error.ClientError as e:
                print(f"Error executing long order: {e}")
            
            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!")

                stop_loss_price = float(mark_price) + (float(mark_price) * 0.002)
                print(f"Stop loss set at: {stop_loss_price}")

                try:
                    client.new_order(
                        symbol=symbol,
                        side='BUY',
                        type='STOP_MARKET',
                        quantity=0.1,
                        stopPrice=stop_loss_price
                    )
                    print("Stop loss order placed!")
                except binance.error.ClientError as e:
                    print(f"Error placing stop loss order: {e}")

                time.sleep(1)

            except binance.error.ClientError as e:
                print(f"Error executing short order: {e}")
            
            time.sleep(1)
    
    time.sleep(1)
But it doesn't give me any signals