Sections

General Beginner

What the API is, what it costs, and where to get help.

Questions in this section (5)

Q1 What is a Trading API? #

A Trading API allows traders to write their own programs to trade, or to connect with third-party trading platforms. It is designed for traders who wish to run algorithmic models on their own systems, receive real-time pricing and place trades programmatically.

Trading APIs help traders build customised trading applications: execute orders in real time, manage portfolios, stream live market data and much more.

Read more: Stream live prices

Q2 What are the benefits of using Infinn Developer APIs? #

  • Customise the trading platform according to your own needs.
  • Access market data that lets you trade at your convenience.
  • Build your own trading platform.
  • Automate your trades with custom entry and exit conditions.
  • Fast, real-time order execution.
  • Market snapshot and live market feed.

Read more: Stream live prices

Q3 Are there any charges for using Infinn Developer APIs? #

No. Infinn Developer APIs are available free of charge. An active trading account with Infinn is required (see Q5).

Read more: API & algo rules

Q4 Where can I contact API support? #

You can email all your API queries to [email protected]. Detailed documentation is also available at docs.infinn.in.

A5 Is there a test or sandbox server? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

Yes — Sandbox / UAT is available. REST https://uat.infinn.in/NorenWClientAPI, WebSocket wss://uat.infinn.in/NorenWSTP/. Practice only. Production remains https://api.infinn.in / wss://api.infinn.in/NorenWSTP/. The playground defaults to Sandbox / UAT.

  • Each integrator gets their own UAT api_key. The UAT secret must stay on your backend — never in browser or mobile client code.
  • User ID must be UPPERCASE. Paste the full redirect URL that contains code=. The token expires around 04:00 IST — log in again each day.
  • On production, every order is still real. For a safe live dry-run, place a 1-share limit far from market, then cancel (see Q9 for paper trading).

Read more: Sandbox / UAT · Place your first order safely

Back to top ↑

Getting Started Beginner

Account, keys, login and libraries. Read this before you write any code.

Questions in this section (15)

Q5 How do I get started with the Infinn Developer API? #

You need an active trading account with Infinn to generate your Secret Code and App Key. Once generated, you can begin integrating the trading APIs using these keys. Detailed documentation for each API is available here: https://docs.infinn.in/getting-started/

Read more: Create your credentials

Q6 How long does it take to activate API access? #

API access is activated instantly. Once you have subscribed to the API, you can start using it right away.

Read more: Stream live prices

Q7 Which programming libraries does Infinn provide? #

Infinn currently offers libraries for:

  • Python
  • .NET
  • Node.js
  • JavaScript
  • PHP
  • Java

Read more: SDKs & libraries

Q8 How do I install and update the Python library? #

To install the library, run:

pip install NorenRestApiOAuth

To upgrade pip itself:

python -m pip install --upgrade pip

After every library update, run the command below. You do not need to uninstall the previous version.

pip install -r requirements.txt

Read more: Log in with OAuth · SDKs & libraries

Q9 Does Infinn offer paper trading for testing and development? #

Yes. Infinn provides a paper trading facility. To request access, please contact [email protected].

Q10 Will Infinn help me code my trading strategies based on my own logic? #

Infinn does not build trading strategies in-house. However, we have partnered with independent developers who can code and automate your strategy based on your specific logic and requirements.
To get started, please write to us at [email protected] with a brief description of your strategy. Our team will connect you with a suitable developer from our partner network.
Note: Development charges and timelines are decided directly between you and the developer. Infinn does not guarantee trading performance or returns from any strategy.

Read more: API & algo rules

Q11 Does Infinn provide cURL-based code? #

Yes. The Infinn REST API backend supports cURL-based requests.

A1 I logged in, but the token step fails. Am I copying the redirect URL correctly? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

After you sign in, INFINN sends your browser to your Redirect URL with the one-time code at the end, for example http://localhost/?code=7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93&state=xyz. The page itself may be blank or show an error. That is normal; only the address bar matters.

  • Copy only the part after code=, up to the next & (or to the end). Or paste the whole address into the helper on the Login in 5 minutes page.
  • Do it straight away. The code expires within seconds and works only once. If it fails, sign in again for a new code.
  • Paste the raw address. Do not URL-decode it (for example %3D must not become =).
  • The Redirect URL in your script must match the one saved in the API Key panel exactly, including https:// and the path.
  • Re-copy the App Key and Secret Code if they picked up extra spaces.

For no copy-paste at all, set the Redirect URL to http://127.0.0.1:8899/callback and use the quick-login file.

Read more: Login in 5 minutes · Your first trade in 30 minutes

A4 What do I send as uid and actid? A call rejects my user ID. #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

