I used your code for mexc exchange : API_KEY = ''
API_SECRET = ''
import time
import requests
import hmac
import hashlib
import datetime as dt
import pandas as pd



symbol = 'BCH/USDT'
interval = '1m'
lookback = 44640

def generate_signature(api_key, api_secret, endpoint, params):
    params_string = '&'.join([f'{key}={params[key]}' for key in params])
    payload = f'{endpoint}\n{params_string}'
    signature = hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).hexdigest()
    return signature

def get_klines(symbol, interval, lookback):
    endpoint = '/open/api/v2/market/kline'

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

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

    signature = generate_signature(API_KEY, API_SECRET, endpoint, params)

    url = f"https://www.mexc.com{endpoint}"
    headers = {'Content-Type': 'application/x-www-form-urlencoded'}
    data = {**params, 'api_key': API_KEY, 'sign': signature}

    response = requests.get(url, headers=headers, params=data)
    response.raise_for_status()
    data = response.json()['data']
    
    if not data: # if data is empty, return None
        print('No data found for the given timeframe and symbol')
        return None

    ohlc = []
    for d in data:
        timestamp = dt.datetime.fromtimestamp(d['time']/1000).strftime('%Y-%m-%d %H:%M:%S')
        ohlc.append({
            'Open time': timestamp,
            'Open': float(d['open']),
            'High': float(d['high']),
            'Low': float(d['low']),
            'Close': float(d['close']),
            'Volume': float(d['vol'])
        })

    df = pd.DataFrame(ohlc)
    df.set_index('Open time', inplace=True)

    return df
df = get_klines(symbol, interval, lookback)
def signal_generator(df):
    # Calculate EMA and MA lines
    df['EMA5'] = df['Close'].ewm(span=5, adjust=False).mean()
    df['EMA10'] = df['Close'].ewm(span=10, adjust=False).mean()
    df['EMA20'] = df['Close'].ewm(span=20, adjust=False).mean()
    df['EMA50'] = df['Close'].ewm(span=50, adjust=False).mean()
    df['EMA100'] = df['Close'].ewm(span=100, adjust=False).mean()
    df['EMA200'] = df['Close'].ewm(span=200, adjust=False).mean()
    df['MA10'] = df['Close'].rolling(window=10).mean()
    df['MA20'] = df['Close'].rolling(window=20).mean()
    df['MA50'] = df['Close'].rolling(window=50).mean()
    df['MA100'] = df['Close'].rolling(window=100).mean()
    # Extract necessary prices from df
    open_price = df.Open.iloc[-1]
    close_price = df.Close.iloc[-1]
    previous_open = df.Open.iloc[-2]
    previous_close = df.Close.iloc[-2]

    # Calculate the last candlestick
    last_candle = df.iloc[-1]
    current_price = df.Close.iloc[-1]

    # Initialize analysis variables
    ema_analysis = []
    candle_analysis = []

    if (
        df['EMA5'].iloc[-1] > df['EMA20'].iloc[-1] > df['EMA50'].iloc[-1] > df['EMA100'].iloc[-1] > df['EMA200'].iloc[-1] and
        df['EMA5'].iloc[-2] < df['EMA20'].iloc[-2] < df['EMA50'].iloc[-2] < df['EMA100'].iloc[-2] < df['EMA200'].iloc[-2]
    ):
        ema_analysis.append('golden_cross')
    elif (
        df['EMA5'].iloc[-1] < df['EMA20'].iloc[-1] < df['EMA50'].iloc[-1] < df['EMA100'].iloc[-1] < df['EMA200'].iloc[-1] and
        df['EMA5'].iloc[-2] > df['EMA20'].iloc[-2] > df['EMA50'].iloc[-2] > df['EMA100'].iloc[-2] > df['EMA200'].iloc[-2]
    ):
        ema_analysis.append('death_cross')

    if (
        open_price < close_price and
        previous_open > previous_close and
        close_price > previous_open and
        open_price <= previous_close
    ):
        candle_analysis.append('buy')
    elif (
        open_price > close_price and
        previous_open < previous_close and
        close_price < previous_open and
        open_price >= previous_close
    ):
        candle_analysis.append('sell')

    # Generate signal based on strategy
    if 'golden_cross' in ema_analysis and 'buy' in candle_analysis:
        final_signal = 'buy'
    elif 'death_cross' in ema_analysis and 'sell' in candle_analysis:
        final_signal = 'sell'
    else:
        final_signal = ''

    return final_signal

df =  get_klines(symbol, '1m', 44640)


while True:
    df = get_klines(symbol, '1m', 44640) # await the coroutine function here
    if df is not None:
        signal = signal_generator(df)
    if signal is not None:
        print(f"The signal time is: {dt.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}:{signal}")
        time.sleep(1)
But I getting ERROR: Traceback (most recent call last):
  File "c:\Users\service\.vscode\jew_bot.py", line 65, in <module>
    df = get_klines(symbol, interval, lookback)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\service\.vscode\jew_bot.py", line 42, in get_klines
    response.raise_for_status()
  File "C:\Users\service\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://www.mexc.com/open/api/v2/market/kline?symbol=BCH%2FUSDT&interval=1m&start_time=1686082577321&end_time=1688760977321&api_key=lim5kAIrMtv611VDEYZsc9WmV74TBiGhhJB5LlPGQABAM7vY9NCX1R0gzOvFvURI&sign=7f7476f7162468c90cf45d915c4c3c9b3991587634b2b8e068e292ac521a9dd4