Kite publisher not working after migration to Kite 3.0

cdesai1987
Getting the error

{"status":"error","message":"Invalid orders payload.","data":null,"error_type":"InputException"}
Tagged:
  • utkarsh31
    i'm facing the same issue. i use javascript to bind the orders to buttons on the dom (kiteconnect.add, kiteconnect.link)
  • cdesai1987
    Can anyone from Kite Publisher look into this at priority
  • sujith
    Can you paste your basket code?
  • arjun
    arjun edited March 2018
    Simple Embedded Publisher Button also not working,
    Below is HTML Code,


    Buy SBI stock

    Getting Error message : -
    {"status":"error","message":"Invalid connect session.","data":null,"error_type":"InputException"}

    NOTE : I have updated API with Kite Connect Publisher API Key.
  • cdesai1987
    cstext1.Append(" ");
    cstext1.Append("");
    cstext1.Append("KiteConnect.ready(function() {");

    cstext1.Append(" var kite = new KiteConnect(\"kitedemo\");");


    cstext1.Append("kite.add({");
    cstext1.Append("\"exchange\": \"NSE\",");
    cstext1.Append("\"tradingsymbol\": \"" + item["StockName"].ToString() + "\",");
    cstext1.Append("\"quantity\": \"" + Qty + "\",");
    cstext1.Append("\"transaction_type\": \"" + item["Signal"].ToString() + "\",");
    cstext1.Append("\"product\": \"MIS\",");
    cstext1.Append("\"order_type\": \"MARKET\",");
    cstext1.Append(" });");

    cstext1.Append("kite.add({");
    cstext1.Append("\"exchange\": \"NSE\",");
    cstext1.Append("\"tradingsymbol\": \"" + item["StockName"].ToString() + "\",");
    cstext1.Append("\"quantity\": \"" + QtySL + "\",");
    cstext1.Append("\"transaction_type\": \"" + SLSignal + "\",");
    cstext1.Append("\"product\": \"MIS\",");
    cstext1.Append("\"trigger_price\": \"" + SLTrigger + "\",");
    cstext1.Append("\"order_type\": \"SL-M\",");
    cstext1.Append(" });");



    cstext1.Append(" kite.renderButton(\"#default-button\");");
    cstext1.Append("kite.link(\"#custom-button\");");
    cstext1.Append(" });");


    cstext1.Append("");
  • cdesai1987
    Code was working perfectly fine till friday . once there was an upgrade nothing is working.

    Though Somehow only your test page is working . Our Pages are not working.
    https://kite.trade/publisher-demo
  • abhivin123
    abhivin123 edited March 2018
    Hey Guys ... after a lot of debugging ... i figured it out ... basically ... in the earlier version of the API ... your code have sent the prices / trigger price in string format with double quotes. And it still used to work just fine.

    I guess with the new version of the code ... the integer / double check is enforced somewhere at the app layer. API remains the same.

    Just remove the double quotes around prices or any trigger price and it would work like a charm ...

    Fix now ... thank me later ;-)
  • cdesai1987
    Yes It did work thanks a lot............
  • cdesai1987
    One more Issue We cannot Place the MIS Orders in Kite Publisher all orders are going as CNC
  • cdesai1987
    @sujith : Can you please check this on priority.
  • sujith
    @cdesai1987,
    The backend has become robust now, it expects a proper type. We are sorry for the inconvenience. The only solution here is to send the typed params as in number as number and string as a string.
  • superman007
    @sujith : Thanks for the reply. MIS orders are still not working. Even if we send it as MIS , its taking CNC for all orders ! Please check it .
  • sujith
    We are looking into this.
  • abhivin123
    abhivin123 edited March 2018
    Yeah ... MIS to CNC is definitely an issue. Also ... Kite publisher buttons don't seem to be working for NFO ...

    // Add a stock to the basket
    kite.add({
    "exchange": "NFO",
    "tradingsymbol": "DLF18MARFUT",
    "quantity": 5000,
    "transaction_type": "BUY",
    "order_type": "MARKET"
    });

    This fails ... and is not added in the basket. Request you to please look into it @sujith
  • sujith
    @abhivin123,
    This should be fixed now. Can you check and update about the same?
  • abhivin123
    @sujith
    Bingo! Yup ... I can confirm that both stuff are working now -
    (1) MIS is no longer going as CNC
    and
    (2) NFO exchange orders are going through without issues.

    Thnx a ton!
This discussion has been closed.