publisher pop ups multiple times

when i click on the kite button the publisher pops up load multiple time
  • rakeshr
    Kite Publisher is working fine at our end. Can you paste the complete publisher code, we will take a look?
  • kyaboltitu
    kyaboltitu edited January 29
    code of html page
    <div class="m-content">
    <div id="popup">
    <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
    <div class="modal-header">
    <button type="button" ng-click="MYTRADES1()" class="close" data-dismiss="modal">&times;</button>
    <h4 class="modal-title">TRADE</h4>
    <div class="modal-body">
    <div class="container">
    <!-- A Kite button will be generated inside this container //-->

    <!-- The basket will be linked to this element's onClick //-->

    <kite-button id="custom-button" >ZERODHA</kite-button>
    code of angular :
    mytradedata = $scope.mytrade

    //var promise = ""

    // var promise = new Promise(function(resolve, reject) {
    KiteConnect.ready(function() {
    var kite = new KiteConnect("pqmpbbuist3w5qyt");

    // console.log($scope.mytrade)

    "exchange": "NSE",
    "transaction_type": "BUY",
    "order_type": "LIMIT",
    "product": "MIS",
    "price": 915.15,
    "quantity": 1,
    "variety": "bo",
    "stoploss": 5,
    "squareoff": 7,
    "trailing_stoploss": 1.5,
    "readonly": true

    kite.finished(function(status, request_token) {
    alert("Finished. Status is " + status);


  • kyaboltitu

    html page popup has the kite button within it :::: kite-button id="custom-button" ZERODHA kite-button

  • kyaboltitu
    Kindly help. Our trading can start once the issue is resolved.
  • sujith
    We don't have any issues from our end. You might have attached two handlers.
    You can refer to the publisher demo here.
  • kyaboltitu
    kite.finished(function(status, request_token) {
    alert("Finished. Status is " + status);
    console.log("kite finished");
    i am using this function in order to capture the status but this function is not called

  • sujith
    It seems like you have given a wrong redirect URL for your Kite Publisher app.
  • kyaboltitu
    we dont use the url we just use the api key

    KiteConnect.ready(function() {
    var kite = new KiteConnect("your_api_key");
  • kyaboltitu
    please help
  • sujith
    One has to specify a redirect URL while creating Kite Publisher app to which Kite trade will redirect post successful login. You seem to have given a wrong redirect URL.
Sign In or Register to comment.