Algo trading with Sharekhan
Connect your Sharekhan account to MyAlgoMate and automate your execution — one-click orders, risk controls and fast exits, no coding required.
Connecting Sharekhan
MyAlgoMate connects to Sharekhan (Mirae Asset Sharekhan) through their official Trading API. You generate an API Key and Secure Key from the Trading API dashboard, set up TOTP on your Sharekhan account, register a static IP, and then enter your API Key, Secure Key, Client ID, Password and TOTP key into the broker login form in MyAlgoMate.
Use Sharekhan with
Your Sharekhan 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 Sharekhan
Step 1 — Generate your API Key and Secure Key
Sharekhan's Trading API is free — there are no additional charges and no subscription fee for using it. You only need an active Sharekhan trading account.
- Go to the Sharekhan Trading API dashboard and sign in with your Sharekhan credentials.
- Create a new app, give it a name (for example MyAlgoMate), and place the API key request.
- You receive two credentials — copy both:
- API Key — identifies your app
- Secure Key — Sharekhan's name for the API secret; keep it private
Step 2 — Set up TOTP on your Sharekhan account
MyAlgoMate signs in to Sharekhan for you, so it needs a TOTP key rather than a code you type in yourself.
- Log in to the Sharekhan website with your usual credentials.
- Open the profile menu and choose the option to set up TOTP. Sharekhan also publishes a step-by-step TOTP guide on their website if you need it.
- 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.). You get an on-screen confirmation once TOTP is enabled.
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 Sharekhan 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, Secure Key, Client ID, Password and TOTP key, then save.
What you need to collect
To connect Sharekhan, the broker login form in MyAlgoMate needs five details:
- API Key — from the app you create in the Trading API dashboard
- Secure Key — issued with it; this is Sharekhan's name for the API secret
- Client ID — your Sharekhan client id, the one you sign in with
- Password — your Sharekhan account password
- TOTP key — the secret key you saved when setting up TOTP
One more thing is set on Sharekhan's side rather than entered here: your registered static IP.
“Secure Key” is Sharekhan's name for the API secret
Most brokers call the second credential an API Secret. Sharekhan calls it a Secure Key — it is the same kind of thing, and it is what goes into MyAlgoMate's Secure Key field. If you have set up other brokers and are hunting for something labelled “API Secret” in the Sharekhan dashboard, this is it.
The Trading API is free
Sharekhan does not charge for the Trading API — there are no additional charges and no subscription fee for using it, so there is nothing to buy and nothing to renew. You only need an active Sharekhan trading account. (Sharekhan's own brokerage charges for the trades you place are separate.)
Why TOTP is required
Sharekhan protects account login with two-factor authentication, and MyAlgoMate signs in to your account for you — so it cannot receive a one-time code you would normally read off your phone. You set TOTP up once on the Sharekhan website and give MyAlgoMate the secret key behind it. Keep the authenticator app on your phone as well, so you can still sign in to Sharekhan 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 Sharekhan. 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 Secure Key, 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.
Sharekhan — questions
Do I need to pay for the Sharekhan Trading API?
No. Sharekhan's Trading API is free — there are no additional charges and no subscription fee for using it. You only need an active Sharekhan trading account. Sharekhan's own brokerage charges for the trades you place are separate.
What Sharekhan details does MyAlgoMate need?
Five: your API Key and Secure Key from the app you create in the Trading API dashboard, 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 Sharekhan's side.
What is the Secure Key — is it the same as an API Secret?
Yes. Most brokers call that second credential an API Secret; Sharekhan calls it a Secure Key. It is issued alongside your API Key when you create the app, and it goes into the Secure Key field in MyAlgoMate.
Where do I get my Sharekhan API Key and Secure Key?
Sign in to the Sharekhan Trading API dashboard, create a new app and place the API key request. You then receive the API Key and Secure Key, which are what you enter in MyAlgoMate.
Why do I need TOTP for Sharekhan, and where do I set it up?
Sharekhan uses two-factor authentication at login, and MyAlgoMate signs in for you, so it needs the TOTP secret key rather than a code you read off your phone. Set it up by logging in to the Sharekhan website and opening the profile menu, then choose the TOTP option. When the QR code appears, save the secret key it contains — that is what you enter in MyAlgoMate.
Do I need a static IP for Sharekhan 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 Sharekhan. 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 Sharekhan, the compliant way
Connect in minutes, automate without code, and stay in control — with a team that answers.

