If GenAcsTok returns stat: "Not_Ok", the most common cause is that the computer you are using is not on the whitelist. Open api.ipify.org on that computer and make sure the number shown is the Primary IP in trade.infinn.in → top-right profile icon → Generate Key (API Key panel). Only then check the API key, secret and code.
-
- Have an INFINN accountThe API places orders for your own INFINN trading account. There is no separate developer account and no test account. Your login ID is your user ID.
-
- Find your internet address (IP)Open api.ipify.org on the computer or server that will run your program. Note the number shown. For safety, orders are accepted only from this one address.
-
- Generate your keysLog in to trade.infinn.in. Click the person icon (top-right), then Generate Key. Enter your IP and a redirect URL (
http://localhostis fine), then press Update. Copy the App Key and the Secret Code. Think of them as a username and a password for your program. Never share them. Step-by-step with screenshots.
- Generate your keysLog in to trade.infinn.in. Click the person icon (top-right), then Generate Key. Enter your IP and a redirect URL (
-
- Log in and get a tokenOpen this link in your browser, with your App Key in both places:
https://api.infinn.in/OAuthlogin/investor-entry-level/login?api_key=<API_KEY>&route_to=<ROUTE_TO> # route_to = sha256(USER_ID + "|" + SECRET_KEY). Example (IN001 / IN001_U / demo-secret-0000): https://api.infinn.in/OAuthlogin/investor-entry-level/login?api_key=IN001_U&route_to=f63c3a3a696392e444acc5b708e13b74a5eaf04d580758d3e11eebf8c748c43aAfter you log in, copy thecodefrom the address bar. Then use the checksum calculator on the GenAcsTok page to exchange it for an access token, your pass for the rest of the day.Two-factor loginThe INFINN login page asks for your user ID, password and TOTP (or OTP). After you sign in, it redirects with the one-timecodethat you exchange at GenAcsTok.
- Log in and get a tokenOpen this link in your browser, with your App Key in both places:
-
- Place a safe test orderBuy 1 share of a liquid stock at a limit price far below the market, so it will not fill, then cancel it straight away. Follow the safe-order guide.
Read the API & algo trading rules (static IP, 20 orders per second and 200 orders per minute, no sharing of keys).
Words you will see
API
A way for a program to press the same buttons you press in the app.
App Key / Secret Code
Your program's username and password.
Access token
A day pass. Your program sends it with every request.
IP address
Your computer's address on the internet.
Rate limit
How fast you may send orders: at most 20 per second and 200 per minute.