uid is your INFINN login ID, the same Client ID shown at the top of the API Key panel, in capitals (for example IN001). For an individual account actid is the same value.
If a call rejects your user ID or account ID, check these first:

  • Use the exact uid that GenAcsTok returns after login (it is returned in capitals). Do not use a nickname, an internal label or the App Key (IN001_U).
  • The uid must belong to the account that the token was created for. A token from one login cannot be used with another user's ID.
  • Send both uid and actid where the endpoint page asks for them. A missing one gives Invalid Input : Missing uid or actid ....
  • Call User Details once after login: if it returns stat: "Ok" with your uid and actid, use those values everywhere, including the WebSocket connect message.

Read more: User Details · Error reference

A6 What goes in api_key and route_to in the login URL, and how is the checksum made? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

The login URL has two values: https://api.infinn.in/OAuthlogin/investor-entry-level/login?api_key=<API_KEY>&route_to=<ROUTE_TO>

  • api_key is your App Key, including the _U at the end (for example IN001_U).
  • route_to is not the App Key. It is the SHA-256 hash (lower-case hex) of your user ID in capitals, a | character, and your Secret Code: sha256(USER_ID + "|" + SECRET_KEY).

After login you send the one-time code to GenAcsTok together with a checksum. This is a different hash: SHA-256 of app_key + secret_key + code, joined with nothing in between (no spaces, no |, no newline), as lower-case hex.

  • In a shell, use printf '%s', not echo: echo adds a newline and changes the hash.
  • The GenAcsTok reference page has a calculator that builds the checksum in your browser.

Read more: Authentication · Generate Access Token

A8 Every call returns HTTP 401 with an empty body. How do I check my static IP? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

An empty 401 means either the token is bad or the computer's public IP is not the one registered for your API key. The response cannot tell you which, so check the IP first:

  • On the computer that runs your program, run curl -s https://api.ipify.org (or open api.ipify.org).
  • It must match the Primary IP Address (or the Backup IP Address) in trade.infinn.in → person icon (top right) → Generate Key → API Key panel. Enter a plain IPv4 address: no port, no /32, no spaces. Press Update to save.
  • Home and mobile connections often change their IP. A small cloud server with a fixed IP, or a static IP from your provider, avoids this.
  • Only after the IP matches, check the Authorization: Bearer header (Q44) and get a fresh token. If a fresh token also gets 401, stop re-logging in and re-check the IP.

Read more: Create your credentials · Debugging checklist

A9 Client ID, App Key, Secret Code, login code, access token: which is which? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

ValueWhere you find itUsed for
Client ID (user ID)Top row of the API Key panel; the ID you log in withuid (and actid on an individual account) in request bodies
App KeyAPI Key panel; your Client ID with _U added, for example IN001_Uapi_key in the login URL; first part of the checksum
Secret CodeAPI Key panel, masked (press the eye icon)route_to hash and checksum only; never sent on its own
Login code?code= in the address bar after login; 36 characters with dashesSent once to GenAcsTok
Access tokenGenAcsTok response; 64 hex characters, no dashesAuthorization: Bearer header on every other call
  • Keep the Secret Code and the access token out of source files; use environment variables or a secrets manager.
  • Generating a new key pair stops the old pair from working.

Read more: Create your credentials

A17 The login page asks for TOTP. How do I set it up, and can my script log in by itself? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

TOTP is a 6-digit code from an authenticator app that changes every 30 seconds. Turn it on in trade.infinn.in (person icon → enable TOTP), scan the QR code with the app, and enter the current code whenever the login page asks.

  • Do not share or screenshot the QR code.
  • The OAuth login is designed for a person to sign in once per session. Do not store your password or TOTP secret in code. For an unattended login, ask support what INFINN permits (Q4).

Read more: TOTP setup · Log in with OAuth

Back to top ↑

A20 How do I check my TOTP against this device clock?

Added for clarity Written for v4.8.

Use the in-browser TOTP checker. It implements RFC 6238 (SHA-1, 30 s, 6 digits). Your Base32 secret stays in page memory only — never stored, never sent. Closing or hiding the tab clears it. INFINN staff will never ask for your authenticator secret.

  • If the header clock check shows drift greater than 2s, fix this device clock (IST) before blaming the login page.

Read more: TOTP checker · TOTP setup

A21 How do I exchange a UAT OAuth code for an access token?

Added for clarity Written for v4.8.

UAT is test only, not live — no real money or orders. Same shape as production, against https://uat.infinn.in:

  1. Open the UAT OAuth login with your UAT api_key (and the same value in route_to).
  2. After login, paste the full browser URL that contains code=.
  3. On your backend, checksum = SHA-256(api_key + secret + code) (lower-case hex, nothing between the three parts).
  4. POST /NorenWClientAPI/GenAcsTok with body jData={"code":"…","checksum":"…"} and Content-Type: text/plain.
  5. Use the uid from the reply in UPPERCASE for later calls. Never put the UAT secret in docs, git, or client-side code.

