Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. aksharmty
    3. Posts
    A
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by aksharmty

    • 75 minutes candle

      Hi,
      I found 75 minutes candle in angelone app. Can any tell me how to get 75 minutes historical candle data.

      posted in General Discussion
      A
      aksharmty
    • RE: Invalid Token Error

      same issue for me.
      Status : 200{"success":false,"message":"Invalid Token","errorCode":"AG8001","data":""}

      posted in Python SDK
      A
      aksharmty
    • RE: how to get LTP for USDINR and BANKNIFTY

      @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;

      posted in General Discussion
      A
      aksharmty
    • how to get LTP for USDINR and BANKNIFTY

      how to get market price for USDINR and BANKNIFTY

      posted in General Discussion
      A
      aksharmty
    • RE: Historic API not working

      i have 403 error. I fetch 2 time per minute. please increase limit

      posted in Bugs
      A
      aksharmty
    • Currency trading possible

      Currency trading possible or not using api. If yes please refrence for currency api.

      posted in General Discussion
      A
      aksharmty
    • how to close open position

      I open a buy position on 100 now price is 102 So I want to close open position.
      Please tell me how close my active position using api.
      what parameters required for this.

      posted in General Discussion
      A
      aksharmty
    • on login recieve error Response String trade : {"message":"Something Went Wrong, Please Try After Sometime","errorcode":"AB1004","status":false,"data":null}

      I login successfully in morning (9:15 am ) but now
      I recieve error

      Response Status : 200
      Response String trade : {"message":"Something Went Wrong, Please Try After Sometime","errorcode":"AB1004","status":false,"data":null}

      please update what the issuse

      posted in Bugs
      A
      aksharmty
    • RE: my holding not fetch proper

      @Mnagesh
      Thanks to reply, After t1 holding show as t1quantity , after t3 realisedquantity
      But my case shock name not show in holding list.
      So this is a bug on api system or limitation error.

      posted in Bugs
      A
      aksharmty
    • my holding not fetch proper

      I buy GAIL Yesterday . GAIL show in my portfolia on web traminal but my all holding not fetch using API .
      Currently I have 5 stock but API fetch only 4 Stock please check your holding limitation and solve this error.
      error-angel.png

      posted in Bugs
      A
      aksharmty
    • how to get SBIN stock ASK price and BID price in php

      how to get SBIN stock ASK price and BID price in php

      posted in General Discussion
      A
      aksharmty
    • can I fetch all type data

      Can I fetch all type data from single API ( trade API ). I mean can I fetch historical data , market data and portfolio data using Trade API .
      If YES its great for me.
      If NO. please update your api system and save your and users access limit.
      I think due to login in three API in one query I receive message l
      receive "{"message":"Something Went Wrong, Please Try After Sometime","errorcode":"AB1004","status":false,"data":null}"

      posted in General Discussion
      A
      aksharmty
    • real fund and ask bid

      I want to fetch ask and bid . can you tell me how can possible fetch ask and bid.

      posted in General Discussion
      A
      aksharmty
    • RE: I want fetch specific holding

      @webseos i have 3 stock ( BHEL-EQ, SBIN-EQ,NHPC-EQ) in holding. now I want to fetch only BHEL-EQ stock quantity and average price from the exchange using api.

      posted in General Discussion
      A
      aksharmty
    • I want fetch specific holding

      I have more 3 stock in my demat account . I want get data only BHEL-EQ holding data . Anyone tell me how to fetch only one data
      I use this code :
      <?php
      $urlholding ='https://apiconnect.angelbroking.com/rest/secure/angelbroking/portfolio/v1/getHolding?tradingSymbol=BHEL-EQ';
      $curltrade = curl_init();
      curl_setopt($curltrade, CURLOPT_URL, $urlholding);

      curl_setopt($curltrade, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED);
      curl_setopt($curltrade, CURLOPT_HTTPHEADER, $tradeheaders);

      curl_setopt($curltrade, CURLOPT_RETURNTRANSFER, 1);

      $resulttrade = curl_exec($curltrade);
      $http_statustrade = curl_getinfo($curltrade, CURLINFO_HTTP_CODE);

      echo '<br/>Response Status trade : ' . $http_statustrade;
      //echo '<br/>Response String trade : ' . $resulttrade;

      //To Convert json response to array
      $resJsontrade = json_decode($resulttrade, true);

      //holding
      $ts = $resJsontrade['data']['0']['tradingsymbol'];
      $exg = $resJsontrade['data']['0']['exchange'];
      $quh = $resJsontrade['data']['0']['quantity'];
      $proh = $resJsontrade['data']['0']['product'];
      $avh = $resJsontrade['data']['0']['averageprice'];
      $ltp0 = $resJsontrade['data']['0']['ltp'];
      $sth = $resJsontrade['data']['0']['symboltoken'];
      $close0 = $resJsontrade['data']['0']['close'];
      $realisedquantity0 = $resJsontrade['data']['0']['realisedquantity'];
      $profitandloss0 = $resJsontrade['data']['0']['profitandloss'];
      echo " ts " . $ts . " quantity " . $quh;
      ?>

      posted in General Discussion
      A
      aksharmty
    • Without POA possible buy/sell order placement

      Without POA possible buy/sell order placement using API for equity.

      posted in General Discussion
      A
      aksharmty
    • RE: sell order not posted

      @admin I have htmedia-eq in my demat . Now I want post sell order for delivery .
      $data["exchange"] = "NSE";
      $data["tradingsymbol"] = "HTMEDIA-EQ";
      $data["symboltoken"] = "11979";
      $data["transactiontype"] = "SELL";
      $data["ordertype"] = "LIMIT";
      $data["price"] = "40.0";
      $data["quantity"] = "1";
      $data["disclosedquantity"] = "0";
      $data["variety"] = "NORMAL";
      $data["producttype"] = "DELIVERY";

      posted in General Discussion
      A
      aksharmty
    • RE: sell order not posted

      @admin I am try again and again but order not posted on exchange.
      Are you write me what requirment for posting order on exchange using your API?

      posted in General Discussion
      A
      aksharmty
    • RE: sell order not posted

      @admin this is my code :

      <?php
      include "connect.php";
      $jwtselect = mysqli_fetch_assoc(mysqli_query($connection,"select * from token where id ='1'"));
      $feedjwt = $jwtselect['feed'];
      $tradejwt = $jwtselect['trade'];
      $historyjwt = $jwtselect['history'];
      $au="Authorization:Bearer ";
      $feedjwtt = "Authorization:Bearer "." ".$feedjwt;

      $feedheaders = array('Authorization:Bearer '.$feedjwt,'Content-Type: application/json', 'Accept: application/json', 'X-UserType: USER', 'X-SourceID: WEB', 'X-ClientLocalIP: 208.91.198.55', 'X-ClientPublicIP: 43.225.3.40', 'X-MACAddress: 20-E6-17-07-19-3F', 'X-PrivateKey: secretkey');
      $tradeheaders = array('Authorization:Bearer '.$tradejwt,'Content-Type: application/json', 'Accept: application/json', 'X-UserType: USER', 'X-SourceID: WEB', 'X-ClientLocalIP: 208.91.198.55', 'X-ClientPublicIP: 43.225.3.40', 'X-MACAddress: 20-E6-17-07-19-3F', 'X-PrivateKey: secretkey');
      $historyheaders = array($historyjwt,'Content-Type: application/json', 'Accept: application/json', 'X-UserType: USER', 'X-SourceID: WEB', 'X-ClientLocalIP: 208.91.198.55', 'X-ClientPublicIP: 43.225.3.40', 'X-MACAddress: 20-E6-17-07-19-3F', 'X-PrivateKey: secretkey');

      $data["exchange"] = "NSE";
      $data["tradingsymbol"] = "HTMEDIA-EQ";
      $data["symboltoken"] = "11979";
      $data["transactiontype"] = "SELL";
      $data["ordertype"] = "LIMIT";
      $data["price"] = "40.0";
      $data["quantity"] = "1";
      $data["disclosedquantity"] = "0";
      $data["variety"] = "NORMAL";
      $data["producttype"] = "DELIVERY";
      $data["duration"] = "DAY";

      $url = 'https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/placeOrder';

      $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($responseContent, true);
      $resJsonArray = json_decode($result, true);
      $mms = $resJsonArray['message'];
      echo " mms ".$mms;
      print_r($result);

      ?>

      posted in General Discussion
      A
      aksharmty
    • RE: sell order not posted

      @admin I want just know why are not post sell order on exchange. if my query run successfully and I recieved orderid .
      Response String : {"status":true,"message":"SUCCESS","errorcode":"","data":{"script":"HTMEDIA-EQ","orderid":"210525000542903"}}

      please write if my code work good why not post order on exchange. how to post sell order on exchange.

      posted in General Discussion
      A
      aksharmty