@admin That means we won't be able to trade on latest symbols like MINDTREE30SEP214750CE for today (24 Sep, 2021) using API? Is there any way we can handle this because on daily basis I am finding some symbols where I have to trade manually!
Posts made by jax248
-
RE: Symbol Token Not Found
-
Symbol Token Not Found
Could not find many of the option strike price symbol token today, e.g. ZEEL30SEP21350CE. As mentioned in API Doc, master list (https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json) is updated once a day so where I can get symbol token for symbols which generate during trading day like for today (23 Sep, 2021) ZEEL30SEP21350CE?
-
RE: Not able to connect to WebSocket
@admin Hi..still getting same issue. I am using below JS code.
var ws =new websocket('VIYV1028', 'XXXXXXXX'); //connect to server ws.connection(); //add callback after socket connection ws.on('connect', connectionOpen); function connectionOpen(){ ws.runScript("nse_cm|2885", "mw"); // SCRIPT: exchange|token for multi stocks use & seperator, mcx_fo|222900 ### TASK: mw|sfi|dp } //add callback method where you can manipulate socket data ws.on('tick', receiveTick); //user defined function function receiveTick(data) { console.log(data); if (data.length == 0) { ws.close(); } }
-
RE: Not able to connect to WebSocket
@admin Thanks. Will check on Monday then.
-
Not able to connect to WebSocket
Hi @admin , I tried connecting to WS but getting below response:
{
"ak": "nk",
"task": "cn",
"msg": "cn"
}
Input Parameters:
WS url : wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream
Req : {"task":"cn","channel":"","token":"Generated Feed Token","user":"VIYV1028","acctid":"VIYV1028"}Am I doing anything wrong or WebSocket connections only allowed during market hours?
-
RE: ROBO Orders not working?
@bala-excel I waited for long and then implemented my own logic for that, which is running fine so haven't checked ROBO orders as of now. Is it working fine now for you?
-
RE: Postback URL Working?
@admin Thanks a lot. It working fine now :) You guyz are doing great job.
-
RE: Postback URL not working.
@admin Thanks a lot. It working fine now :) You guyz are doing great job.
-
RE: Postback URL not working.
@admin Hey...haven't got any calls from anyone. Can you please confirm this feature is working or not as I am not getting any updates on the URL I kept as Postbak URL!
-
RE: Postback URL not working.
@admin I don't seems to be getting any updates on Postback URL. Is this feature working?
-
RE: Postback URL Working?
@admin HI, any updates on this? Is this feature working? I don't seems to be receiving any updates on the URL I have given.
-
RE: what is url wher i get it
@imran Signup at https://smartapi.angelbroking.com/signup# and create your App. Make sure your account is migrated to new system of Angel Broking.
-
RE: How to login and Generate jwt Token
@aksharmty Hey sorry for late reply. Variable name was not correct in my code and you need to replace $responseContent with $result. But anyways you seems to already able to login :)
-
RE: How to login and Generate jwt Token
@aksharmty Till any SDK is not release for PHP, you can login as below:
<?php $headers = array('Content-Type: application/json', 'Accept: application/json', 'X-UserType: USER', 'X-SourceID: WEB', 'X-ClientLocalIP: Your_Local_IPAddress', 'X-ClientPublicIP: Your_Public_IPAddress', 'X-MACAddress: Your_MAC_Address', 'X-PrivateKey: Your_Private_Key'); $data["clientcode"] = "Your_UserName"; $data["password"] = "Your_Password"; $url = 'https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword'; $jsonData = json_encode($data); $curl = curl_init(); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); curl_setopt($curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_URL, $url); 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($responseContent, true); ?>
-
RE: Buy Limit orders with trigger
@rjbanna Just checked the JSON I am sending agree that my solution won't work :)
-
RE: How to fetch my fund balance and available margin balance
@aksharmty In PHP, you can hit RMS API url with Curl (along with proper authorization headers) and parse response JSON to get all details. You can get Endpoint and Response format from here https://smartapi.angelbroking.com/docs/User#Funds
-
RE: How to post order and fetch historical date using Curl php
@aksharmty I am using direct HTTP calls to API using Curl and managing response in my classes. To place different orders, I am creating json data and sending it along with proper authorization headers. Fetching data and other profile details using this only. Code part is very detailed, so can't put up all code here. Let me know in case you are stuck in any place. Also as of now historical data is not given by Smart API.
-
RE: Buy Limit orders with trigger
@builder35 Just add one more parameter as 'triggerprice'. By this it determines at what price order needs to be triggered. In price keep value as 0 in case you want to buy at Market Price after trigger, or any (95 in your case) desired value to buy at.
Your JSON will look something like this:
{ "variety":"NORMAL", "tradingsymbol":"BAJFINANCE25MAR215500CE", "symboltoken":"52414", "transactiontype":"BUY", "exchange":"NFO", "ordertype":"LIMIT", "price":"95", "triggerprice":"95", "producttype":"INTRADAY", "duration":"DAY", "quantity":"250" }
Let me know in case of any confusion.
-
RE: How to post order and fetch historical date using Curl php
@aksharmty This is quite old so just confirming, If you are still stuck with this, let me know. I have implemented similar functionality in PHP and might be able to help you in this.