You do not need to know any coding. Follow the boxes in order. Each one takes about a minute.

Easiest way: no copy-paste at all

Download infinn_quick_login.py and its simple instructions. Set your Redirect URL to http://127.0.0.1:8899/callback once, then run it. It opens the login page and catches the code for you. The steps below explain the same thing by hand.

0 Check your IP and whitelist it

INFINN only accepts API calls from the computer you register. So first find this computer's public internet address (IP).

  1. On the computer that will run your program, open api.ipify.org.
  2. You will see a number like 203.0.113.25. That is your IP.
  3. In trade.infinn.in, click the top-right profile icon → Generate Key 1. The API Key panel opens (see the drawing in Step 1). Put that number in Primary IP Address 7 and press Update 11.

If your internet provider changes your IP, this step must be done again. Login will fail with Not_Ok until the IP matches.

1 Get your API key and secret

Exact path: trade.infinn.in → log in → top-right profile icon → Generate Key → API Key panel → fill Display Name, Redirect URL, Primary IP (from "what is my IP") → Update → copy App Key and Secret Code.

✉🔔👤
  • ◯IN001
  • 🚚Take a tour
  • ⌨Keyboard Shortcuts
  • ▦Apps
  • ⛶Full Screen
  • 💼Back Office
  • 🔗IPO
  • 🔑Generate Key 1
  • 👤Contact us
  • ↪Logout
Drawing of the profile menu (top-right person icon). Click Generate Key.

The API Key panel opens. Everything you need is in it. The numbers match the list next to the drawing.

Drawing of the panel with example values (not a real account). Your screen may look slightly different.
  1. How to get here: trade.infinn.in → log in → top-right profile icon → Generate Key. The API Key panel opens.
  2. Client ID: your user ID (example IN001). This is the user ID for route_to.
  3. Secret Code: your API secret. Click the eye to show it, or the copy icon. Keep it private.
  4. App Key: your API key (example IN001_U). Use the whole value, including _U.
  5. Display Name (required): any label, for example your name.
  6. Redirect URL (required): where INFINN sends your browser after login. It must exactly match what you use. For the quick-login file use http://127.0.0.1:8899/callback. If you copy the code by hand, your own site such as https://yourdomain/ also works.
  7. Primary IP Address (required): this computer's public IP from api.ipify.org (Step 0).
  8. Backup IP Address: optional second address.
  9. Webhook URL: leave blank. INFINN does not offer webhooks; order updates come over the WebSocket.
  10. Applicable for more than 10 orders per second: leave it unticked if you send 10 orders per second or fewer. Tick it only if you need more; then you must select exchanges and enter exchange-approved algo IDs (see Item 10 explained below).
  11. Update: press it to save. Nothing changes until you do.

Fill in Display Name 5, Redirect URL 6 and Primary IP Address 7, leave Webhook URL blank 9, then press Update 11. Copy the App Key 4 and Secret Code 3 for the next step.

Item 10: "Applicable for more than 10 orders per second"

Most people should leave this box unticked. If your program sends 10 orders per second or fewer, do not touch it.

Tick it only if you need more than 10 orders per second. Then you must also give the algo IDs that the exchange approved for you. Without them the update is not complete.

Drawing with example placeholders only (not real algo IDs). NSE and NFO are just an example choice.
  1. Tick the box only if you need more than 10 orders per second.
  2. Select Exchanges (a) appears. The options shown are MCX, NSE, NFO, BSE and BFO. Choose each exchange you will send these orders to.
  3. For every exchange you chose, a field Algo ID for <EXCHANGE> (b) appears, for example "Algo ID for NSE". Type the algo ID that this exchange approved for you.
  4. Press Update . The update is complete only when every selected exchange has its algo ID.

Common mistake

You seeWhyFix
Update fails or does not complete after ticking the boxThe box is ticked but the exchange-approved algo IDs are missing (or an exchange is selected with an empty Algo ID field)Fill "Algo ID for <EXCHANGE>" for every selected exchange. If you do not need more than 10 orders per second, untick the box and press Update

2 Open the login link

The login link has two parts: api_key (your API key) and route_to. route_to is not the API key. It is a fingerprint (SHA-256 hash) of your user ID in capitals, a |, and your API secret.

Type your details below and press the button. It builds your personal link.

Runs only in your browser. Nothing you type here is sent anywhere.

Click the link, then sign in on the INFINN page with your user ID, password and TOTP.

3 Copy the code from the address bar (be quick)

After you sign in, INFINN sends your browser to your Redirect URL. The page may look blank or show an error. That is fine. Look at the address bar:

http://localhost/?code=7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93&state=xyz

The yellow part is what you need. Copy everything after code=, up to the next & (or to the end if there is no &).

The code expires within seconds and works only once

Do this step straight away. If it fails, sign in again to get a new code. To avoid copy-paste completely, use the quick-login file.

Easier: paste the whole address here. The box finds the code, makes the checksum (SHA-256 of API key + secret + code) and gives you a ready command.

Runs only in your browser. Nothing you type here is sent anywhere.

4 You have an access token. What now?

If the reply has "stat":"Ok", copy the access_token. That is your key for the day.

  • Send it on every call as the header Authorization: Bearer <access_token>.
  • It works until about 4:00 AM IST the next morning. Then log in again.
  • Keep it private, like a password.
  • Next: make your first call (read your cash limits; it cannot trade).

If something goes wrong

What you seeWhat it usually meansWhat to do
stat: Not_Ok from GenAcsTokYour computer's IP is not whitelisted (most common).Do Step 0 again on this computer. Then try again.
Not_Ok even though the IP is rightThe code expired or was already used.Sign in again and run the command within a few seconds, or use the quick-login file.
Not_Ok with a correct IP and a fresh codeWrong API key or secret, or route_to built from the wrong values.Copy the key and secret again from the API Key panel. Type the user ID exactly (capitals are used automatically).
Login page shows an errorThe link is wrong.Build the link again in Step 2.
Quick-login says "No login code arrived"Redirect URL is not set to the callback.Set it to exactly http://127.0.0.1:8899/callback.
Esc
↑↓ navigate↵ openEsc close/ to search