Stuck? See the common mistakes box or check your code on the TOTP checker.

Read more: Sandbox / UAT · Generate Access Token

UAT / Sandbox (test) Beginner

UAT is a test system, not live. No real money, no real orders. Simple answers for first-time users.

U1 What is UAT, and how is it different from Live?

UAT is a practice copy of INFINN. You use it to try the API before going live. The client-facing name is Sandbox (UAT / Test — NOT live).

The steps are the same on both. Only the address and the keys change.

Read more: Sandbox / UAT

U2 Does UAT use real money or place real orders?

No. UAT is test only. No real money is used and no order reaches the exchange.

U3 How do I get UAT access, a UAT key and secret?

Write to [email protected] and ask for UAT API access. You will get your own UAT App Key and Secret. Keep the secret private. Your PC public IP must be whitelisted on the UAT app.

U4 How do I log in to UAT? (4 short steps)

  1. Open the UAT login URL on uat.infinn.in (/OAuthlogin/investor-entry-level/login) with api_key and route_to both set to your App Key.
  2. Log in with User ID in CAPITALS, password and TOTP.
  3. Copy the FULL browser URL (it must contain code=).
  4. On your server: checksum = SHA-256(api_key + secret + code), call GenAcsTok, then use the returned uid (UPPERCASE) for later calls.

Read more: Sandbox / UAT · A21

U5 My TOTP is shown as wrong. What do I do?

TOTP changes every 30 seconds and depends on your clock. Set your phone and computer clock to automatic time (IST), wait for a fresh code and type it quickly. Compare it on the TOTP checker.

U6 It says the code expired or the checksum is wrong.

  • Code expired / already used: the login code works only once and only for a short time. Log in again and use the new code straight away.
  • Checksum wrong: join api_key + secret + code with nothing in between and use lower-case SHA-256. Use the UAT secret from an env var. Paste the full URL so the code is complete.

U7 It says my IP is not allowed or the redirect URL is not set.

Your UAT app must have your computer's public IP whitelisted and a Redirect URL saved. Find your IP with curl -s https://api.ipify.org, then ask [email protected] to add the IP and Redirect URL. The Redirect URL in your script must match exactly.

U8 How do I move from UAT to Live?

  1. Get your live App Key and Secret from trade.infinn.in (API Key panel).
  2. Change the host from uat.infinn.in to api.infinn.in (REST and WebSocket).
  3. Use your live key, secret, Redirect URL and registered IP.
  4. Start small: first a read call, then one small order.

On Live, orders use real money. Do not mix UAT and Live keys or hosts.

U9 My User ID is rejected after login. Why?

The User ID must be UPPERCASE. A lowercase ID often works at the login page but is rejected on later API calls. Use the uid returned by GenAcsTok. See also A4.

U10 How long does the UAT token last?

The OAuth code is one-time and short-lived. The access token expires daily around 04:00 IST. Log in again each day. Never share the token or the secret.

Read more: Sandbox / UAT · Token renewal

Python SDK Beginner

Package infinn — Sandbox (UAT / Test — NOT live) by default.

S1 Is there an official Python SDK?

Yes — package name infinn (from infinn import Infinn). See SDKs → Python. Install the wheel from downloads/sdk/. Not on PyPI yet.

S2 Does the SDK use Sandbox or Live by default?

Sandbox (UAT / Test — NOT live). Default env="sandbox" (alias "uat"). Live needs env="live" and shows a warning. Hosts stay on uat.infinn.in for Sandbox.

S3 Can I paste the full redirect URL after login?

Yes. generate_session() accepts the full browser URL or just the code= value. User ID is uppercased automatically.

S4 Coming from Zerodha Kite — will my code work?

Method names are familiar (place_order, orders, positions, ltp), but this is an original INFINN library, not a Kite fork. See the mapping table on the Python SDK page.

S5 Why does limits() time out on Sandbox?

On Sandbox (uat.infinn.in), the Limits endpoint sometimes hangs (read timeout). This is a Sandbox/UAT server quirk observed 5 Nov 2026 — UserDetails, SearchScrip, GetQuotes and the WebSocket ticker still work. The SDK applies a request timeout so your program does not wait forever. Retry later or skip Limits while testing on Sandbox.

Read more: Python SDK

Examples and Strategy Builder Beginner

Ready-made example programs in these docs: the Strategy Builder, the Straddle / Strangle example, and Python SDK 0.1.2.

Questions in this section (10)

E1 What is the Strategy Builder? #

