Algo trading with IIFL - ONT API
Connect your IIFL - ONT API account to MyAlgoMate and automate your execution — one-click orders, risk controls and fast exits, no coding required.
Connecting IIFL - ONT API
MyAlgoMate connects to IIFL through their ONT API — IIFL's newer trading API, also called the new IIFL Markets API. You register for API access to get your API Key and API Secret, enable TOTP on your account, register a static IP, and then enter your API Key, API Secret, Client ID, Password and TOTP key into the broker login form in MyAlgoMate.
Use IIFL - ONT API with
Your IIFL - ONT API account works with all 6 of these MyAlgoMate products — plus custom automation of your own strategy.
- Stockmock and Algotest strategy automation tool (Time Based Straddle Strangle)
- Trademate
- Copy Trading Software
- TradeBridge
- Cloud Server for Algo Trading
- RMS Tool
- Custom strategy automation — your own logic, automated; you set the rules and stay in control.
Setting up IIFL - ONT API
Step 1 — Get ONT API access on your IIFL account
IIFL does not charge for API access, so there is no subscription to buy. You do need an active IIFL trading account with API access enabled on it.
- Go to the IIFL Trading API portal and use the customer login to register for API access.
- ⚠️ If your IIFL account is still on the older XTS API, speak to your IIFL relationship manager and ask to be moved to ONT — the two are different APIs, and MyAlgoMate connects to ONT.
- Once your access is set up, IIFL issues two credentials — copy both:
- API Key — identifies your app
- API Secret — keep it private; never share it
Step 2 — Enable TOTP on your IIFL account
The ONT login asks for your IIFL credentials plus a second factor — either a one-time password or a TOTP code. MyAlgoMate signs in for you and cannot read an OTP off your phone, so enable TOTP and keep its secret key.
- In your IIFL account settings, enable TOTP / two-factor authentication using an authenticator app.
- When the QR code appears, save the secret key it contains — most authenticator apps show a “can't scan the code?” or manual-entry option that reveals it. This secret key is the TOTP key MyAlgoMate needs.
- Scan the QR code into your authenticator app (Google Authenticator, Authy, etc.) so you can still sign in to IIFL yourself.
Step 3 — Register your static IP
Under the SEBI retail algo-trading rules in force since 1 April 2026, API order placement must originate from a registered static IP. Register your static IP with IIFL for API trading.
- Which IP to use: if you run MyAlgoMate on your own machine, use your ISP's static IP; if you run it on a cloud machine, use that cloud server's static IP.
No static IP or cloud machine yet? Our Cloud Server for Algo Trading is a cloud machine specialised for algo trading, and it comes with its own static IP you can register.
Step 4 — Enter the details in MyAlgoMate
- Open the broker login form in MyAlgoMate and enter your API Key, API Secret, Client ID, Password and TOTP key, then save.
What you need to collect
To connect IIFL, the broker login form in MyAlgoMate needs five details:
- API Key — issued when your ONT API access is set up
- API Secret — issued alongside it; keep it private
- Client ID — your IIFL client id, the one you sign in with
- Password — your IIFL account password
- TOTP key — the secret key you saved when enabling TOTP
One more thing is set on IIFL's side rather than entered here: your registered static IP.
ONT, not XTS — make sure you're on the right one
IIFL has offered more than one trading API, and this catches people out. ONT — also called the new IIFL Markets API — is the one MyAlgoMate connects to. Some older IIFL accounts are still set up on the earlier XTS API, which is a different system with different credentials. If yours is one of them, speak to your IIFL relationship manager and ask to be moved to ONT. If you are not sure which you are on, ask them before you start; it saves collecting the wrong credentials.
The ONT API is free
IIFL does not charge for API access — there is no subscription to buy and nothing to renew. You do need an active IIFL trading account with API access enabled on it. (IIFL's own brokerage for the trades you place is separate and depends on your plan.)
Please check with IIFL for latest terms.
Why TOTP is required
The ONT login asks for your IIFL credentials plus a second factor, which can be a one-time password or a TOTP code. Because MyAlgoMate signs in to your account for you, it has no way to receive an OTP — so you enable TOTP once and give MyAlgoMate the secret key behind it. Keep the authenticator app on your phone as well, so you can still sign in to IIFL yourself.
Static IP — required for API trading
Under the SEBI retail algo-trading rules in force since 1 April 2026, API order placement must originate from a registered static IP, so you need to register one with IIFL. Use your ISP's static IP if you run MyAlgoMate on your own machine, or your cloud machine's static IP if you run it on a server.
If you don't have a static IP, our Cloud Server for Algo Trading is a cloud machine built for algo trading and includes a static IP of your own that you can register.
Keep your credentials private
Your API Secret, password and TOTP key are the keys to your own trading account — never share them with anyone. MyAlgoMate provides the automation technology; you set the rules and stay in control of your own trades.
IIFL - ONT API — questions
Do I need to pay for the IIFL API?
No. IIFL does not charge for API access, so there is no subscription for using it. You do need an active IIFL trading account with API access enabled. IIFL's own brokerage for the trades you place is separate and depends on your plan.
What IIFL details does MyAlgoMate need?
Five: your API Key and API Secret from your ONT API setup, your Client ID, your account Password, and your TOTP key. You enter all five in the broker login form in MyAlgoMate. Separately, you register a static IP on IIFL's side.
What is the difference between IIFL's ONT and XTS APIs?
They are two different IIFL trading APIs. ONT — also called the new IIFL Markets API — is the one MyAlgoMate connects to. Some older IIFL accounts are still set up on the earlier XTS API, which uses different credentials. If your account is on XTS, speak to your IIFL relationship manager and ask to be shifted to ONT.
How do I know whether my IIFL account is on ONT or XTS?
Ask your IIFL relationship manager — they can tell you which API your account is set up for and move you to ONT if needed. It is worth checking before you start, so you don't collect credentials for the wrong API.
Why do I need TOTP for IIFL?
The ONT login asks for your IIFL credentials plus a second factor, which can be a one-time password or a TOTP code. MyAlgoMate signs in for you and cannot receive an OTP, so enable TOTP on your account and give MyAlgoMate the secret key behind the QR code. Keep the authenticator app on your phone for your own logins.
Do I need a static IP for IIFL API trading?
Yes — under the SEBI retail algo-trading rules in force since 1 April 2026, API order placement must come from a registered static IP, so register one with IIFL. Use your ISP's static IP if you run MyAlgoMate on your own machine, or your cloud machine's static IP if you run it on a server. If you don't have one, our Cloud Server for Algo Trading includes a static IP.
Automate on IIFL - ONT API, the compliant way
Connect in minutes, automate without code, and stay in control — with a team that answers.

