It looks like you're new here. If you want to get involved, click one of these buttons!
var KiteConnect = require("kiteconnect").KiteConnect;
var kc = new KiteConnect("<my-api-key>");
kc.requestAccessToken("request-token-from-login-flow", "my-api-secret")
.then(function(response) {
init();
})
.catch(function(err) {
console.log(err.response);
})
function init() {
// Fetch equity margins.
// You can have other api calls here.
kc.instruments("NSE") //or kc.margins("equity")
.then(function(response) {
// You got user's margin details.
}).catch(function(err) {
// Something went wrong.
});
}
Pointers appreciated. Thank you.