The Strategy Builder is a page of simple questions. You pick an index, pick Straddle or Strangle, and set your stop loss and target. The page then gives you a ready Python program. Only the settings at the top change. The rest is the same tested Straddle / Strangle example. Everything runs in your browser. Nothing is sent to a server.

Read more: Strategy Builder · Build your program

E2 What is the Straddle / Strangle example? #

It is a tested Python program that can place a straddle or a strangle, then manage a stop loss, a target, a trailing stop, and other exits. The Strategy Builder fills in this same program. Read the code and check it yourself before you run it.

Read more: Example: Straddle / Strangle · Download the program

E3 Which indexes and commodities can I use? #

You can use NIFTY, BANKNIFTY, SENSEX, CRUDEOIL and CRUDEOILM. There is no GOLD in this program. Crude oil trades on MCX. On Sandbox (UAT / Test — NOT live), crude may have no prices, so test the full flow with NIFTY, BANKNIFTY or SENSEX first.

Read more: Strategy Builder · MCX notes on the example page

E4 How is the expiry date picked? #

The program picks the current (nearest) expiry for you. You do not have to type a date. “Next” expiry is only under More options, if you need it. On expiry day, once the session is nearly over, the program moves to the next expiry — about 15 minutes before the close (15:15 IST for indexes; 23:15 IST for MCX, or 23:40 IST when the US is on daylight time).

Read more: Strategy Builder — Build your program · Example: Straddle / Strangle

E5 Can I set a stop loss, a target, and a trailing stop? #

Yes. A stop loss is required. You can set a stop and a target in percent, points, rupees, or (for options) percent of premium. You can also set a trailing stop, a profit lock, re-entry, and a daily max profit or daily max loss. A stop loss always wins over a target on the same price update.

Read more: Strategy Builder — What you can set · Example — Exits

E6 Does this start on Sandbox? How do I go live? #

Yes. The program starts on Sandbox (UAT / Test — NOT live) and does a dry run, so no real orders are sent. To send orders on Sandbox, you use --place-orders. Live trading needs ENV = "live", the --confirm-live flag, and typing I UNDERSTAND. The Strategy Builder never turns on --confirm-live for you.

Read more: Strategy Builder — Safety · Example — Going live · Sandbox / UAT

E7 Is this investment advice? Who is responsible? #

No. This is sample code for learning only. It is not advice, and it is not a recommendation to trade. The code can have bugs. Read it and check it yourself. Test first on Sandbox (UAT / Test — NOT live). You are fully responsible for any live trade and for any loss. Markets are risky. INFINN (HKKR Finserv Pvt Ltd) is not responsible for losses from using this code. On the Strategy Builder, you must tick I have read this before you can copy or download.

If you use a ready-made strategy on a live account, the exchange may need to approve it first.

Read more: Strategy Builder — Disclaimer · SEBI retail algo rules

E9 Is the SDK on PyPI? How do I install it? #

Not yet. The short command pip install infinn is coming soon. For now, download the wheel from this documentation and install it with pip. See also S1.

Read more: Python SDK — Install · downloads/sdk/

Back to top ↑

Segments, Orders and Limits Beginner

What you can trade, the codes to send with an order, and how fast you may send orders.

Questions in this section (10)

Q12 Which market segments are supported by the APIs? #

Infinn APIs are available for the following segments, including options trading:

  • Equity
  • Equity Derivatives
  • Currency
  • Commodities

Q13 Can I place, modify and cancel orders through the APIs? #

Yes. You can place, modify and cancel orders through the Infinn APIs.

Read more: Modify Order · Cancel Order

Q14 Are Bracket and Cover orders available? #

Yes. The APIs allow you to place, modify and cancel both Bracket and Cover orders.

Read more: Modify Order · Cancel Order

Q15 What order and product types are available, and which codes should I pass? #

Pass the product-type code (prd) in your order request. The product codes are:

Product TypeCode
Intraday (MIS)I
Delivery (CNC)C
Margin / Carry Forward (NRML)M
Bracket Order (BO)B
Cover Order (CO)H

AMO is not a product code: send the amo flag as "Yes" on a Place Order request when you want an after-market order (or omit the field). GTT is a separate order capability, not a prd value — see Q50.

Read more: Place Order · Margin, MTM & P&L · GTT orders

Q16 How can I place a basket order? #

Place each order through the order placement API and group them together using the Remarks field.

Q17 What are the order limits in the API? #

The Infinn API supports up to 20 orders per second and 200 orders per minute per service instance. Both limits apply at the same time. To avoid order rejections, third-party developers must not exceed these limits.

Read more: Rate limits · Margin, MTM & P&L

Q18 How can I check whether my order has been executed, and view open orders? #

Call the Order Book API to check the status of your orders. The order status will be one of the following:
COMPLETE, REJECTED, CANCELED, OPEN
Prices are always entered in rupees (for example 100, or 100.50 where paise apply). For further details, refer to the Python API documentation.

