MyAlgoMate
// BROKER · FIRSTOCK

Algo trading with Firstock

Supported

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

// HOW WE CONNECT

Connecting Firstock

MyAlgoMate connects to Firstock through the official Firstock Developer API. You generate an API Key and note your Vendor Code in the Firstock developer portal, enable TOTP on your Firstock account, whitelist a static IP as Firstock requires, and then enter your API Key, Vendor Code, Client ID, Password and TOTP key into the broker login form in MyAlgoMate.

// WHAT YOU CAN AUTOMATE

Use Firstock with

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

// SETUP

Setting up Firstock

Step 1 — Generate your API Key and Vendor Code

The Firstock Developer API is free — Firstock does not charge a subscription for API access. You only need an active Firstock trading account.
  • Log in to the Firstock developer portal (firstock.in/api/docs) with your Firstock credentials.
  • Follow the key-generation guide to generate your API Key and note your Vendor Code.
  • Note your Client ID — your Firstock login id, the one you sign in with.

Step 2 — Enable TOTP and copy your TOTP key

Firstock uses TOTP as the second factor. MyAlgoMate signs in for you, so it needs the TOTP secret key itself rather than a 6-digit code you type in.
  • Enable TOTP (2FA) on your Firstock 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 — Register your static IP (mandatory)

Firstock has implemented IP whitelisting in line with SEBI's security guidelines, mandatory from 1 April 2026 — API access is restricted to your registered static IP.

  • Register your static IP against your Firstock API access.
  • 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, Vendor Code, Client ID, Password and TOTP key, then save.

What you need to collect

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

  • API Key — generated in the Firstock developer portal
  • Vendor Code — shown alongside your API Key in the Firstock developer portal
  • Client ID — your Firstock login id, the one you sign in with
  • Password — your Firstock account password
  • TOTP key — the secret key you saved when enabling TOTP

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

The Firstock Developer API is free

Firstock does not charge for the Developer API — API access is free of cost, so there is no subscription to buy and nothing to renew. You only need an active Firstock trading account. (Firstock's own brokerage charges for the trades you place are separate.)

Please check with Firstock for latest terms.

Static IP — required by Firstock

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, SEBI's retail algo-trading rules require a registered static IP for API order placement — Firstock 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.

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

Firstock — questions

Do I need to pay for the Firstock API?

No. The Firstock Developer API is free of cost — there is no subscription for API access. You only need an active Firstock trading account. Firstock's own brokerage charges for the trades you place are separate.

What Firstock details does MyAlgoMate need?

Five: your API Key, your Vendor Code, your Client ID, your Password, and your TOTP key. You enter all five in the broker login form in MyAlgoMate. Separately, you must register a static IP on Firstock's side.

Where do I get my Firstock API Key and Vendor Code?

Log in to the Firstock developer portal (firstock.in/api/docs) and follow the key-generation guide — it generates your API Key and shows your Vendor Code.

Where do I find my Firstock TOTP key?

Enable TOTP (2FA) on your Firstock account. When the QR code appears, save the secret key it contains (use your authenticator app's manual-entry option if it isn't shown as text). That secret key is what you enter in MyAlgoMate.

Do I need a static IP for Firstock API trading?

Yes — Firstock has implemented IP whitelisting in line with SEBI's guidelines, mandatory from 1 April 2026, so API access is restricted to 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 one, our Cloud Server for Algo Trading includes a static IP.

Automate on Firstock, the compliant way

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