SmartAPI - PHP Client SDK getting only time feed
-
Hello, @admin ,@administrators . I have integrated php sdk and I am getting only time feed. Please help me to get market watch. Thankyou
in the below I am putting my php code
<script src="vendor/smartapi-php/angelbroking/src/socket.js"></script>
<?php
require_once DIR . '/vendor/autoload.php';
$smart_api = new \AngelBroking\SmartApi();
$login = $smart_api ->GenerateSession("G287101","########");
echo $login;
//$token = $smart_api ->GenerateToken();$JSONOUT=json_decode($login, true);
//print_r($JSONOUT["response_data"]["data"]["feedToken"]);
$feedToken=$JSONOUT["response_data"]["data"]["feedToken"];
?><script type="text/javascript">
console.log('<?php echo $feedToken; ?>');
var ws =new websocket('G287101', '<?php echo $feedToken; ?>');
ws.connection().then(() => {
ws.runScript("mcx_fo|230455", "mw");
setTimeout(function () {
ws.close()
}, 6000)
});
ws.on('tick', receiveTick);
function receiveTick(data) {
console.log(data);
}
</script>Output of the above code
{"status":"success","http_code":200,"http_error":"","response_data":{"status":true,"message":"SUCCESS","errorcode":"","data":{"I am receiving the jwttoken, refershtoken and feedtoken"}
please help
-
Hi @skylight
Apologies for delayed response.
We are currently supporting the JAVA, Javascript and python SDK as of now. Please consume the recent SDKs and let us know if the issue still occursThanks & Regards,
SmartAPI team