Historical API - error AB2001


  • What ?

    • getting error AB2001 error code on calling getCandleData.

    code snippet:

    try {
    			const candleResponse = await this.sessionConfig.smartApi.getCandleData({
    				exchange: "NFO",
    				symboltoken: tokenNumber,
    				interval: "THREE_MINUTE",
    				fromdate: "2021-04-19 09:15",
    				todate: "2021-04-19 15:30",
    			});
    		} catch (error) {
    			console.log(error);
    		}
    

    tokenNumber is from an option chain that has not expired yet.

    8f354327-8231-43ef-a048-bfd78355969e-image.png


  • Hi @shashwatVar

    Apologies for delayed response.
    The getCandleData API is working fine for NFO(unexpired) token from our end as we checked. Kindly share us the token number and header passed to analyze on the issue.

    Thanks & Regards,
    SmartAPI team