Read more: Cancel Order · The order lifecycle · SDKs & libraries

A10 What do the codes in an order mean (prd, prctyp, ret)? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

Every order carries three code fields. The product codes are listed in Q15; the most common are below.

FieldCodeMeaning
prd (product)CDelivery (CNC)
prdIIntraday (MIS); squared off the same day
prdMMargin / carry forward (NRML)
prdHCover order: entry plus a compulsory stop-loss
prdBBracket order: entry plus stop-loss plus target
prctyp (price type)LMTLimit: your price or better
prctypMKTMarket: send prc as "0"
prctypSL-LMTStop-loss limit: needs trgprc and prc
prctypSL-MKTStop-loss market: needs trgprc
ret (validity)DAYValid for the rest of today
retIOCImmediate or cancel
retEOSEnd of session (BSE and BFO)
  • While learning, use LMT with DAY.
  • No ret value keeps an order alive after today. For that, use a GTT order (Q50).
  • Your account may allow fewer exchanges, products and price types. User Details returns them in exarr, prarr and orarr.

Read more: Products & order types · Place Order

A11 Which order statuses can I modify or cancel? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

Only orders in status OPEN or TRIGGER_PENDING (a stop-loss waiting for its trigger) can be modified or cancelled. COMPLETE, REJECTED and CANCELED are final. Q18 lists the main statuses; a new order can also show PENDING for a moment before the exchange accepts it.

  • Modifying or cancelling a finished order returns Rejected : ORA:Order not found. Check the status with Single Order Status first.
  • Compare statuses without caring about capital letters: some responses send Open instead of OPEN.
  • To close a Cover (H) or Bracket (B) order, use Exit Cover / Bracket Order, not Cancel Order. Cancel Order would cancel only one leg and leave the others live.

Read more: The order lifecycle · Exit Cover / Bracket Order

A12 I get HTTP 429. What should I do, and what is the "more than 10 orders per second" box? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

HTTP 429 with an empty body means you sent too many requests. Wait and retry with back-off (1 s, 2 s, 4 s). The limits are in Q17.

  • Put one rate limiter in front of all order calls. All programs and manual testing on the same login share the limit.
  • Use the WebSocket for prices and order updates instead of polling, and download the symbol master once a day instead of searching repeatedly.
  • In the API Key panel, leave "Applicable for more than 10 orders per second" unticked if you send 10 orders per second or fewer. To go above that, tick it, select the exchanges and enter the exchange-approved algo ID for each one; Update does not complete without them.

Read more: Rate limits · Create your credentials

Back to top ↑

Market Data and WebSocket Intermediate

Live prices and order updates over the WebSocket, plus historical candles and option chains.

Questions in this section (11)

Q23 How do I subscribe to the NIFTY / BANKNIFTY index or futures feed? #

First, search for the token of the instrument (for example NIFTY, BANKNIFTY or a BANKNIFTY futures symbol) using the searchscrip method. Then use the token and exchange to subscribe to the data. Examples are available in the WebSocket subscribe section of the Infinn Python GitHub page.

Read more: WebSocket: connect & authenticate · Stream live prices · Instruments & the symbol master

Q25 Are Open Interest, Market Depth and Option Greeks available? #

Yes. Open Interest, Market Depth and Option Greeks are all available through the Infinn APIs.

Read more: Stream live prices

Q26 What historical data is available, and how can I fetch it? #

Two types of historical data are available:
get_time_price_series: time-based (intraday) candle data
get_daily_price_series: daily price data
Candle data is provided in OHLC format (Open, High, Low, Close), including 5-minute candles. Technical indicators such as RSI and ADI are not provided by the API and need to be calculated on your side.

Read more: Fetch historical data

Q27 How do I get the option chain? #

Use the following call:

api.get_option_chain("NFO", "NIFTY14JUL22P16000", 16000, 5)

Q28 How can I get the latest VWAP (Volume Weighted Average Price)? #

Use the sample code below to fetch the latest VWAP:

from api_helper import ApiPy
import yaml
import datetime

with open('cred.yml') as f:
    cred = yaml.load(f, Loader=yaml.FullLoader)

api = ApiPy()
ret = api.login(userid=cred['user'], password=cred['pwd'],
                twoFA=cred['factor2'], vendor_code=cred['vc'],
                api_secret=cred['apikey'], imei=cred['imei'])

lastBusDay = datetime.datetime.today()
lastBusDay = lastBusDay.replace(hour=0, minute=0, second=0,
                                microsecond=0, day=8, month=4)

sStrike = 'BANKNIFTY21APR22P37500'
OptToken = api.searchscrip(exchange="NFO", searchtext=sStrike)
sToken = str(OptToken['values'][0]['token'])

