Issue in historical candle data for for Nifty and BankNifty instrument keys

Hello Team,
I am facing issue in getting the Historical Candle Data API for Nifty and Banknifty instrument key

  1. BankNifty: NSE_INDEX|Nifty Bank
  2. Nifty50: NSE_INDEX|Nifty 50

My curl request is
$interval = ‘1minute’;

$url3 = ‘https://api.upstox.com/v2/historical-candle/’ . $instrumentKey . ‘/’ . $interval . ‘/’ . $todaysDate .‘/’. $fromDate;

curl_setopt_array(
$curl3,
array(
CURLOPT_URL => $url3,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => ‘’,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => ‘GET’,
CURLOPT_HTTPHEADER => array(
‘Accept: application/json’,
'Authorization: Bearer ’ . $bearerToken // Add bearer token to headers
),
)
);

when executing the $response3 = curl_exec($curl3);

I am getting response as False & null.

When i integrated this at first time then it was working properly at my Local(localhist) and Development server(https://tradercircuit.betadelivery.com/)

Now i have uploaded the code on another server (https://staging.traderscircuit.com/)there its not working ,

its only working on tradercircuit.betadelivery.com/, not on local and the new server.

Please Assist on this.
Thanks,
Hritik

Hello @HritikRD,

Could you please share the response message and the error code you received when encountering a null response? This information will help us investigate the issue further.

Additionally, please correct me if I am mistaken, but based on my understanding of your post, you are receiving the expected response when running the code locally but are unable to get a response when the code is deployed on the server (https://staging.traderscircuit.com/).

Looking forward to your response.

The Response message i am getting is false . this is only happening for Nifty 50 and Bank Nifty Instrument keys.

You are assuming wrong , the API is working on my development server i.e https://tradercircuit.betadelivery.com/
And not working on Local and Staging server ,

But 2 months ago it was working locally also, when i had integrated this api for the first Time,

Looking forward to your response,
Let me know if any explanation is needed further,

Thanks,
Hritik

The issue is looking like my domain is not whitelisted yet!??

@HritikRD - Could you please share the response you’re receiving?