I have trying to integrate api provided by you but nothing work for me I am getting response of success but data couldn’t be fetched.
Please make a call or google meet to solve my issue
I am requesting you to connect to me as soon as possible
You can contact me by any mode call, google meet , connect etc but make sure do this as soon as possible
Let’s start by understanding what went wrong. Please share the cURL for the transaction so we can guide you along.
Thanks!
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => '[https://api.upstox.com/v2/option/contract?instrument_key=NSE_EQ%7CINE090A01021&expiry_date=2025-02-07](https://api.upstox.com/v2/option/contract?instrument_key=NSE_EQ%7CINE090A01021&expiry_date=2025-02-07)', 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( 'Authorization: ••••••', 'Cookie: __cf_bm=9aly5mWl8BIXMpY6_txAihBwgeQjGxt2SRpAG72YDWE-1738925927-1.0.1.1-hXS5GvIJuWUZa8pgFDgzN0uVz8drPm2J6_vOaGtqwgfB30FcICs3bZQgJk.OK6AN; _cfuvid=fc9nU103_JzkTWn9LjhBmp4LsEohW4IOUPYl0eNJ41E-1738925927789-0.0.1.1-604800000' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
@Aashish_Tahlan You have provided an incorrect expiry date. For ICICI, you need to consider the monthly expiry, with the nearest expiry being February 27, 2025.
Try using below curl
curl -X 'GET' \
'https://api-v2.upstox.com/v2/option/contract?instrument_key=NSE_EQ%7CINE090A01021&expiry_date=2025-02-27' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {auth_token}'
Thanks