MyAlgoMate
// BROKER · UPSTOX

Algo trading with Upstox

Supported

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

// HOW WE CONNECT

Connecting Upstox

MyAlgoMate connects to Upstox through Upstox's official Developer API. You create your own app in the Upstox developer console, enable TOTP on your Upstox account, register a static IP as Upstox requires, and then enter your API Key, API Secret, Client ID, PIN and TOTP key into the broker login form in MyAlgoMate.

// WHAT YOU CAN AUTOMATE

Use Upstox with

Your Upstox account works with all 6 of these MyAlgoMate products — plus custom automation of your own strategy.

// SETUP

Setting up Upstox

Step 1 — Create your app in the Upstox developer console

The Upstox Developer API is free — both the trading and data APIs are free to use, so there is no subscription to buy. You only need an active Upstox account.
  1. Go to account.upstox.com/developer/apps and sign in with your Upstox account.
  2. Create a new app and fill in:
    • App Name — e.g. MyAlgoMate
    • Redirect URL — set it to https://www.upstox.com
  3. Copy your API Key and API Secret. Keep the API Secret confidential.
⚠️ The Redirect URL must match exactly the one registered on your app. A mismatch is the usual cause of an “Invalid Credentials” error when connecting.

Step 2 — Enable TOTP and save your TOTP key

Upstox lets you use TOTP instead of an SMS OTP for 2FA. MyAlgoMate signs in for you, so it cannot receive an SMS — you need TOTP enabled and its secret key.
  1. In the Upstox app, tap Account → Profile → My Account → Time-based OTP (TOTP), then Enable TOTP. You can also manage it at account.upstox.com/totp.
  2. Enter the 6-digit OTP sent to your registered mobile number and continue.
  3. 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.
  4. Scan the QR code into your authenticator app and enter the generated 6-digit code to finish enabling TOTP.

Step 3 — Register your static IP (mandatory)

Upstox requires that all API orders originate from a registered static IP (SEBI retail algo-trading rules, in force since 1 April 2026). It applies to the order APIs — placing, modifying and cancelling orders, GTT orders and exiting positions. Read-only calls such as holdings and positions are exempt.

  1. Register one Primary static IP and, optionally, one Secondary static IP for backup and failover.
  2. 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.
  3. ⚠️ A static IP can be linked to only one customer — it cannot be shared with, or registered by, anyone else. Use an IP that is yours alone.
  4. ⚠️ You can change a registered static IP only once per calendar week, and changing it signs out your existing API session, so you will need to reconnect in MyAlgoMate afterwards.

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, API Secret, Client ID, PIN and TOTP key, then save.

What you need to collect

To connect Upstox, the broker login form in MyAlgoMate needs five details:

  • API Key — from the app you created in the Upstox developer console
  • API Secret — from the same app; keep it confidential
  • Client ID — your own Upstox account id, the one you sign in to Upstox with
  • PIN — your Upstox 6-digit PIN
  • TOTP key — the secret key you saved when enabling TOTP

One more thing is set on Upstox's side rather than entered here: you must register a static IP.

API Key and Client ID are not the same thing

Upstox's API documentation also calls the API Key a client_id, which trips people up. In MyAlgoMate they are two separate fields: the API Key is the key issued to the app you created in the developer console, while the Client ID is your own Upstox account id — the one you sign in with. Put each in its own field.

The Upstox Developer API is free

Upstox does not charge for API access — both the trading and data APIs are free to use, so there is no subscription to buy and nothing to renew. You only need an active Upstox account. (Upstox's own brokerage charges for the trades you place are separate and depend on your plan.)

Please check with Upstox for latest terms.

Why TOTP is required

Upstox offers a choice between an SMS OTP and TOTP for 2FA at login. Because MyAlgoMate signs in to your Upstox account for you, it has no way to receive an SMS — so you need TOTP enabled on your account, and you enter its secret key in MyAlgoMate. Keep the authenticator app on your phone too, so you can still sign in to Upstox yourself.

Static IP — required by Upstox

Important — static-IP changes are limited: you can update your registered static IP only once in 7 days (once per week). To change it sooner, you must ask your broker to update it for you.

Since 1 April 2026, all Upstox API orders must originate from a registered static IP. Each user gets one Primary static IP plus an optional Secondary for backup and failover. The requirement applies to order operations — place, modify and cancel orders, GTT orders and exiting positions — while read-only calls such as holdings and positions are exempt. Two rules to keep in mind: a static IP can be linked to only one customer and cannot be shared, and you can change a registered IP only once per calendar week, which signs out your existing API session. Use your ISP's static IP if you run MyAlgoMate locally, 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.

Redirect URL

When you create the app, set the Redirect URL to https://www.upstox.com — and make sure it stays exactly that. Upstox checks the redirect URL on every login, so a mismatch is the usual reason a connection fails with an “Invalid Credentials” error.

Keep your credentials private

Your API Secret, PIN 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

Upstox — questions

Do I need to pay for the Upstox API?

No. Upstox's Developer API is free — both the trading and data APIs are free to use, so there is no subscription for API access. You only need an active Upstox account. Upstox's own brokerage charges for the trades you place are separate and depend on your plan.

What Upstox details does MyAlgoMate need?

Five: your API Key and API Secret from the app you create in the Upstox developer console, your Client ID, your PIN, and your TOTP key. You enter all five in the broker login form in MyAlgoMate. Separately, you must register a static IP on Upstox's side.

Why do I need TOTP for Upstox?

Upstox lets you choose between an SMS OTP and TOTP for 2FA. MyAlgoMate signs in to your Upstox account for you and cannot receive an SMS, so TOTP must be enabled and its secret key entered in MyAlgoMate. Keep the authenticator app on your phone as well, so you can still sign in to Upstox yourself.

Where do I find my Upstox TOTP key?

In the Upstox app, go to Account → Profile → My Account → Time-based OTP (TOTP) and choose Enable TOTP (you can also manage it at account.upstox.com/totp). Enter the OTP sent to your registered mobile, and 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. That secret key is what you enter in MyAlgoMate.

Do I need a static IP for Upstox API trading?

Yes — since 1 April 2026, all Upstox API orders must come from a registered static IP. You get one Primary IP and an optional Secondary for backup. It applies to order operations; read-only calls such as holdings and positions are exempt. A static IP can be linked to only one customer and cannot be shared, and you can change it only once per calendar week, which signs out your existing API session. 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.

What Redirect URL should I register on my Upstox app?

Set it to https://www.upstox.com

Why does my Upstox connection fail with “Invalid Credentials”?

That error is usually a Redirect URL mismatch. Upstox checks the redirect URL on every login, so the one registered on your app must match exactly the one being used. Open your app in the Upstox developer console and confirm the Redirect URL is https://www.upstox.com. It is also worth checking that your API Key and API Secret were copied without extra spaces.

Automate on Upstox, the compliant way

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