Breeze (ICICI Direct)
Breeze is ICICI Direct's trading API. It's the recommended broker for multi-day historical simulations — its historical option data retention is much better than Kite's.
Prerequisites
- An ICICI Direct trading account.
- API access enabled on that account.
Obtaining API Credentials
You need an API Key and API Secret (called App Key and Secret Key on the ICICI portal) from an ICICI Direct API app.
- Go to the ICICI Direct API portal: https://api.icicidirect.com/apiuser/home
- Log in with your ICICI Direct credentials.
- Click Register an App (or Create App).
- Fill in the app details:
- App name — your own value.
- Redirect URL — set this to
http://127.0.0.1:5000/breeze_callback(use the host/port you actually run the app on). This is required for the automatic login flow — ICICI sends the session token back to this URL. - Submit. Once the app is approved/created, open it and copy the API Key (App Key) and API Secret (Secret Key).
Reference: Breeze API documentation —
https://api.icicidirect.com/apiuser/home and the breeze-connect Python
library — https://pypi.org/project/breeze-connect/
Entering Credentials
On the Auth page (top navigation bar), in the Breeze (ICICI Direct) card, enter the API Key and API Secret and click Save & Start Breeze Login. You will be redirected to ICICI Direct to log in, then returned to the app with a session token captured automatically.
If your redirect URL is not yet registered with ICICI, use the Paste session token manually option on the Auth page as a fallback.
Credentials are stored securely in the OS keychain — you enter them once.
Daily Login
Like Kite, a Breeze session token expires and must be refreshed daily:
- Step 1 — API Credentials: enter your Breeze API Key and API Secret once and click Save Breeze Credentials.
- Step 2 — Session Token: click Start Breeze Login. ICICI Direct's login page opens; complete login. You are redirected back and the session token is captured automatically.
- Click Test Breeze Connection to confirm.
If your redirect URL isn't registered yet, use Paste session token manually to fall back to the old flow.
API Contract Check
Like Kite, a Breeze session token is only saved if it passes the API contract check — the app calls the read-only endpoints it actually depends on (funds, portfolio positions, order list) before persisting the token. If login appears to succeed but the badge doesn't turn green, check the Auth page for a contract-check error naming which feature would have broken.
Breeze returns {"Error": "No Data Found"} instead of an empty list when
there simply aren't any positions/orders yet — the contract check treats
that as empty data, not a failure, so a fresh login before your first order
of the day won't get blocked by it.
Known Strengths
Breeze is the recommended broker for multi-day historical simulations (the Multi-Day Sim / Run Again broker dropdowns default to it) — unlike Kite, its instrument list retains expired weekly option strikes well beyond 7 days, so backtests over older date ranges use real traded prices instead of falling back to Black-Scholes estimates.
ICICI's get_historical_data_v2 always includes an open_interest field for
F&O contracts (confirmed via pypi.org/project/breeze-connect), so the Option
Scanner's Flow (OI Analysis) tab gets a real previous-close OI baseline on
Breeze too — same as Kite, no estimated fallback.
Live OI (the main scan's OI column, and Flow's current-day OI reading) comes
from get_option_chain_quotes, not get_quotes — ICICI's plain quote
endpoint has no open_interest field at all (confirmed against both
pypi.org/project/breeze-connect and ICICI's own API reference, 2026-08-22).
BreezeAdapter.quote() batches NFO options through the chain endpoint for
this reason (same one ltp() already used, for the same reason).
Static IP Requirement
Ask your ISP for a static IP add-on before setting up your Breeze API app — SEBI's API trading rules require a fixed IP for order placement, registered with your broker.