@Mnagesh
I can't find USDINR token code. Can you share me USDINR token code?
eg.
BANKNIFTY : 26009
NIFTY : 26000
USDINR : ?
<-- my code -->
$data["clientcode"] = "client id";
$data["exchange"] ="CDS";
$data["tradingsymbol"] ="USDINR";
$data["symboltoken"]= ? ;
$url = 'https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/getLtpData';
$jsonData = json_encode($data);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED);
curl_setopt($curl, CURLOPT_HTTPHEADER, $tradeheaders);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
echo '<br/>Response Status : ' . $http_status;
echo '<br/>Response String : ' . $result;
//To Convert json response to array
$resJsonArray = json_decode($result, true);
$mms = $resJsonArray['message'];
echo " mms ".$mms;
echo "<br><br>";
$ltp = $resJsonArray['data']['ltp']; echo "<br>ltp".$ltp;