BSE ticker not showing up

chethan_dhruva
I am trying to run the below code, the NSE stock button comes up, the BSE stock button doesnt come up. Any help on this is greatly appreciated.
<!DOCTYPE html>



Stock Execution Page | Welcome



th, td {
text-align: left;
padding: 8px;
}

tr:nth-child(even){background-color: #f2f2f2}






Submit Basket






KiteConnect.ready(function() {
// Initialize a new Kite instance.
// You can initialize multiple instances if you need.
var kite = new KiteConnect("nklkoi92jn50mf04");

// Add a stock to the basket
kite.add({"exchange":"BSE","tradingsymbol":"500875","quantity":272,"transaction_type":"SELL","order_type":"MARKET","variety":"regular","price":198.3,"tag":"BB","Amount":"53937.6"});
kite.add({"exchange":"NSE","tradingsymbol":"KSCL","quantity":85,"transaction_type":"SELL","order_type":"MARKET","variety":"regular","price":494.9,"tag":"BB","Amount":"42066.5"});

// Register an (optional) callback.
kite.finished(function(status, request_token) {
alert("Finished. Status is " + status);
});

// Render the in-built button inside a given target
kite.renderButton("#default-button");

// OR, link the basket to any existing element you want
kite.link("#custom-button");
});

Testing bse ticker with zerodha kite publisher api



  • sujith
    One needs a Kite Connect app to use Kite Ticker.
    One can't get ticks on a third-party website because of CORS. kiteconnectjs is a nodejs library that can't be used on a frond-end app.
  • chethan_dhruva
    Thanks Sujith. The code snippet I have pasted is for kite publisher and it worked for the NSE stock
    kite.add({"exchange":"NSE","tradingsymbol":"KSCL","quantity":85,"transaction_type":"SELL","order_type":"MARKET","variety":"regular","price":494.9,"tag":"BB","Amount":"42066.5"});

    i.e. it comes up on the zerodha page when click on submit basket and am able to execute the trade.

    However the below one for BSE doesnt show up
    kite.add({"exchange":"NSE","tradingsymbol":"KSCL","quantity":85,"transaction_type":"SELL","order_type":"MARKET","variety":"regular","price":494.9,"tag":"BB","Amount":"42066.5"});
  • sujith
    You seem to be sending the exchange as NSE, it should be BSE.
  • chethan_dhruva
    sorry pasted the wrong snippet
    kite.add({"exchange":"BSE","tradingsymbol":"500875","quantity":272,"transaction_type":"SELL","order_type":"MARKET","variety":"regular","price":198.3,"tag":"BB","Amount":"53937.6"});
Sign In or Register to comment.