MyAlgoMate
// BROKER · MSTOCKS - MIRAE ASSET CAPITAL

Algo trading with MStocks - Mirae Asset Capital

Supported

Connect your MStocks - Mirae Asset Capital account to MyAlgoMate and automate your execution — one-click orders, risk controls and fast exits, no coding required.

// HOW WE CONNECT

Connecting MStocks - Mirae Asset Capital

MyAlgoMate connects to MStocks (Mirae Asset Capital) through their official Trading API. You generate an API key from the m.Stock trading-API page, enable TOTP on your m.Stock account, register a static IP, and then enter your API Key, Client ID, Password and TOTP key into the broker login form in MyAlgoMate.

// WHAT YOU CAN AUTOMATE

Use MStocks - Mirae Asset Capital with

Your MStocks - Mirae Asset Capital account works with all 6 of these MyAlgoMate products — plus custom automation of your own strategy.

// SETUP

Setting up MStocks - Mirae Asset Capital

Step 1 — Generate your API key

The m.Stock Trading API is free — ₹0 one-time charges, ₹0 trading-API charges and ₹0 data-API charges, with no subscription fee. You only need an active m.Stock account.
  1. Go to the m.Stock trading-API page and sign in, or open an m.Stock account first if you don't have one.
  2. Generate your API key and copy it. Keep it private — it is what identifies your access.
  3. Your API key is valid for a year, so set a reminder to regenerate it before it expires and your connection stops working.

Step 2 — Enable TOTP on your m.Stock account

This step matters more at MStocks than at most brokers. If TOTP is not enabled, every API login sends a one-time password to your registered mobile number — which MyAlgoMate cannot receive. With TOTP enabled, that SMS OTP is not triggered at all and the connection runs on its own.
  1. In your m.Stock account settings, enable TOTP / two-factor authentication.
  2. 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.
  3. Scan the QR code into your authenticator app (Google Authenticator, Authy, etc.) so you can still sign in to m.Stock 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 m.Stock for API trading.

  1. 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

  1. Open the broker login form in MyAlgoMate and enter your API Key, Client ID, Password and TOTP key, then save.

What you need to collect

To connect MStocks, the broker login form in MyAlgoMate needs four details:

  • API Key — generated on the m.Stock trading-API page
  • Client ID — your m.Stock client id, the one you sign in with
  • Password — your m.Stock account password
  • TOTP key — the secret key you saved when enabling TOTP

One more thing is set on m.Stock's side rather than entered here: your registered static IP.

Enable TOTP, or you'll get an SMS on every login

MStocks sends a one-time password to your registered mobile number when an API login happens — unless TOTP is enabled on the account, in which case that SMS is not triggered at all. MyAlgoMate signs in for you and has no way to read an SMS, so enabling TOTP is what makes the connection work unattended. Set it up once, give MyAlgoMate the secret key, and keep the authenticator app on your phone for your own logins.

The Trading API is free

m.Stock does not charge for the Trading API — ₹0 one-time charges, ₹0 trading-API charges and ₹0 data-API charges, with no subscription fee and no hidden charges. You only need an active m.Stock account. (m.Stock's own brokerage for the trades you place is separate and depends on your plan.)

Your API key expires after a year

MStocks issues the API key with a one-year validity. It is easy to forget, so set yourself a reminder — when the key expires the connection stops working, and you simply generate a fresh key on the m.Stock trading-API page and update it in MyAlgoMate.

No Redirect URL needed

If you have connected other brokers before, you may be looking for a Redirect URL or callback field. MStocks does not use one — the connection is made with your API key and your account login plus TOTP, so there is nothing of that kind to configure here.

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 m.Stock. 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 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.

// FAQ

MStocks - Mirae Asset Capital — questions

Do I need to pay for the MStocks Trading API?

No. m.Stock's Trading API is free — ₹0 one-time charges, ₹0 trading-API charges and ₹0 data-API charges, with no subscription fee. You only need an active m.Stock account. m.Stock's own brokerage for the trades you place is separate and depends on your plan.

What MStocks details does MyAlgoMate need?

Four: your API Key from the m.Stock trading-API page, your Client ID, your account Password, and your TOTP key. You enter all four in the broker login form in MyAlgoMate. Separately, you register a static IP on m.Stock's side.

Why do I need to enable TOTP for MStocks?

Because without it MStocks sends a one-time password to your registered mobile number on every API login, and MyAlgoMate has no way to read an SMS. With TOTP enabled that SMS is not triggered at all, so the connection runs unattended. Enable TOTP on your m.Stock account and give MyAlgoMate the secret key behind the QR code.

Where do I get my MStocks API key?

Generate it on the m.Stock trading-API page (mstock.com/trading-api) after signing in to your m.Stock account. Copy the key and enter it in MyAlgoMate along with your Client ID, Password and TOTP key.

How long is my MStocks API key valid?

The API key is issued with a one-year validity. When it expires the connection stops working, so set a reminder — generate a fresh key on the m.Stock trading-API page and update it in MyAlgoMate.

Do I need a static IP for MStocks 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 m.Stock. 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 MStocks - Mirae Asset Capital, the compliant way

Connect in minutes, automate without code, and stay in control — with a team that answers.