sell order not posted


  • @aksharmty Hi, Did your order post on exchange? I am facing the same issue. Sell order is not showing in exchange/site/UI.


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


  • HI @aksharmty Let us know which type of order you want to execute we will send you the request for the same.


  • @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?


  • hi @aksharmty Are you able to place the sell order now.


  • Hi @aksharmty we have noticed your request we will revert you back on this.


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

    ?>


  • Hi @aksharmty let us know what script what order type you want to execute we will help you out with the parameters also we will test it from our end.


  • @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.


  • Hi @aksharmty kindly post your req here.