Sign up: trading + demat account
Before any API work you need a live trading + demat account. This is a KYC process, not a coding step — but it gates everything after it, so do it correctly the first time.
Steps (Zerodha, representative of all brokers)
- Go to the broker's account-opening page and start KYC.
- Have ready: PAN, Aadhaar (for e-KYC/e-sign), a cancelled cheque or bank statement, a passport-size photo, and your signature (scanned or drawn on their app).
- Complete In-Person Verification (IPV) — usually a short video selfie step, sometimes an in-person visit if e-KYC fails.
- Choose segments to activate: Equity (cash) is default; you must explicitly opt into F&O (futures & options) — this requires additional income proof (bank statement / ITR / salary slip showing sufficient net worth, per SEBI/exchange rules) since F&O is a leveraged, higher-risk segment.
- Wait for account activation (usually 1-2 business days). You'll get a client ID (e.g.
AB1234) — this is your identity across the broker's trading terminal and the API.
Things that bite people later
- F&O activation is separate from equity. If you plan to trade options (very common for retail algo in India), activate F&O now — the income-proof step has a turnaround delay, don't discover this at chapter 60 when you try to place your first option order.
- Segments must match your instruments. An order on NFO (NSE F&O) segment will be rejected outright if F&O isn't enabled on your account, regardless of what your code does correctly.
- Nominee and bank linking — get this done during onboarding; missing it blocks fund withdrawal later, unrelated to algo trading but annoying to fix mid-stream.
Checkpoint
You should now have:
- A client ID
- Equity segment active (and F&O active if you intend to trade derivatives)
- Net banking / UPI linked for fund transfer