Algo trading with Alice Blue
Connect your Alice Blue account to MyAlgoMate and automate your execution — one-click orders, risk controls and fast exits, no coding required.
Connecting Alice Blue
MyAlgoMate connects to Alice Blue through the official ANT API. You create an app in the ANT dashboard to get your API Key and API Secret, enable TOTP on your Alice Blue account, whitelist a static IP as Alice Blue requires, and then enter your API Key, API Secret, Client ID, Password and TOTP key into the broker login form in MyAlgoMate.
Use Alice Blue with
Your Alice Blue account works with all 8 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
- ORB - Opening Range Breakout
- 5 EMA Strategy - Power of Stocks
- Custom strategy automation — your own logic, automated; you set the rules and stay in control.
Setting up Alice Blue
Step 1 — Create your app and copy your API Key and API Secret
The ANT API is free — Alice Blue does not charge a subscription for API access. You only need an active Alice Blue trading account.
- Log in to ant.aliceblueonline.com with your Alice Blue account.
- Go to Apps, then API Key, and create a new app:
- App Name — e.g. MyAlgoMate
- Redirect URL — set it to https://ant.aliceblueonline.com
- Copy your API Key (App ID) and API Secret (App Secret) — keep the API Secret confidential.
- Note your Client ID — your Alice Blue account id, the one you sign in with.
Step 2 — Enable TOTP and copy your TOTP key
MyAlgoMate signs in to your Alice Blue account for you, so it needs the TOTP secret key itself rather than a 6-digit code you type in.
- Enable TOTP (external 2FA) on your Alice Blue account.
- 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.) as well.
Step 3 — Whitelist your static IP (mandatory)
A registered static IP is required for placing orders through the API (SEBI retail algo-trading rules, in force since 1 April 2026). Alice Blue only accepts API orders from a whitelisted static IP.
- In the ANT dashboard, enter your static IP address, select the IP Type, and submit.
- 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 whitelist.
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 Alice Blue, the broker login form in MyAlgoMate needs five details:
- API Key — the App ID from the app you create in the ANT dashboard
- API Secret — the App Secret from the same app — keep it confidential
- Client ID — your Alice Blue account id, the one you sign in with
- Password — your Alice Blue account password
- TOTP key — the secret key you saved when enabling TOTP
One more thing is set on Alice Blue's side rather than entered here: your whitelisted static IP.
The ANT API is free
Alice Blue does not charge for the ANT API — API access is free of cost, so there is no subscription to buy and nothing to renew. You only need an active Alice Blue trading account. (Alice Blue's own brokerage charges for the trades you place are separate.)
Please check with Alice Blue for latest terms.
Static IP — required by Alice Blue
Since 1 April 2026, SEBI's retail algo-trading rules require a registered static IP for API order placement — Alice Blue only accepts API orders that originate from your registered static IP. 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 you can whitelist.
Redirect URL
When you create the app, set the Redirect URL to https://ant.aliceblueonline.com
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.
Alice Blue — questions
Do I need to pay for the Alice Blue API?
No. Alice Blue's ANT API is free of cost — there is no subscription for API access. You only need an active Alice Blue trading account. Alice Blue's own brokerage charges for the trades you place are separate.
What Alice Blue details does MyAlgoMate need?
Five: your API Key and API Secret from the app you create in the ANT dashboard, your Client ID, your Password, and your TOTP key. You enter all five in the broker login form in MyAlgoMate. Separately, you must whitelist a static IP on Alice Blue's side.
Where do I get my Alice Blue API Key and Secret?
Log in to ant.aliceblueonline.com, go to Apps → API Key and create a new app (App Name + Redirect URL https://ant.aliceblueonline.com). Your API Key (App ID) and API Secret (App Secret) are shown once the app is created — copy both.
What Redirect URL should I set for my Alice Blue app?
Set it to https://ant.aliceblueonline.com
Do I need a static IP for Alice Blue API trading?
Yes — since 1 April 2026, Alice Blue only accepts API orders from a whitelisted static IP. Add it in the ANT dashboard (IP address + IP Type). 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 Alice Blue, the compliant way
Connect in minutes, automate without code, and stay in control — with a team that answers.

