You do not need to know any coding. Follow the boxes in order. Each one takes about a minute.
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).
- On the computer that will run your program, open api.ipify.org.
- You will see a number like
203.0.113.25. That is your IP. - 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
The API Key panel opens. Everything you need is in it. The numbers match the list next to the drawing.
- How to get here: trade.infinn.in → log in → top-right profile icon → Generate Key. The API Key panel opens.
- Client ID: your user ID (example
IN001). This is the user ID forroute_to. - Secret Code: your API secret. Click the eye to show it, or the copy icon. Keep it private.
- App Key: your API key (example
IN001_U). Use the whole value, including_U. - Display Name (required): any label, for example your name.
- 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 ashttps://yourdomain/also works. - Primary IP Address (required): this computer's public IP from api.ipify.org (Step 0).
- Backup IP Address: optional second address.
- Webhook URL: leave blank. INFINN does not offer webhooks; order updates come over the WebSocket.
- 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).
- 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.
- Tick the box only if you need more than 10 orders per second.
- Select Exchanges (a) appears. The options shown are MCX, NSE, NFO, BSE and BFO. Choose each exchange you will send these orders to.
- 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.
- Press Update . The update is complete only when every selected exchange has its algo ID.
Common mistake
| You see | Why | Fix |
|---|---|---|
| Update fails or does not complete after ticking the box | The 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.
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:
The yellow part is what you need. Copy everything after code=, up to the next & (or to the end if there is no &).
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.
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 see | What it usually means | What to do |
|---|---|---|
stat: Not_Ok from GenAcsTok | Your 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 right | The 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 code | Wrong 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 error | The 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. |