Unable to find api_secret for Kite publisher

gangwalsaurabh
Do we only get api_key for kite publishers?
  • sujith
    Hi @gangwalsaurabh,
    Kite Publisher doesn't have api_secret. Only a Kite Connect app will have api_secret.
  • gangwalsaurabh
    gangwalsaurabh edited October 2017
    @sujith thanks for the reply. I have one more doubt regarding publisher JS.
    I was using dynamic input example as shown in the kite publisher demo using a get form.
    but it seems the kite.connect(); method isn't working for publisher JS. As soon as I click on the custom button a pop up window opens "connecting to kite" and it just stays there, nothing more happens. Can you please, shed some light?

    Below is the JS, I am using:

    KiteConnect.ready(function() {

    // form
    $(document).ready(function() {
    $("#example-form").submit(function() {
    var kite = new KiteConnect("my_api_key"),
    qty = parseInt($("#num-shares").val()),
    symbol = $("#sym").val();

    kite.add({
    "exchange": "NSE",
    "tradingsymbol": "{symbol}",
    "quantity": !isNaN(qty) ? qty : 1,
    "order_type": "LIMIT",
    "transaction_type": "SELL",
    "price": 105,
    "product": "CNC"
    });
    kite.connect();
    });
    });
    });
  • gangwalsaurabh
    gangwalsaurabh edited October 2017
    @sujith thanks for the reply. I have one more issue regarding the publisher JS.
    I am trying to implement the Dynamic input example as shown in the publisher-demo using get form.
    But, it seems the kite.connect(); isn't working for my code.
    when I press the custom button a new pop up window opens but, it is stuck at connecting to kite and doesn't actually get connected.

    Below is the code I am using:
    KiteConnect.ready(function() {

    // form
    $(document).ready(function() {
    $("#example-form").submit(function() {
    var kite = new KiteConnect("my_api_key"),
    qty = parseInt($("#num-shares").val()),
    symbol = $("#sym").val();

    kite.add({
    "exchange": "NSE",
    "tradingsymbol": "{symbol}",
    "quantity": !isNaN(qty) ? qty : 1,
    "order_type": "LIMIT",
    "transaction_type": "SELL",
    "price": 105,
    "product": "CNC"
    });
    kite.connect();
    });
    });
    });
  • sujith
    Hi @gangwalsaurabh,
    We figured out the issue. We will fix it.
Sign In or Register to comment.