Error in the last line. Please Help me solve it..... KeyError: 'candles'

import pandas as pd
from fyers_apiv3 import fyersModel
import pytz

#generate trading session
client_id = open("client_id.txt",'r').read()
access_token = open("access_token.txt",'r').read()

# Initialize the FyersModel instance with your client_id, access_token, and enable async mode
fyers = fyersModel.FyersModel(client_id=client_id, is_async=False, token=access_token, log_path="C:/Users/mohammad/Downloads/")

def fetchOHLC(ticker,interval,range_from, range_to):
    data = {
        "symbol":ticker,
        "resolution":interval,
        "date_format":"1",
        "range_from":range_from,
        "range_to":range_to,
        "cont_flag":"1"
    }

    response = fyers.history(data=data)['candles']

Hey @108399324009239327485

Could you please print the response and send us .