ret = api.get_time_price_series(exchange='NFO', token=sToken,
                                starttime=lastBusDay.timestamp(), interval=1)
print('Strike: ' + sStrike)
print('LTP: ' + ret[0]['intc'])
print('VWAP: ' + ret[0]['intvwap'])

ret1 = api.get_quotes('NFO', sToken)
print('VWAP: ' + ret1['ap'])

Read more: Create your credentials · Stream live prices · Instruments & the symbol master

A13 My WebSocket connects but I get no prices, or it stops after a while. What should I check? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

  • Connect to wss://api.infinn.in/NorenWSTP/, then send the connect message {"t":"a","uid":"IN001","actid":"IN001","source":"API","accesstoken":"<access_token>"}.
  • Wait for the ak reply before you subscribe. The socket opens even with a bad token; success is s = OK (compare without caring about capitals). NOT_OK followed by close code 1008 means the token or IP was rejected: do not keep reconnecting, fix the login first (A2, A8).
  • Send a heartbeat {"t":"h"} about every 30 seconds. If no hk reply comes back within a few seconds, treat the connection as dead.
  • The first message for each instrument is a full snapshot; later messages carry only the changed fields. Merge them, do not replace.
  • After every reconnect: subscribe again, and re-read the order book and positions over REST. Nothing that happened while you were disconnected is sent again.
  • Feeds available on the stream: touchline, market depth and LTP (you subscribe), plus order updates, position updates, market status and admin messages.

Read more: WebSocket: connect & authenticate · Heartbeat · Stream live prices

Back to top ↑

Trading Symbols Intermediate

How trading symbols are written and where tokens come from.

Questions in this section (2)

Q29 What are the naming conventions for trading symbols in the API? #

Trading symbols follow the formats below. Dates are written as DDMMMYY (for example 17FEB22); use P for Put and C for Call options.

InstrumentFormatExample
Equity SpotInstrument Name + -EQRELIANCE-EQ
Equity FuturesName + Date + Month + Year + FBAJFINANCE30JUN22F
Equity OptionsName + Date + Month + Year + P/C + StrikeDELTACORP28JUL22C110
Index Futures (NIFTY, BANKNIFTY, FINNIFTY)Name + Date + Month + Year + FBANKNIFTY25AUG22F
Index Options (NIFTY, BANKNIFTY, FINNIFTY)Name + Date + Month + Year + P/C + StrikeBANKNIFTY17FEB22P38600
Commodity FuturesName + Date + Month + YearALUMINIUM29JUL22
Commodity OptionsName + Date + Month + Year + P/C + StrikeCRUDEOIL17AUG22P11150

Read more: Instruments & the symbol master

A14 Where do I get the token, lot size and tick size for an instrument? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

From the symbol master: 7 zipped CSV files, one per segment, on https://api.infinn.in/: NSE_symbols.txt.zip, BSE_symbols.txt.zip, NFO_symbols.txt.zip, BFO_symbols.txt.zip, NCOM_symbols.txt.zip, MCX_symbols.txt.zip and CDS_symbols.txt.zip. They need no login and no token.

  • Download them once a day and look up Token, TradingSymbol, LotSize and TickSize there, instead of calling Search Scrip for every lookup.
  • Orders use the trading symbol (tsym); quotes and the WebSocket use the token with the exchange (for example NSE|2885).
  • Read the columns by the header names. The column order differs between files.

Read more: Instruments & the symbol master · Search Scrip

Back to top ↑

Sessions and Multiple Accounts Intermediate

How long a login lasts, and how to run more than one program or account.

Questions in this section (4)

Q30 Can I run two programs in parallel using the same account? #

No. Only one API session can be active at a time. If you log in from a second program, the session of the first login expires, and orders from the first program will fail with an error.

Read more: Token & session lifetime · Error reference

Q31 What happens if I am logged in via the API and do not log out due to a network interruption? #

Your session remains valid until end of day (EOD) or until your next login.

Read more: Token & session lifetime

Q32 How can I run a strategy for multiple accounts (for example, family accounts)? #

Use Python threading and run a separate session for each account. This also resolves the issue of WebSockets not working for all users when separate instances are created. A sample program is available at tests/test_multi_user_sessions.py in the Python library.

Read more: Token & session lifetime · WebSocket: connect & authenticate · SDKs & libraries

A2 Why does my token stop working every morning? Do I have to log in every day? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

