How to use kiteconnect - 1 common examples

To help you get started, we’ve selected a few kiteconnect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zerodhatech / kiteconnectjs / examples / connect.js View on Github external
var KiteConnect = require("kiteconnect").KiteConnect;

var api_key = "api_key",
	secret = "api_secret",
	request_token = "request_token",
	access_token = "";

var options = {
	"api_key": api_key,
	"debug": false
};

kc = new KiteConnect(options);
kc.setSessionExpiryHook(sessionHook);

if(!access_token) {
	kc.generateSession(request_token, secret)
		.then(function(response) {
			console.log("Response", response);
			init();
		})
		.catch(function(err) {
			console.log(err);
		})
} else {
	kc.setAccessToken(access_token);
	init();
}

kiteconnect

The official typescript client for the Kite Connect trading APIs

MIT
Latest version published 4 months ago

Package Health Score

65 / 100
Full package analysis

Popular kiteconnect functions