How-to
kiteconnect.js
Node.js
kiteconnect.js Node.js quickstart
Conflict-of-interest disclosure. This guide is published by the WebNotes Editorial Team for informational purposes and is written independently. WebNotes operates a Zerodha account-opening referral programme, disclosed on the pages that carry the referral link; this guide does not carry it and earns no referral commission from the procedure described here.
Step-by-step procedure
Per the procedure infobox.
Code example
const KiteConnect = require("kiteconnect").KiteConnect;
const kite = new KiteConnect({
api_key: "YOUR_API_KEY"
});
kite.setAccessToken("YOUR_ACCESS_TOKEN");
// Get profile
kite.getProfile()
.then(profile => console.log(profile))
.catch(err => console.error(err));
// Place order
kite.placeOrder("regular", {
exchange: "NSE",
tradingsymbol: "RELIANCE",
transaction_type: "BUY",
quantity: 1,
product: "MIS",
order_type: "MARKET"
}).then(order => console.log(order.order_id));
// Get positions
kite.getPositions()
.then(positions => console.log(positions))
.catch(err => console.error(err));
See also
- Kite Connect (Zerodha API)
- Kite Connect OAuth login flow
- pykiteconnect Python quickstart
- Kite Connect Java SDK
- Sign up and get Kite API key
- Kite Connect access token generation
- Kite Connect FAQs
- Kite Connect API pricing
- Algo trading with Kite Connect
- Place order via Kite Connect (Python)
- Kite Connect order modify / cancel
- Kite Connect basket orders API
- Kite Connect GTT API
- Kite Connect historical data API
- Kite Ticker WebSocket (Python)
- Backtesting with Kite historical API
- Kite Connect rate limits
- Kite Connect static IP requirement
- Kite Connect sandbox / mock
- Use Kite API data on other platforms
- Historical API without Kite Connect access
- Historical vs live data pricing
- Kite API charges and plans
- Net vs Day in positions API
- How to fix max order request exceeded without 5000 orders
- How to get invoice for Kite Connect subscription
- Mobile browser issue with Kite Connect login
- Deactivate / unsubscribe Kite Connect
- Will Zerodha help code strategies
- Kite Publisher API
- Kite MCP for AI assistants
- Zerodha Open API community
- Algorithmic trading in India
- Zerodha
- Kite (Zerodha)
External references
References
- Zerodha, kiteconnect Node.js SDK, github.com/zerodhatech.