An access token works until the daily server restart (start of day) at about 4:00 AM IST. The simplest safe plan is one OAuth login every day, before the market opens.

  • Q42: there is no refresh-token renewal path that works. No endpoint accepts refresh_token. Run the OAuth login again each day (and whenever the token stops working). GenAcsTok is only for the first token after the login code, not for renewal.
  • Logging in again, or calling Logout, makes the old token stop working.
  • expires_in is a Unix time, not a number of seconds.
  • After a new login, reconnect the WebSocket with the new token.
  • To check a stored token at start-up, call User Details. HTTP 403 with an empty body, or Session Expired : Invalid Session Key, means: log in again. Do not keep retrying.

Read more: Token renewal & sessions · Token & session lifetime

Back to top ↑

Third-Party Platform Integration Advanced

Using the API with AmiBroker and TradingView.

Questions in this section (2)

Q33 Can I integrate AmiBroker with Infinn APIs? #

Yes. You can integrate AmiBroker with Infinn APIs at no additional charge.

Q34 Can I integrate TradingView data using Infinn APIs? #

Yes. You can integrate TradingView data using Infinn APIs.

Back to top ↑

Troubleshooting Advanced

Error messages and what to do about them. Have an error text? Start with A19.

Questions in this section (9)

Q36 I am using the .NET API and receiving "stat: Not_Ok, emsg: Session Expired". How do I fix it? #

Make sure the User ID and Account ID are entered in their respective fields.

Read more: Token & session lifetime · Error reference

Q37 How do I fix the AmiBroker login error "WinHttpSendRequest: 12029: A connection with the server could not be established"? #

This error is commonly caused by firewall or security software blocking the connection. Allow AmiBroker through your firewall (or temporarily disable the firewall for testing) and confirm that your internet connection is working.

Read more: Error reference

Q38 What does the error "Service Unavailable 503" mean? #

This error means the server is temporarily unavailable. Please try again after some time. If the issue continues, contact [email protected].

Read more: Error reference

Q39 How do I fix the error "User is Blocked for Trading"? #

This error means your client code has been blocked, which can happen for a number of reasons. The client code can be unblocked through Infinn; please contact [email protected] for assistance.

Read more: Error reference

A7 GenAcsTok returns "Invalid Input : INVALID_VERIFIER". What is wrong? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

The code or the checksum was not accepted. Check in this order:

  1. Your public IP matches the Primary IP in the API Key panel (see A8). On a non-whitelisted computer GenAcsTok also fails.
  2. The checksum is SHA-256 of app_key + secret_key + code, lower-case hex, with nothing between the three parts (see A6).
  3. You used the App Key (with _U), not your user ID.
  4. The code is fresh. It works once only; a failed attempt uses it up, so sign in again for a new code (see A1).

Read more: Error reference · Authentication · Debugging checklist

A15 My order is rejected with "Error Occurred : 2 "invalid input"". What is wrong? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

This general message usually means one of these:

  • The price is not a multiple of the tick size (for example RELIANCE-EQ ticks in 0.10, so 1402.33 is rejected and 1402.30 is fine).
  • The quantity is not a multiple of the lot size. Take both values from the symbol master (A14).
  • Numbers were sent as JSON numbers. Send every value as a string: "qty": "1", "prc": "1402.30".
  • An optional field was sent empty. Leave unused fields out (for example send amo only as "Yes", otherwise do not send it).

Read more: Debugging checklist · How requests are shaped

A16 I get HTTP 400, 404 or 405. Is my request built wrongly? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

Probably. Every call has the same shape:

  • Method is always POST, even for reads. A GET returns 405.
  • URL is https://api.infinn.in/NorenWClientAPI/<Endpoint>. Paths are case-sensitive: /NorenWClientAPI/OrderBook works, /norenwclientapi/orderbook gives 404.
  • Body is one form field: jData= followed by the JSON text. In Python use data="jData=" + json.dumps(payload), not json=payload.
  • A symbol with & (such as M&M) must be URL-encoded inside the JSON value only: "stext":"M%26M". A raw &, or encoding the whole body, gives 400.
  • Headers: Authorization: Bearer <access_token> and Content-Type: text/plain, as in Q44.

Read more: How requests are shaped · Debugging checklist

A19 I have an error message. Which answer should I read? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

You seeRead
Invalid Input : INVALID_VERIFIER at loginA7, A6
HTTP 401 with an empty bodyA8, Q44
HTTP 403 with an empty body, or Session Expired : Invalid Session KeyA2, Q30, Q36
A call rejects your user ID or account IDA4
Error Occurred : 2 "invalid input"A15
HTTP 400, 404 or 405A16
HTTP 429A12, Q17
Rejected : ORA:Order not foundA11
Error Occurred : 5 "no data"Often not an error: the result is empty (no positions, no holdings). Check exch and token.
WebSocket ak with NOT_OK, close code 1008A13
Service Unavailable 503Q38
User is Blocked for TradingQ39
ModuleNotFoundError: No module named 'WebSocket'Q35
Login page blank after sign-in, or token step failsA1

Still stuck? Print the HTTP status and the raw response body, then follow the debugging checklist.

Read more: Error reference · Debugging checklist

Back to top ↑

Partner and Platform Integration Advanced

Login format, tokens, IP whitelisting and order handling for platforms and advanced users.

Questions in this section (15)

Q40 How does login work in the Infinn API? #

Following SEBI regulations, Infinn has moved its API login from Quick Login to OAuth Login. Our documentation is currently being updated to reflect this. The login page URL follows this format:
https://api.infinn.in/OAuthlogin/investor-entry-level/login?api_key=<API_KEY>&route_to=<ROUTE_TO>;
api_key is your App Key. route_to is not the App Key: it is the SHA-256 hash (lower-case hex) of your user ID in capitals, a | character, and your Secret Code — sha256(USER_ID|SECRET). See A6 for the checksum used later with GenAcsTok.

Read more: Log in with OAuth · Authentication · Create your credentials

Q41 Can one API key be used for all of my clients? #

Yes. Infinn can provide a single Partner API key for all users of your platform. Your users do not need to enter a Secret Code or App Key.

Read more: Create your credentials

Q42 How long does an access token last, and how is it renewed? #

The access token is valid until the next beginning-of-day (morning), around the daily server restart. There is no working refresh-token renewal path: no endpoint accepts refresh_token to renew an access token. Plan on one OAuth login each trading day before the market opens (and whenever the token stops working). NorenWClientAPI/GenAcsTok is only for exchanging the one-time login code for the first access token after OAuth login — not for refreshing an expired token.

Read more: Log in with OAuth · Authentication · Token & session lifetime

Q43 Does logging in to the Infinn mobile app or website invalidate my API token? #

No. Infinn supports simultaneous use across the mobile app, web, desktop (EXE) and API connections.

Read more: Instruments & the symbol master

Q44 How do I send the access token with each request? #

Send the access token in the Authorization header in the format Bearer <access_token>. The request body carries only jData; no jKey is required. Example:

curl --location 'https://api.infinn.in/NorenWClientAPI/OrderBook' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer <access_token>' \
--data 'jData={"uid":"<USER_ID>"}'

Read more: Authentication · How requests are shaped · User Details

Q45 Which base path should I use: /NorenWClientAPI/ or /NorenWClientTP/? #

Please use /NorenWClientAPI/. Some documentation pages refer to /NorenWClientTP/, which is being updated.

Q46 Is IP whitelisting required for order APIs? #

For a single-client integration, the client’s IP address must be whitelisted. If your application is integrated through the Partner API, no IP whitelisting is required for your users to log in.

Read more: Create your credentials

Q47 Are webhooks or postbacks available for order updates? #

No. Postbacks and webhooks are not available. Please use the WebSocket (Order feed) to receive order updates.

Read more: WebSocket: connect & authenticate

Q48 What should I do if an order request times out? #

You can look up the order using its Order ID. Submitting the same Order ID twice results in a rejection, which protects against placing a duplicate order.

Q49 Does Infinn split orders that exceed the freeze quantity? #

Yes. Freeze-quantity splitting is already handled in the Infinn OMS, so you do not need to split orders yourself.

Q50 Are GTT orders available for stop-loss and target exits? #

Yes. GTT and the other order types listed in Q15 are available in the Infinn API.

Read more: GTT orders

Q51 Is the token in the symbol master the exchange token? #

Yes. Infinn uses the exchange’s own token. Trading symbols, however, follow Infinn’s own format. For example, BankNifty options use the format SymbolDDMMMYYOptionTypeStrike, such as BANKNIFTY17FEB22P38600. See Q29 for all symbol formats.

Read more: Instruments & the symbol master

Q52 Which field in the Limits API shows free cash available for new F&O orders? #

The CASH parameter in the Limits API shows the cash available for new F&O orders. Funds at Infinn are central: they are not allocated separately to individual segments.

Read more: Margin, MTM & P&L

Q53 Is there an API for the ledger and charges (brokerage, STT, etc.)? #

Currently, there is no such API. Please contact [email protected] if you have a specific requirement.

Read more: API & algo rules

A18 My GTT call worked, but my code reports it as failed. Why? #

Added for clarity Not part of the audited FAQ text; written from the pages linked below.

The GTT endpoints do not return stat: "Ok". On success they return a sentence such as Oi created, Oi Replacedt or Oi delete success. Treat a GTT reply as successful when it has no emsg, instead of testing stat == "Ok".

Read more: GTT orders · Debugging checklist

Back to top ↑

Still stuck?

Work through the debugging checklist, then write to [email protected] (see Q4) with the HTTP status and the emsg text you received.

Esc
↑↓ navigate↵ openEsc close/ to search