# Infinn API > API v5.0 (11 Nov 2026). Read-only reference pages include an API playground. Main login: OAuth (see /getting-started/oauth-login/). Rules: /rules/sebi-retail-algo/. Changelog: /changelog/. Postman: /downloads/INFINN_API_v4.3.postman_collection.json > Support: support@infinn.in · Brokerage ₹20 per order (API included); delivery ₹20 or 0.3%, whichever is lower · Orders: up to 20 per second and 200 per minute, registered static IP only. > The REST and WebSocket API of the Infinn trading platform (HKKR Finserv), > for the Indian markets: NSE, BSE and MCX. 58 REST endpoints and 10 > WebSocket feeds. Official documentation by HKKR Finserv Pvt Ltd (INFINN). Updated 5 Nov 2026. ## Read this part first These rules hold for every endpoint. Most of them are unusual, and code written on the usual assumptions will compile, run, and be wrong. 1. METHOD IS ALWAYS POST. Every endpoint is POST, including the ones that only read data. A GET returns 405. 2. THE BODY IS NOT JSON. Send Content-Type: text/plain and a body of the literal form jData= That is a form field named jData whose value is a JSON object serialised to a string. It is not a bare JSON body. Content-Type text/plain or application/json both work. 3. THE HOST IS https://api.infinn.in. One host for everything: api.infinn.in. WebSocket: wss://api.infinn.in/NorenWSTP/ . 4. AUTH IS A BEARER HEADER. Authorization: Bearer on every endpoint except GenAcsTok, which is the call that mints the token. 5. THERE ARE TWO ERROR LAYERS, AND THE SECOND ONE RETURNS 200. Layer 1 is HTTP: 400, 403, 404, 405, 410, 429, 500, 502, 503, 504. A rejected token gets an error with a COMPLETELY EMPTY BODY. Parsing the body before checking the status therefore raises a JSON decode error, which looks like a bug in your code rather than an auth failure. Layer 2 is in the body: HTTP 200 with {"stat": "Not_Ok", "emsg": "..."}. A 200 does not mean success. Always branch on stat. Correct order, every time: check the HTTP status then check that the body is non-empty then parse then check stat 6. SUCCESS IS NOT ALWAYS stat: "Ok". The GTT endpoints return a sentence instead -- "Oi created", "Oi Replacedt" (the typo is in the API), "Oi delete success". They have no stat field. Branch on the documented string for those. 7. RESPONSE SHAPE VARIES. The book and report endpoints return a bare JSON ARRAY on success and a JSON OBJECT on failure. Branch on the type before indexing. 8. FIELDS ARE OMITTED, NOT NULL. Infinn leaves a field out rather than returning null. Check presence. 9. NUMBERS ARE STRINGS. Prices, quantities and timestamps come back as strings. Convert explicitly; do not assume a numeric type. 10. AUTHORISATION IS ALSO BY IP. The account has one or two registered IPv4 addresses. A request from any other address is refused no matter how valid the token is. Static IP whitelisting is mandatory and live. Sandbox (UAT / Test — NOT live) is https://uat.infinn.in. Live trading is https://api.infinn.in. Live endpoints use real money. ## Rate limits 20 orders per second and 200 orders per minute, per account. Exceeding them returns HTTP 429. ## Getting an access token Login is OAuth only. The INFINN login page asks for user ID, password and TOTP (or OTP). You create your own API key in the trading platform. An access token is valid until the daily server restart at about 4:00 AM IST. A new login replaces (invalidates) the old token. To renew, run the OAuth login again. Four steps. Steps 1 and 2 happen in a browser; a program cannot do them. STEP 1 -- Register, once, by hand. A program cannot do this part. Log in at trade.infinn.in. At the far top right are three icons: an envelope, a bell, and a person. Click the PERSON. There is no control labelled "Profile" -- the menu is an unlabelled icon. In the menu that drops down, "Generate Key" is the eighth of ten entries. It opens a dialog titled "API Key" containing, in order: Client ID read-only. Your user ID: the uid in request bodies, and the actid on an individual account. Secret Code read-only, masked. The eye icon reveals it, the icon beside it copies it. This is the secret key used in the checksum. App Key read-only. Your client ID with _U appended: a client ID of IN001 gives an app key of IN001_U. Display Name required. A label for your application; no API call takes it as a parameter. Redirect URL required. Underlying field name red_url. Where the login page sends the browser back to, with ?code= on the end. http://localhost is fine in development -- nothing needs to listen on it, because you only read the address bar. Primary IP required. The public IPv4 address requests will arrive from. Backup IP optional. A second address. See Known limitations. A checkbox shown in the trading platform panel. INFINN's limit is 20 orders/s and 200/min; see Known limitations (/known-limitations/). Update saves the dialog. Nothing takes effect until pressed. THE APP KEY INCLUDES THE _U SUFFIX. Send the whole value. It is not something you append yourself, and not something to strip off. STEP 2 -- Send the user to the login page. https://api.infinn.in/OAuthlogin/investor-entry-level/login ?api_key= &route_to= api_key is your API key. route_to = sha256(USER_ID + "|" + SECRET_KEY), lower-case hex, user ID in capitals -- NOT the API key. Example with API key IN001_U: https://api.infinn.in/OAuthlogin/investor-entry-level/login?api_key=IN001_U&route_to=f63c3a3a696392e444acc5b708e13b74a5eaf04d580758d3e11eebf8c748c43a Login is OAuth only. susertoken (if returned) is not used for login. After signing in, the browser lands on your registered Redirect URL with ?code=<36 characters with dashes> on the query string. That code works EXACTLY ONCE: a failed exchange burns it and you must log in again. STEP 3 -- Compute the checksum. checksum = SHA256(app_key + secret_key + code) Concatenated with no separators and no spaces, output as lower-case hex. Worked example (dummy values): app key IN001_U, secret key demo-secret-0000, code 7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93 gives the SHA-256 of the string "IN001_Udemo-secret-00007a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93". STEP 4 -- Exchange the code. POST https://api.infinn.in/NorenWClientAPI/GenAcsTok Content-Type: text/plain jData={"code":"...","checksum":"..."} No Authorization header on this one. The response carries access_token, refresh_token and expires_in (a Unix timestamp in seconds). NOTE: refresh_token is returned but no published endpoint accepts it. When the token expires, repeat steps 2 to 4. ## A correct request, in full POST https://api.infinn.in/NorenWClientAPI/UserDetails Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: text/plain jData={"uid":"IN001"} ## Instruments: the symbol master files Contracts are addressed two ways. Orders take a TRADING SYMBOL (tsym, e.g. "RELIANCE-EQ"); quotes, chart data and all WebSocket subscriptions take a numeric TOKEN (e.g. 2885). Both come from the symbol master. SEVEN public zip archives, one per segment. No token, no account, no rate limit -- a plain GET is enough: https://api.infinn.in/NSE_symbols.txt.zip NSE cash and indices https://api.infinn.in/BSE_symbols.txt.zip BSE cash https://api.infinn.in/NFO_symbols.txt.zip NSE equity derivatives https://api.infinn.in/BFO_symbols.txt.zip BSE equity derivatives https://api.infinn.in/NCOM_symbols.txt.zip NSE commodity https://api.infinn.in/MCX_symbols.txt.zip MCX commodity https://api.infinn.in/CDS_symbols.txt.zip NSE currency Each holds exactly one comma-separated .txt file with a header row. Republished once a day, overnight. THERE ARE FIVE COLUMN LAYOUTS, NOT ONE. Index by header NAME, never by position. The differences are not additive: NSE, BSE 7 cols Exchange,Token,LotSize,Symbol,TradingSymbol, Instrument,TickSize NFO, NCOM 10 cols ...adds Expiry,OptionType,StrikePrice BFO 9 cols NO OptionType column, and the strike column is called "Strike", not "StrikePrice" MCX 11 cols GNGD inserted FOURTH, shifting all later columns CDS 12 cols Precision and Multiplier inserted FOURTH and FIFTH, shifting all later columns Every header line ends with a trailing comma, so splitting it yields one more field than there are columns. On CDS the DATA rows have no trailing comma, so its header has 13 fields where its rows have 12. A FUTURES ROW HAS NO STRIKE, and the placeholder differs per file: file Instrument starts OptionType StrikePrice NFO FUT XX -0.01 MCX FUT XX 0 CDS FUT XX -1e-07 <- scientific notation; a naive int() of this throws Branch on Instrument.startswith("FUT") and do not read the strike there. DATA QUALITY: 657 rows of BFO_symbols.txt are corrupt -- an expiry with no year and the literal string "13:" in the Instrument column. Reject any row whose expiry does not match dd-MMM-yyyy. A further 638 BFO rows carry a 17-digit token where every other row in every file has 6 to 9 digits; their symbols name two months (BPCLOCTDEC26), which suggests calendar spreads, but Infinn documents nothing about them. Verified rows, for checking a parser: NSE,26000,1,Nifty 50,NIFTY INDEX,INDEX,0, NSE,2885,1,RELIANCE,RELIANCE-EQ,EQ,0.1, NSE,3045,1,SBIN,SBIN-EQ,EQ,0.05, ## Historical data ONE endpoint returns price history: TPSeries. It covers roughly the last 10 months. There is no end-of-day endpoint, no adjusted-close history and no corporate-action data. POST https://api.infinn.in/NorenWClientAPI/TPSeries jData={"uid":"...","exch":"NSE","token":"2885", "st":"1759722300","et":"1759744800"} exch required, the segment the token belongs to. A token queried against the wrong segment returns nothing, not an error. token required, the NUMERIC token from the symbol master. Not tsym. st, et Unix seconds. Indian markets run on IST (UTC+5:30); building these from a naive datetime on a UTC server is the commonest reason an empty array comes back. THERE IS NO INTERVAL PARAMETER. None is published, and no default is documented. The published sample shows one-minute candles. To get 5m, 15m, 30m, hourly or daily bars you must aggregate the result yourself: open = FIRST open, close = LAST close, high = max, low = min (excluding zero-volume minutes, whose low is 0.00), volume = sum of intv. Never sum `v`, which is already cumulative. Never average open and close. Response: a JSON ARRAY on success, newest candle FIRST, every value a string. A JSON OBJECT on failure. Fields per candle: stat per-candle status; check it per row time "dd-mm-yyyy HH:MM:SS" in IST -- DAY FIRST, not month first into interval open inth interval high intl interval low intc interval close intv interval volume intvwap interval VWAP intoi change in open interest over the interval v CUMULATIVE volume for the day so far, not the interval's oi open interest outstanding A candle with into/inth/intl/intc all "0.00" and intv "0" is a minute in which nothing traded. Do not plot it as a price collapse. Market hours, IST: NSE and BSE equities 09:15-15:30; MCX 09:00-23:30. A range entirely outside them returns an empty array, not an error. Undocumented: the maximum range per call, and how far back history goes. ## A correct client, in pseudocode response = http_post(url, headers, "jData=" + json_encode(payload)) if response.status != 200: fail("HTTP " + response.status) # error responses have an EMPTY body if response.body is empty: fail("empty body") # do not parse this data = json_decode(response.body) if data is an array: return data # books and reports succeed so if data.stat != "Ok": fail(data.emsg) # HTTP was 200; this is layer 2 return data ## Endpoints 63 endpoints in 10 groups. Every one is POST, every one takes jData, every one needs the Bearer header except GenAcsTok. ## Session Obtain, use and destroy an access token. ### Generate Access Token POST https://api.infinn.in/NorenWClientAPI/GenAcsTok Exchanges the one-time login code for an access token. No Authorization header: this is the call that mints the token. Request fields (inside the jData JSON string): code required The one-time code returned on the login redirect URL. checksum required SHA-256 hash of app_key + secret_key + code, concatenated with no separators and no spaces. Example body: jData={"code":"7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93","checksum":"YOUR_ACCESS_TOKEN_64_HEX_CHARS"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. access_token The token to send as a Bearer credential on every other call. 64 hexadecimal characters, no dashes. refresh_token Refresh token. expires_in When the access token expires, as a Unix timestamp in seconds. uname User name. actid Account ID. uid User ID. email Email address. brkname Broker ID. cnm Company name. access_type Access type. lastaccesstime Previous access time, as a Unix timestamp. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "20:18:47 19-05-2020", "stat": "Ok", "access_token": "YOUR_ACCESS_TOKEN_64_HEX_CHARS", "expires_in": "1756990407", "refresh_token": "YOUR_ACCESS_TOKEN_64_HEX_CHARS", "lastaccesstime": "1589897972" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Invalid Input : INVALID_VERIFIER", "uid": "TEST" } WARNING: The code is single use -- Each login code works exactly once. If the call fails for any reason -- including a mistyped checksum -- you must log in again to get a fresh code. Reusing a spent code returns INVALID_VERIFIER. WARNING: Never ship your secret key -- The checksum exists so that your secret key never travels. Compute it on a server or in a local script. A secret key embedded in a mobile app or a web page can be extracted by anyone who downloads it. ### Logout POST https://api.infinn.in/NorenWClientAPI/Logout Invalidates the current session and its access token. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "stat": "Ok", "request_time": "10:43:41 28-05-2020" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Server Timeout : " } ### Get HS Token POST https://api.infinn.in/NorenWClientAPI/GetHsToken Issues a one-time token for handing a logged-in user to a third-party site. Request fields (inside the jData JSON string): uid required User ID. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. hstk The one-time token to pass to the back office or third-party link. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. NOTE: Documented response wording -- The API specification describes stat here as “If Pin setting is Success Or failure status” and request_time as present “only if password change succeeds”. Those descriptions appear to be copied from the PIN and password endpoints; treat them as the usual Ok / Not_Ok pair. ### Validate HS Token POST https://api.infinn.in/NorenWClientAPI/ValidateHsToken Checks whether an HS token is genuine. Returns plain text, not JSON. Request fields (inside the jData JSON string): LoginId required The sLoginId received from the initiating site. token required The token obtained on login success. Example body: jData={"LoginId":"REPLACE_ME","token":"2885"} Response: This endpoint does not return JSON. The body is the plain text TRUE when the token is valid, or FALSE when the user ID or token is invalid. Do not try to parse it as JSON. WARNING: Server-side only -- The API specification marks this endpoint “to be used only from server”. Do not call it from a browser or a mobile app: a client that can ask “is this token valid?” can also be tricked into accepting its own answer. NOTE: How the hand-off works -- 1. The user clicks a link to the third-party site. 2. Your site passes the user ID, token and client ID to it. 3. That site's server calls ValidateHsToken. 4. If the answer is TRUE, it grants the user access. ## Account What the account is allowed to do, and who owns it. ### User Details POST https://api.infinn.in/NorenWClientAPI/UserDetails Returns the account's enabled exchanges, products and order types. Request fields (inside the jData JSON string): uid required Logged-in user ID. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. exarr Exchanges enabled for this account. orarr Price types enabled for this account. prarr Products enabled for this account. See the table below. brkname Broker ID. brnchid Branch ID. email Email address. actid Account ID. m_num Mobile number. uprev User role. Always INVESTOR -- no other role may log in through this API. access_type Access type. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "20:20:04 19-05-2020", "prarr": [ { "prd": "C", "s_prdt_ali": "Delivery", "exch": ["NSE", "BSE"] }, { "prd": "I", "s_prdt_ali": "Intraday", "exch": ["NSE", "BSE", "NFO"] }, { "prd": "H", "s_prdt_ali": "High Leverage", "exch": ["NSE", "BSE", "NFO"] }, { "prd": "B", "s_prdt_ali": "Bracket Order", "exch": ["NSE", "BSE", "NFO"] } ], "exarr": ["NSE", "NFO"], "orarr": ["MKT", "LMT", "SL-LMT", "SL-MKT", "DS", "2L", "3L", "4L"], "brkname": "VIDYA", "brnchid": "VIDDU", "email": "user@example.com", "actid": "IN001", "uprev": "INVESTOR", "stat": "Ok" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } NOTE: Build your UI from this response, not from a hard-coded list -- Entitlements differ per account. An order form that offers MCX to an account without MCX enabled produces rejections that look like bugs in your code. Drive the dropdowns from exarr, orarr and prarr. NOTE: orarr can contain values not listed for prctyp -- The sample response includes 4L, which does not appear in the documented prctyp list (LMT / MKT / SL-LMT / SL-MKT / DS / 2L / 3L). Treat orarr as authoritative for what your account may send. ### Client Details POST https://api.infinn.in/NorenWClientAPI/ClientDetails Returns the account holder's KYC and bank details. Request fields (inside the jData JSON string): uid required Logged-in user ID. actid required Account ID of the logged-in user. brkname optional Broker ID of the logged-in user. Send the key with an empty value unless you have a specific broker ID to pass. Send the key with an empty string when unused; do not omit it. Example body: jData={"uid":"IN001","actid":"IN001","brkname":""} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. actid Account ID. creatdte Account creation date. creattme Account creation time. m_num Mobile number. email Email address. pan PAN. dob Date of birth, formatted DDMMYYYY. act_sts Account status. addr Address. addroffice Office address. addrcity City. addrstate State. bankdetails Bank accounts. See below. dp_acct_num Demat accounts. See below. exarr Enabled exchange names. mandate_id_list Mandate IDs. partic_id_list Participant IDs. eqt_asba Equity ASBA enabled. der_asba Derivatives ASBA enabled. fx_asba Currency ASBA enabled. com_asba Commodity ASBA enabled. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. WARNING: This response is personal data -- It contains PAN, date of birth, address and bank account numbers. Do not log it, cache it in a browser, or send it to any analytics or error-reporting service. ## Instruments & watchlists Find instruments, read their prices, and organise them into lists. ### Search Scrips POST https://api.infinn.in/NorenWClientAPI/SearchScrip Searches instruments by free text and returns their trading symbols and tokens. Request fields (inside the jData JSON string): uid required Logged-in user ID. stext required The text to search for. exch optional Restrict the search to one exchange. Choose from the exarr array returned by UserDetails. Omit to search all enabled exchanges. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX Example body: jData={"uid":"IN001","stext":"RELIANCE"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. values The matching instruments. See below. emsg Human-readable reason for the failure. Example success: { "stat": "Ok", "values": [ { "exch": "NSE", "token": "24225", "tsym": "RELAXO-EQ" }, { "exch": "NSE", "token": "2882", "tsym": "RELCAPITAL-EQ" }, { "exch": "NSE", "token": "2885", "tsym": "RELIANCE-EQ" }, { "exch": "NSE", "token": "553", "tsym": "RELINFRA-EQ" } ] } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "No Data : " } NOTE: For bulk work, download the symbol master instead -- SearchScrip is for interactive lookup. If you need to resolve thousands of symbols, or you want expiry dates and strike prices in bulk, download the symbol master files once a day instead of hammering this endpoint. NOTE: Only a subset of fields appears in the sample -- The documented field list is long, but the published sample response contains only exch, token and tsym. Infinn omits fields rather than returning nulls, so check for a field's presence before reading it. ### Get Quotes POST https://api.infinn.in/NorenWClientAPI/GetQuotes Returns a full market snapshot for one instrument, including five levels of depth. Request fields (inside the jData JSON string): uid required Logged-in user ID. exch optional Exchange. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX token optional Contract token. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. exch Exchange. tsym Trading symbol. cname Company name. symname Symbol name. seg Segment. instname Instrument name. isin ISIN. pp Price precision - decimal places to display. ls Lot size. ti Tick size. mult Contract multiplier, used for order-value maths. prcftr_d Price factor, as the expression ((GN / GD) * (PN / PD)). token Contract token. lp Last traded price. o Day's opening price. h Day's high. l Day's low. c Closing price. v Volume. ap Average traded price for the day (VWAP). ltq Last traded quantity. ltt Last trade time. ltd Last trade date, formatted dd-mm-yy. uc Upper circuit limit. lc Lower circuit limit. tbq Total buy quantity across the book. tsq Total sell quantity across the book. bp1 Best buy price, level 1. bp2 to bp5 follow. sp1 Best sell price, level 1. sp2 to sp5 follow. bq1 Best buy quantity, level 1. bq2 to bq5 follow. sq1 Best sell quantity, level 1. sq2 to sq5 follow. bo1 Number of buy orders at level 1. bo2 to bo5 follow. so1 Number of sell orders at level 1. so2 to so5 follow. oi Open interest. toi Total open interest for the underlying. strprc Strike price. exd Expiry date. optt Option type. und_exch Underlying exchange segment. und_tk Underlying token. sptprc Spot price. Disabled by default; enabled on request. wk52_h 52-week high. Disabled by default; enabled on request. wk52_l 52-week low. Disabled by default; enabled on request. nav Net asset value. lut Feed time. ord_msg Order message. scrip_base_prc Scrip base price. issuecap Issue capital. e_date End date. cutof_all Cut-off all. emsg Human-readable reason for the failure. Example success: { "request_time": "12:05:21 18-05-2021", "stat": "Ok", "exch": "NSE", "tsym": "ACC-EQ", "cname": "ACC LIMITED", "symname": "ACC", "seg": "EQT", "instname": "EQ", "isin": "INE012A01025", "pp": "2", "ls": "1", "ti": "0.05", "mult": "1", "uc": "2093.95", "lc": "1713.25", "prcftr_d": "(1 / 1 ) * (1 / 1)", "token": "22", "lp": "0.00", "h": "0.00", "l": "0.00", "v": "0", "ltq": "0", "ltt": "05:30:00", "bp1": "2000.00", "sp1": "0.00", "bq1": "2", "sq1": "0", "bo1": "2", "so1": "0" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "request_time": "10:50:54 10-12-2020", "emsg": "Error Occurred : 5 \"no data\"" } WARNING: Do not poll this for live prices -- GetQuotes is a snapshot. Calling it in a loop will exhaust the 20 orders per second limit within a handful of instruments. For anything live, use the WebSocket feed, which pushes updates as they happen. NOTE: Some fields are off by default -- sptprc, wk52_h and wk52_l are marked in the API specification as disabled by default and enabled on request. If you need them, ask Infinn to turn them on. ### Get Security Info POST https://api.infinn.in/NorenWClientAPI/GetSecurityInfo Returns the static contract details for one instrument. Request fields (inside the jData JSON string): uid required Logged-in user ID. exch optional Exchange. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX token optional Contract token. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ### Get Watchlist Names POST https://api.infinn.in/NorenWClientAPI/MWList Lists the names of the user's own watchlists. Request fields (inside the jData JSON string): uid required Logged-in user ID. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. values Watchlist names. emsg Human-readable reason for the failure. ### Get Watchlist POST https://api.infinn.in/NorenWClientAPI/MarketWatch Returns the instruments in one watchlist, with quotes. Request fields (inside the jData JSON string): uid required Logged-in user ID. wlname required Watchlist name. Example body: jData={"uid":"IN001","wlname":"MyWatchlist"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. exch Exchange. tsym Trading symbol. token Contract token. lp Last traded price. pc Percentage change. ls Lot size. ti Tick size. pp Price precision. emsg Human-readable reason for the failure. ### Get Predefined Watchlist Names POST https://api.infinn.in/NorenWClientAPI/PreDefinedMWList Lists the broker-defined watchlists available to the user. Request fields (inside the jData JSON string): uid required Logged-in user ID. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. values Predefined watchlist names. emsg Human-readable reason for the failure. ### Get Predefined Watchlist POST https://api.infinn.in/NorenWClientAPI/PreDefinedMW Returns the instruments in one broker-defined watchlist. Request fields (inside the jData JSON string): uid required Logged-in user ID. wlname required Predefined watchlist name. Example body: jData={"uid":"IN001","wlname":"MyWatchlist"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. exch Exchange. tsym Trading symbol. token Contract token. emsg Human-readable reason for the failure. ### Add Scrips to Watchlist POST https://api.infinn.in/NorenWClientAPI/AddMultiScripsToMW Adds one or more instruments to a watchlist. Request fields (inside the jData JSON string): uid required Logged-in user ID. wlname required Watchlist name. scrips required One or more instruments, each written as exchange|token, joined with #. Example body: jData={"uid":"IN001","wlname":"MyWatchlist","scrips":"NSE|2885#NSE|3045"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ### Delete Scrips from Watchlist POST https://api.infinn.in/NorenWClientAPI/DeleteMultiMWScrips Removes one or more instruments from a watchlist. Request fields (inside the jData JSON string): uid required Logged-in user ID. wlname required Watchlist name. scrips required One or more instruments, each written as exchange|token, joined with #. Example body: jData={"uid":"IN001","wlname":"MyWatchlist","scrips":"NSE|2885#NSE|3045"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ### Rename Watchlist POST https://api.infinn.in/NorenWClientAPI/RenameMW Renames a watchlist. Request fields (inside the jData JSON string): uid required Logged-in user ID. wlname required The current watchlist name. newwlname required The new watchlist name. Example body: jData={"uid":"IN001","wlname":"MyWatchlist","newwlname":"Large caps"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ### Reorder Watchlist Scrips POST https://api.infinn.in/NorenWClientAPI/ReorderMWScrips Sets the display order of instruments in a watchlist. Request fields (inside the jData JSON string): uid required Logged-in user ID. wlname required Watchlist name. scrips required The instruments, in the order you want them displayed, as exchange|token joined with #. Example body: jData={"uid":"IN001","wlname":"MyWatchlist","scrips":"NSE|2885#NSE|3045"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ## Market data Option chains, historical candles, movers, indices and exchange messages. ### Get Option Chain POST https://api.infinn.in/NorenWClientAPI/GetOptionChain Returns the option contracts around a strike price for an underlying. Request fields (inside the jData JSON string): uid required Logged-in user ID. tsym required Trading symbol of any option or future on the underlying. The chain for that underlying is returned. URL-encode symbols containing special characters. exch required Exchange. Must be a segment that has options -- NFO, CDS, MCX or similar. Check before allowing the call. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX strprc required The middle strike price for the selection. cnt required How many strikes to return on each side of strprc, for calls and for puts. cnt=4 returns 16 contracts; cnt=5 returns 20. Example body: jData={"uid":"IN001","tsym":"NIFTY30DEC26C26000","exch":"NFO","strprc":"26000","cnt":"5"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. values The contracts. See below. emsg Human-readable reason for the failure. NOTE: This returns contracts, not prices -- The option chain gives you the identity of each contract. To show premiums alongside them, subscribe to the returned tokens on the WebSocket feed or call Get Quotes per contract. WARNING: cnt grows the response quadratically in practice -- Each unit of cnt adds four contracts (a call and a put on each side). A large cnt plus a WebSocket subscription for every returned token can quickly exceed the feed's practical subscription capacity. ### Get Time Price Data (chart data) POST https://api.infinn.in/NorenWClientAPI/TPSeries Returns historical OHLC candles for one instrument. Request fields (inside the jData JSON string): uid required Logged-in user ID. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX token required Contract token. Note: the API specification mislabels this field's description as "Top or Bottom", which belongs to the TopList endpoint. st optional Start time, in seconds since 1 January 1970. et optional End time, in seconds since 1 January 1970. Example body: jData={"uid":"IN001","exch":"NSE","token":"2885"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. time Candle timestamp, formatted DD-MM-CCYY hh:mm:ss. into Interval open. inth Interval high. intl Interval low. intc Interval close. intvwap Interval volume-weighted average price. intv Interval volume. intoi Interval open-interest change. v Cumulative volume. oi Open interest. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "time": "02-06-2020 15:46:23", "into": "0.00", "inth": "0.00", "intl": "0.00", "intc": "0.00", "intvwap": "0.00", "intv": "0", "intoi": "0", "v": "980515", "oi": "128702" }, { "stat": "Ok", "time": "02-06-2020 15:43:23", "into": "1287.00", "inth": "1287.00", "intl": "0.00", "intc": "1287.00", "intvwap": "128702.00", "intv": "4", "intoi": "128702", "v": "980515", "oi": "128702" } ] Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } NOTE: Candles come back newest first -- In the published sample the timestamps descend: 15:46, then 15:45, then 15:44. Sort by time yourself rather than assuming chronological order. NOTE: No interval parameter is documented -- The request takes only a start and end time. The API specification does not publish a candle-interval parameter or state what interval is returned. The sample shows one-minute candles. Documentation information not available for selecting other intervals. WARNING: The response shape changes on failure -- Success is a JSON array; failure is a JSON object. Check whether you got an array before iterating. ### Get Top List POST https://api.infinn.in/NorenWClientAPI/TopList Returns top or bottom movers for a basket and criterion. Request fields (inside the jData JSON string): uid required Logged-in user ID. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX tb required Whether to return the top or the bottom of the ranking. one of: T, B bskt required Basket name. crt required Criterion to rank by. Example body: jData={"uid":"IN001","exch":"NSE","tb":"T","bskt":"REPLACE_ME","crt":"REPLACE_ME"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. values The ranked instruments. See below. emsg Human-readable reason for the failure. Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Invalid Input : Missing uid or exch or bskt or tb or crt" } WARNING: Response keys vary in case -- The published sample response mixes cases within the same array: "Pc" on some rows and "pc" on others, and likewise "Oi" and "oi". Read these keys case-insensitively. ### Get Top List Names POST https://api.infinn.in/NorenWClientAPI/TopListName Lists the basket and criteria pairs that Get Top List accepts. Request fields (inside the jData JSON string): uid required Logged-in user ID. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX Example body: jData={"uid":"IN001","exch":"NSE"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. values Basket and criteria pairs. See below. emsg Human-readable reason for the failure. ### Get Index List POST https://api.infinn.in/NorenWClientAPI/GetIndexList Lists the indices available on an exchange, with their tokens. Request fields (inside the jData JSON string): uid required Logged-in user ID. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX Example body: jData={"uid":"IN001","exch":"NSE"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. values The indices. See below. emsg Human-readable reason for the failure. Example success: { "request_time": "20:12:29 13-12-2020", "values": [ { "idxname": "Nifty 50", "token": "26000" }, { "idxname": "Nifty Bank", "token": "26009" }, { "idxname": "India VIX", "token": "26017" }, { "idxname": "Nifty Fin Services", "token": "26037" } ] } NOTE: Index tokens are stable and worth hard-coding -- Every token above was listed in the NSE symbol master, where each appears with Instrument = INDEX: Nifty 50 is 26000, Nifty Bank 26009, India VIX 26017 and Nifty Fin Services (FINNIFTY) 26037. ### Get Broker Message POST https://api.infinn.in/NorenWClientAPI/GetBrokerMsg Returns administrative messages from the broker. Request fields (inside the jData JSON string): uid required Logged-in user ID. Example body: jData={"uid":"IN001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. dmsg The message text. msgtyp Message type. norentm Infinn timestamp. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "norentm": "02-05-1975 08:48:52", "msgtyp": "Admin Message", "dmsg": "Test Msg All Message Recovery2" } ] ### Get Exchange Message POST https://api.infinn.in/NorenWClientAPI/ExchMsg Returns messages issued by an exchange. Request fields (inside the jData JSON string): uid required Logged-in user ID. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX Example body: jData={"uid":"IN001","exch":"NSE"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. exchmsg The exchange message. exchtm Exchange time. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ### SPAN Calculator POST https://api.infinn.in/NorenWClientAPI/SpanCalc Calculates SPAN and exposure margin for a set of positions. Request fields (inside the jData JSON string): actid required Account ID of the logged-in user. pos required The positions to evaluate, as an array of JSON objects. Example body: jData={"actid":"IN001","pos":"REPLACE_ME"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ## Orders & trades Place, modify and cancel orders; read the order and trade books; check margin before you commit. ### Place Order POST https://api.infinn.in/NorenWClientAPI/PlaceOrder !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Sends a new order to the exchange. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. actid required Account ID of the logged-in user. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX tsym required Trading symbol: the unique identifier of the contract. URL-encode it to avoid errors with symbols that contain special characters, such as M&M. qty required Order quantity. prc required Order price. Send "0" when prctyp is MKT or SL-MKT. trgprc optional Trigger price. Send only for SL-LMT and SL-MKT orders. dscqty optional Disclosed quantity. Capped at 10% of qty on NSE and 50% on MCX. prd required Product type: C for delivery, M for margin, H for cover, I for intraday, B for bracket, S for special, P for special2. one of: C, I, M, H, B, S, P trantype required Transaction type. one of: B, S prctyp required Price type (order type). one of: LMT, MKT, SL-LMT, SL-MKT, DS, 2L, 3L mkt_protection optional Market-order protection percentage. Applies only to MKT orders on the BSE, BFO, BCS and MCX segments. ret required Retention type: how long the order stays live. Offer only the values the chosen exchange permits. one of: DAY, IOC, EOS remarks optional A free-text tag you attach to the order. ordersource optional Order source, used to populate the exchange info fields. If omitted, the access type of the login is used. one of: API, WEB, MOB, TT bpprc optional Book-profit price. Applies only when prd is B (bracket order). blprc optional Book-loss price. Applies only when prd is H (cover) or B (bracket). trailprc optional Trailing price. Applies only when prd is H (cover) or B (bracket). ext_remarks optional External remarks. cl_ord_id optional Client order ID. channel optional Channel. usr_agent optional User agent. app_inst_id optional App install ID. amo optional Send "Yes" to place an after-market order. If you do not want an AMO, omit the field entirely -- sending it with any other value produces "Invalid AMO". one of: Yes tsym2 optional Trading symbol of the second leg. Mandatory for price types 2L and 3L. trantype2 optional Transaction type of the second leg. Mandatory for 2L and 3L. qty2 optional Quantity of the second leg. Mandatory for 2L and 3L. prc2 optional Price of the second leg. Mandatory for 2L and 3L. tsym3 optional Trading symbol of the third leg. Mandatory for 3L. trantype3 optional Transaction type of the third leg. Mandatory for 3L. qty3 optional Quantity of the third leg. Mandatory for 3L. prc3 optional Price of the third leg. Mandatory for 3L. instname optional Instrument name. ipaddr optional Client IP address. cau_msg optional Cautionary message. Example body: jData={"uid":"IN001","actid":"IN001","exch":"NSE","tsym":"RELIANCE-EQ","qty":"1","prc":"1000","prd":"C","trantype":"B","prctyp":"LMT","ret":"DAY"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno The new order's number. Keep it: you need it to modify, cancel or track the order. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "10:48:03 20-05-2020", "stat": "Ok", "norenordno": "20052000000017" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "request_time": "20:40:01 19-05-2020", "emsg": "Error Occurred : 2 \"invalid input\"" } WARNING: A live call places a real order with real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. There is no separate paper-trading mode on live. Test with a single share of a liquid stock at a limit price far from the market, so the order rests in the book and you can cancel it. NOTE: An order number is an acknowledgement, not a fill -- stat: "Ok" plus a norenordno means Infinn accepted the order. The exchange may still reject it, and even an accepted order may sit unfilled. Read status from Single Order Status, or subscribe to order updates. NOTE: Check the margin first -- Order Margin tells you whether the order will pass the margin check before you send it, which turns a rejection into a question you asked politely. WARNING: prc must respect the tick size -- A price that is not a multiple of the instrument's tick size is rejected by the exchange. The tick size is in the symbol master (TickSize) and in the ti field of a quote. RELIANCE-EQ ticks in 0.10; SBIN-EQ ticks in 0.05. ### Modify Order POST https://api.infinn.in/NorenWClientAPI/ModifyOrder !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Changes the price, quantity, order type or trigger of a resting order. Request fields (inside the jData JSON string): exch required Exchange. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX norenordno required Order number assigned by Infinn's order management system. prctyp required Price type. This may be changed. one of: LMT, MKT, SL-LMT, SL-MKT, DS, 2L, 3L prc required The new price. Send "0" if prctyp is MKT or SL-MKT. qty required The new quantity, or the existing quantity if you are not changing it. tsym required Trading symbol. Cannot be changed -- it must match the original order exactly. URL-encode symbols with special characters. ret optional Retention type of the order. one of: DAY, IOC, EOS mkt_protection optional Market-order protection percentage. Applies only to MKT orders on the BSE, BFO, BCS and MCX segments. trgprc optional New trigger price, for SL-MKT or SL-LMT orders. dscqty optional Disclosed quantity. Capped at 10% of qty on NSE and 50% on MCX. ext_remarks optional External remarks. cl_ord_id optional Client order ID. channel optional Channel. usr_agent optional User agent. app_inst_id optional App install ID. uid required User ID of the logged-in user. bpprc optional Book-profit price. Applies only when prd is B (bracket order). blprc optional Book-loss price. Applies only when prd is H (cover) or B (bracket). trailprc optional Trailing price. Applies only when prd is H (cover) or B (bracket). ipaddr optional Global IP of internet access. ordersource optional Order source. Optional -- if omitted, the login's access type is used. one of: API, WEB, MOB, TT Example body: jData={"exch":"NSE","norenordno":"24010100000001","prctyp":"LMT","prc":"1000","qty":"1","tsym":"RELIANCE-EQ","uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. result The order number of the modified order. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "14:14:08 26-05-2020", "stat": "Ok", "result": "20052600000103" } Example failure (note the HTTP status is still 200): { "request_time": "16:03:29 28-05-2020", "stat": "Not_Ok", "emsg": "Rejected : ORA:Order not found" } WARNING: Only OPEN and TRIGGER_PENDING orders can be modified -- If the order's status is anything else -- including COMPLETE, CANCELED or REJECTED -- the modification is refused. Check the status first with Single Order Status. NOTE: The order number comes back as result, not norenordno -- PlaceOrder returns the order number in norenordno; ModifyOrder and CancelOrder return it in result. This inconsistency is in the API itself. NOTE: Send the full order, not just the change -- qty, prc, prctyp and tsym are all required even when unchanged. Read the current values from the order book and resend them. ### Cancel Order POST https://api.infinn.in/NorenWClientAPI/CancelOrder !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Cancels a resting order. Request fields (inside the jData JSON string): norenordno required Order number assigned by Infinn's order management system. uid required User ID of the logged-in user. ext_remarks optional External remarks. cl_ord_id optional Client order ID. channel optional Channel. usr_agent optional User agent. app_inst_id optional App install ID. ordersource optional Order source. one of: API, WEB, MOB, TT ipaddr optional Global IP of internet access. Example body: jData={"norenordno":"24010100000001","uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. result The order number of the cancelled order. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "14:14:10 26-05-2020", "stat": "Ok", "result": "20052600000103" } Example failure (note the HTTP status is still 200): { "request_time": "16:01:48 28-05-2020", "stat": "Not_Ok", "emsg": "Rejected : ORA:Order not found to Cancel" } WARNING: Only OPEN and TRIGGER_PENDING orders can be cancelled -- Anything already filled, cancelled or rejected cannot be cancelled, and you will get Rejected : ORA:Order not found to Cancel. NOTE: Partially filled orders cancel the remainder -- Cancelling an order that has already filled part of its quantity withdraws only the unfilled balance. The filled part is a trade and cannot be undone. ### Exit Cover / Bracket Order POST https://api.infinn.in/NorenWClientAPI/ExitSNOOrder !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Exits a cover or bracket order, closing its child legs. Request fields (inside the jData JSON string): norenordno required The snonum from the order book if one is present, otherwise the Infinn order number. prd required Product. Only H (cover) and B (bracket) are allowed here. one of: H, B uid required User ID of the logged-in user. Example body: jData={"norenordno":"24010100000001","prd":"B","uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. dmsg Display message. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. NOTE: Why cover and bracket orders need their own exit -- A cover or bracket order is really several linked orders: the entry, plus a stop-loss, plus (for bracket) a target. Cancelling one leg with CancelOrder would leave the others live. This endpoint unwinds the whole structure. ### Order Book POST https://api.infinn.in/NorenWClientAPI/OrderBook Returns every order placed today, with its current status. Request fields (inside the jData JSON string): uid required Logged-in user ID. prd optional Filter to one product type. Omit for all products. one of: C, I, M, H, B, S, P Example body: jData={"uid":"IN001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno Infinn order number. exch Exchange segment. tsym Trading symbol the order was placed on. qty Order quantity. prc Order price. prd Product. Display it using s_prdt_ali from UserDetails. s_prdt_ali Product display name. status Order status. One of PENDING, OPEN, COMPLETE, CANCELED, REJECTED, TRIGGER_PENDING. trantype B for buy, S for sell. prctyp Price type: LMT, MKT, SL-LMT, SL-MKT. ret Order validity: DAY, IOC or EOS. fillshares Quantity filled so far. avgprc Average fill price across the filled quantity. rejreason Why the order was rejected, in plain text. exchordid The exchange's own order number. cancelqty Quantity cancelled, for a cancelled order. remarks The tag you sent when placing the order. dscqty Disclosed quantity. trgprc Trigger price. uid User ID. actid Account ID. bpprc Book-profit price. Bracket orders only. blprc Book-loss price. Cover and bracket orders only. trailprc Trailing price. Cover and bracket orders only. amo Yes when the order is an after-market order. pp Price precision - the number of decimal places to display. ti Tick size - the smallest valid price increment. ls Lot size. token Contract token. norentm Infinn timestamp. ordenttm Order entry time. exch_tm Exchange update time, formatted dd-mm-YYYY hh:MM:SS. snoordt 0 for the profit leg, 1 for the stop-loss leg. snonum Sequence number of a cover/bracket child order. Send it to ExitSNOOrder to exit that leg. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "exch": "NSE", "tsym": "ACC-EQ", "norenordno": "20062500000001223", "prc": "127230", "qty": "100", "prd": "C", "status": "Open", "trantype": "B", "prctyp": "LMT", "fillshares": "0", "avgprc": "0", "exchordid": "250620000000343421", "uid": "VIDYA", "actid": "IN001", "ret": "DAY", "amo": "Yes" }, { "stat": "Ok", "exch": "NSE", "tsym": "ABB-EQ", "norenordno": "20062500000002543", "prc": "127830", "qty": "50", "prd": "C", "status": "REJECT", "trantype": "B", "prctyp": "LMT", "fillshares": "0", "avgprc": "0", "rejreason": "Insufficient funds", "uid": "VIDYA", "actid": "IN001", "ret": "DAY", "amo": "No" } ] Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } WARNING: status casing is not consistent -- The documented status values are upper case (OPEN, REJECTED), but the published sample response contains "Open" and "REJECT". Compare statuses case-insensitively, and allow for REJECT as well as REJECTED. NOTE: Success is an array, failure is an object -- As with the other book endpoints, check that you received an array before iterating. ### Multi Leg Order Book POST https://api.infinn.in/NorenWClientAPI/MultiLegOrderBook Returns today's two-leg and three-leg orders. Request fields (inside the jData JSON string): uid required Logged-in user ID. prd optional Filter to one product type. one of: C, I, M, H, B, S, P Example body: jData={"uid":"IN001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno Infinn order number. exch Exchange segment. tsym Trading symbol the order was placed on. qty Order quantity. prc Order price. prd Product. Display it using s_prdt_ali from UserDetails. s_prdt_ali Product display name. status Order status. One of PENDING, OPEN, COMPLETE, CANCELED, REJECTED, TRIGGER_PENDING. trantype B for buy, S for sell. prctyp Price type: LMT, MKT, SL-LMT, SL-MKT. ret Order validity: DAY, IOC or EOS. fillshares Quantity filled so far. avgprc Average fill price across the filled quantity. rejreason Why the order was rejected, in plain text. exchordid The exchange's own order number. cancelqty Quantity cancelled, for a cancelled order. remarks The tag you sent when placing the order. dscqty Disclosed quantity. trgprc Trigger price. uid User ID. actid Account ID. bpprc Book-profit price. Bracket orders only. blprc Book-loss price. Cover and bracket orders only. trailprc Trailing price. Cover and bracket orders only. amo Yes when the order is an after-market order. pp Price precision - the number of decimal places to display. ti Tick size - the smallest valid price increment. ls Lot size. token Contract token. norentm Infinn timestamp. ordenttm Order entry time. exch_tm Exchange update time, formatted dd-mm-YYYY hh:MM:SS. tsym2 Trading symbol of the second leg. trantype2 Transaction type of the second leg. qty2 Quantity of the second leg. prc2 Price of the second leg. fillshares2 Quantity filled on the second leg. avgprc2 Average fill price on the second leg. dname2 Broker-specific display name for the second leg. tsym3 Trading symbol of the third leg. trantype3 Transaction type of the third leg. qty3 Quantity of the third leg. prc3 Price of the third leg. fillshares3 Quantity filled on the third leg. avgprc3 Average fill price on the third leg. dname3 Broker-specific display name for the third leg. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ### Single Order History POST https://api.infinn.in/NorenWClientAPI/SingleOrdHist Returns every state one order has passed through. Request fields (inside the jData JSON string): uid required Logged-in user ID. norenordno required Order number assigned by Infinn's order management system. Example body: jData={"uid":"IN001","norenordno":"24010100000001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno Infinn order number. exch Exchange segment. tsym Trading symbol the order was placed on. qty Order quantity. prc Order price. prd Product. Display it using s_prdt_ali from UserDetails. s_prdt_ali Product display name. status Order status. One of PENDING, OPEN, COMPLETE, CANCELED, REJECTED, TRIGGER_PENDING. trantype B for buy, S for sell. prctyp Price type: LMT, MKT, SL-LMT, SL-MKT. ret Order validity: DAY, IOC or EOS. fillshares Quantity filled so far. avgprc Average fill price across the filled quantity. rejreason Why the order was rejected, in plain text. exchordid The exchange's own order number. cancelqty Quantity cancelled, for a cancelled order. remarks The tag you sent when placing the order. dscqty Disclosed quantity. trgprc Trigger price. uid User ID. actid Account ID. bpprc Book-profit price. Bracket orders only. blprc Book-loss price. Cover and bracket orders only. trailprc Trailing price. Cover and bracket orders only. amo Yes when the order is an after-market order. pp Price precision - the number of decimal places to display. ti Tick size - the smallest valid price increment. ls Lot size. token Contract token. norentm Infinn timestamp. ordenttm Order entry time. exch_tm Exchange update time, formatted dd-mm-YYYY hh:MM:SS. rpt Report type -- the event this row records, for example New, PendingNew, Fill or Rejected. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "norenordno": "20121300065716", "uid": "IN001", "actid": "IN001", "exch": "NSE", "tsym": "ACCELYA-EQ", "qty": "180", "trantype": "B", "prctyp": "LMT", "ret": "DAY", "token": "7053", "prc": "800.00", "avgprc": "800.00", "prd": "M", "status": "COMPLETE", "rpt": "Fill", "fillshares": "180", "norentm": "19:59:32 13-12-2020", "remarks": "WC TEST Order", "exchordid": "6858" }, { "stat": "Ok", "norenordno": "20121300065716", "status": "OPEN", "rpt": "New", "prc": "800.00", "qty": "180", "norentm": "19:59:32 13-12-2020" }, { "stat": "Ok", "norenordno": "20121300065716", "status": "PENDING", "rpt": "PendingNew", "norentm": "19:59:32 13-12-2020" }, { "stat": "Ok", "norenordno": "20121300065716", "status": "PENDING", "rpt": "NewAck", "norentm": "19:59:32 13-12-2020" } ] NOTE: Rows arrive newest first -- In the published sample the first element is the final Fill and the last is the initial NewAck. Reverse the array to read the lifecycle forwards. NOTE: Use Single Order Status if you only want the current state -- Single Order Status returns a one-element array with the latest state, which is cheaper to call and simpler to parse. ### Single Order Status POST https://api.infinn.in/NorenWClientAPI/SingleOrdStatus Returns the current state of one order. Request fields (inside the jData JSON string): uid required Logged-in user ID. norenordno required Order number assigned by Infinn's order management system. actid required Account ID the order was placed for. exch required Exchange the order was placed on. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX Example body: jData={"uid":"IN001","norenordno":"24010100000001","actid":"IN001","exch":"NSE"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno Infinn order number. exch Exchange segment. tsym Trading symbol the order was placed on. qty Order quantity. prc Order price. prd Product. Display it using s_prdt_ali from UserDetails. s_prdt_ali Product display name. status Order status. One of PENDING, OPEN, COMPLETE, CANCELED, REJECTED, TRIGGER_PENDING. trantype B for buy, S for sell. prctyp Price type: LMT, MKT, SL-LMT, SL-MKT. ret Order validity: DAY, IOC or EOS. fillshares Quantity filled so far. avgprc Average fill price across the filled quantity. rejreason Why the order was rejected, in plain text. exchordid The exchange's own order number. cancelqty Quantity cancelled, for a cancelled order. remarks The tag you sent when placing the order. dscqty Disclosed quantity. trgprc Trigger price. uid User ID. actid Account ID. bpprc Book-profit price. Bracket orders only. blprc Book-loss price. Cover and bracket orders only. trailprc Trailing price. Cover and bracket orders only. amo Yes when the order is an after-market order. pp Price precision - the number of decimal places to display. ti Tick size - the smallest valid price increment. ls Lot size. token Contract token. norentm Infinn timestamp. ordenttm Order entry time. exch_tm Exchange update time, formatted dd-mm-YYYY hh:MM:SS. rpt Report type. st_intrn Internal status. rejby Which system rejected the order, when rejected. kidid Kid ID. src_uid Source user ID. pan PAN. introp_exch Interoperable exchange segment. ordersource Order source. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "norenordno": "23072300000001", "kidid": "1", "uid": "IN001", "actid": "IN001", "exch": "NSE", "tsym": "ACC-EQ", "qty": "250", "trantype": "S", "prctyp": "LMT", "ret": "DAY", "rejby": "RED", "ordersource": "WEB", "token": "22", "pp": "2", "ls": "1", "ti": "0.05", "prc": "2400.00", "dscqty": "0", "s_prdt_ali": "Regular", "prd": "M", "status": "REJECTED", "st_intrn": "REJECTED", "rpt": "Rejected", "ordenttm": "1690107153", "norentm": "15:42:33 23-07-2023", "remarks": "WC TEST Order", "rejreason": "RED:RULE:{Check circuit limit including square off order}Current:INR 2,400.00 LowerCircuit:INR 1,590.05 UpperCircuit:INR 1,943.35:NSE.ACC-EQ for C-IN001 [DEFAULT]", "introp_exch": "EQT" } ] NOTE: An array of exactly one element -- The response is a JSON array containing a single object. The API specification explains this is deliberate, so code written against Single Order History can switch to this endpoint without changing how it parses the result. NOTE: rejreason is worth surfacing verbatim -- The sample shows how specific it gets: the circuit limits that were breached, the instrument, and the account. Show it to the user rather than replacing it with a generic message. ### Trade Book POST https://api.infinn.in/NorenWClientAPI/TradeBook Returns today's executed trades. Request fields (inside the jData JSON string): uid required Logged-in user ID. actid required Account ID of the logged-in user. Example body: jData={"uid":"IN001","actid":"IN001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno Infinn order number this trade belongs to. exch Exchange segment. tsym Trading symbol. qty Order quantity. prd Product. s_prdt_ali Product display name. trantype B for buy, S for sell. prctyp Price type. ret Order validity. prc Order price. fillshares Total filled quantity for the order. avgprc Average fill price. flid Fill ID - identifies this individual trade. flqty Quantity filled by this trade. flprc Price this trade filled at. fltm Fill time. exchordid Exchange order number. remarks The tag sent when placing the order. uid User ID. actid Account ID. token Contract token. pp Price precision. ti Tick size. ls Lot size. mult Multiplier. cstFrm Custom firm. ordersource Order source. norentm Infinn timestamp. exch_tm Exchange update time. snoordt 0 for the profit leg, 1 for the stop-loss leg. snonum Child-order sequence number, for products H and B. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "norenordno": "20121300065715", "uid": "IN001", "actid": "IN001", "exch": "NSE", "tsym": "ACCELYA-EQ", "prctyp": "LMT", "ret": "DAY", "prd": "M", "trantype": "S", "qty": "180", "token": "7053", "fillshares": "180", "flqty": "180", "flid": "102", "fltm": "01-01-1980 00:00:00", "prc": "800.00", "flprc": "800.00", "pp": "2", "ls": "1", "ti": "0.05", "norentm": "19:59:32 13-12-2020", "exch_tm": "01-01-1980 00:00:00", "remarks": "WC TEST Order", "exchordid": "6857" } ] NOTE: One order can produce several trade rows -- A large order often fills in pieces. Each piece is its own trade with its own flid, flqty and flprc, but they all share one norenordno. Group by order number to reconcile. ### Order Margin POST https://api.infinn.in/NorenWClientAPI/GetOrderMargin Tells you whether one order would pass the margin check, and what it would cost. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. actid required Account ID of the logged-in user. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX tsym required Trading symbol: the unique identifier of the contract. URL-encode it to avoid errors with symbols that contain special characters, such as M&M. qty required Order quantity. prc required Order price. Send "0" when prctyp is MKT or SL-MKT. trgprc optional Trigger price. Send only for SL-LMT and SL-MKT orders. prd required Product type. Choose from the prarr array returned by UserDetails, and check it is permitted for the chosen exchange. one of: C, I, M, H, B, S, P trantype required Transaction type. one of: B, S prctyp required Price type (order type). one of: LMT, MKT, SL-LMT, SL-MKT blprc optional Book-loss price. Applies only when prd is H (cover) or B (bracket). rorgqty optional Open order quantity. Only for a modify-order calculation. fillshares optional Quantity already filled. Only for a modify-order calculation. rorgprc optional Open order price. Only for a modify-order calculation. orgtrgprc optional Open order trigger price. Only for a modify-order calculation. norenordno optional Order number. Only for modifying an H or B order. snonum optional Sequence number. Only for modifying an H or B order. rms_exch optional Optional. rms_seg optional Optional. rms_prd optional Optional. Example body: jData={"uid":"IN001","actid":"IN001","exch":"NSE","tsym":"RELIANCE-EQ","qty":"1","prc":"1000","prd":"C","trantype":"B","prctyp":"LMT"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. remarks The verdict. See the table below for the documented values and what each one means. cash Total credits available for the order. marginused Meaning depends on remarks -- see below. ordermargin Margin required for this order. marginusedprev Margin used excluding this order. emsg Human-readable reason for the failure. WARNING: marginused means two different things -- On Order Success it is the margin that would be used. On Insufficient Balance it is the shortfall still needed. Branch on remarks before you label this number in your UI, or you will show customers a number that means the opposite of its caption. ### Basket Margin POST https://api.infinn.in/NorenWClientAPI/GetBasketMargin Calculates the combined margin for several orders taken together. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. actid required Account ID of the logged-in user. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX tsym required Trading symbol: the unique identifier of the contract. URL-encode it to avoid errors with symbols that contain special characters, such as M&M. qty required Order quantity. prc required Order price. Send "0" when prctyp is MKT or SL-MKT. trgprc optional Trigger price. Send only for SL-LMT and SL-MKT orders. prd required Product type. Choose from the prarr array returned by UserDetails, and check it is permitted for the chosen exchange. one of: C, I, M, H, B, S, P trantype required Transaction type. one of: B, S prctyp required Price type (order type). one of: LMT, MKT, SL-LMT, SL-MKT blprc optional Book-loss price. Applies only when prd is H (cover) or B (bracket). rorgqty optional Open order quantity. Only for a modify-order calculation. fillshares optional Quantity already filled. Only for a modify-order calculation. rorgprc optional Open order price. Only for a modify-order calculation. orgtrgprc optional Open order trigger price. Only for a modify-order calculation. norenordno optional Order number. Only for modifying an H or B order. snonum optional Sequence number. Only for modifying an H or B order. basketlists optional The remaining orders in the basket, as an array of JSON objects. The fields sent at the top level count as the first order. Example body: jData={"uid":"IN001","actid":"IN001","exch":"NSE","tsym":"RELIANCE-EQ","qty":"1","prc":"1000","prd":"C","trantype":"B","prctyp":"LMT"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. remarks Rejection reason, when there is one. marginused Total margin used. marginusedtrade Margin used after the trade. emsg Human-readable reason for the failure. WARNING: Call Limits first, or the numbers are meaningless -- The documented arithmetic is relative to your existing margin usage, which only Limits can tell you. Without it you cannot separate this basket's margin from what you were already using. NOTE: How to turn the response into the two numbers users want -- Let mu be marginused from Limits. Excluding existing margin: post-trade margin = marginusedtrade − mu and basket margin = marginused − mu. Including existing margin: post-trade margin = marginusedtrade and basket margin = marginused. NOTE: The first order goes at the top level -- Counter-intuitively, you do not put all the orders in basketlists. The first order's fields go directly in jData, and basketlists carries the rest. ### Get Basket Optimal Sequence POST https://api.infinn.in/NorenWClientAPI/GetBasketOptSeq Returns the order in which a basket's legs should be sent to keep margin lowest. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. actid required Account ID of the logged-in user. exch required Exchange segment. Choose from the exarr array returned by UserDetails. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX trantype required Transaction type. one of: B, S prd required Product name. one of: C, I, M, H, B, F tsym required Trading symbol: the unique identifier of the contract. URL-encode it to avoid errors with symbols that contain special characters, such as M&M. qty required Order quantity. prc required Order price. Send "0" when prctyp is MKT or SL-MKT. prctyp required Price type. one of: LMT, MKT, SL-LMT, SL-MKT basketlists optional The remaining orders in the basket, as an array of JSON objects. The top-level fields count as the first order. Example body: jData={"uid":"IN001","actid":"IN001","exch":"NSE","trantype":"B","prd":"C","tsym":"RELIANCE-EQ","qty":"1","prc":"1000","prctyp":"LMT"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. remarks Rejection reasons, when present. marginused Total margin used. marginusedtrade Margin used after the trade. marginusedprev Margin used excluding this order. msg_str The sequence in which the basket legs should be entered. Values are leg indices as strings. bkt_mar_list Running basket margin per order. See below. emsg Human-readable reason for the failure. Example success: { "request_time": "10:34:42 20-02-2025", "stat": "Ok", "marginused": "31152740.27", "marginusedtrade": "6234185.41", "marginusedprev": "0.00", "msg_str": ["1", "0", "2"], "bkt_mar_list": [ { "bkt_mar": "24965945.14" }, { "bkt_mar": "24965945.14" }, { "bkt_mar": "31152740.27" } ] } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } NOTE: msg_str holds indices, not symbols -- In the sample, ["1", "0", "2"] means: send leg 1 first, then leg 0, then leg 2. The legs are numbered with the top-level order as 0 and basketlists continuing from 1. ## Positions & holdings What you currently hold, from today's trading and from before. ### Positions Book POST https://api.infinn.in/NorenWClientAPI/PositionBook Returns today's open positions with profit and loss. Request fields (inside the jData JSON string): uid required Logged-in user ID. actid required Account ID of the logged-in user. Example body: jData={"uid":"IN001","actid":"IN001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. exch Exchange segment. tsym Trading symbol. token Contract token. uid User ID. actid Account ID. prd Product. s_prdt_ali Product display name. netqty Net position quantity. Positive is long, negative is short. netavgprc Net position average price. dayavgprc Day average price. daybuyqty Quantity bought today. daysellqty Quantity sold today. daybuyavgprc Average buy price today. daysellavgprc Average sell price today. daybuyamt Value bought today. daysellamt Value sold today. cfbuyqty Carry-forward buy quantity. cfsellqty Carry-forward sell quantity. cfbuyavgprc Carry-forward buy average price. cfsellavgprc Carry-forward sell average price. cfbuyamt Carry-forward buy value. cfsellamt Carry-forward sell value. cforgavgprc Original average price. totbuyamt Total buy value. totsellamt Total sell value. totbuyavgprc Total buy average price. totsellavgprc Total sell average price. openbuyqty Open buy quantity. opensellqty Open sell quantity. openbuyamt Open buy value. opensellamt Open sell value. openbuyavgprc Open buy average price. opensellavgprc Open sell average price. lp Last traded price. rpnl Realised profit and loss. urmtom Unrealised mark-to-market. Recompute on each price tick as netqty * (lp - netavgprc) * prcftr. bep Break-even price. mult Contract price multiplier, used for order-value maths. prcftr Price factor, gnpn / (gdpd). pp Price precision. ti Tick size. ls Lot size. instname Instrument name. upldprc Upload price. netupldprc Net upload price. dname Broker-specific display name. cname Company name. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "uid": "IN001", "actid": "IN001", "exch": "NSE", "tsym": "ACC-EQ", "pp": "2", "ls": "1", "ti": "5.00", "mult": "1", "prcftr": "1.000000", "daybuyqty": "2", "daysellqty": "2", "daybuyamt": "2610.00", "daybuyavgprc": "1305.00", "daysellamt": "2610.00", "daysellavgprc": "1305.00", "cfbuyqty": "0", "cfsellqty": "0", "openbuyqty": "0", "opensellqty": "23", "opensellamt": "30015.00", "opensellavgprc": "1305.00", "netqty": "0", "netavgprc": "0.00", "lp": "0.00", "urmtom": "0.00", "rpnl": "0.00", "cforgavgprc": "0.00" } ] Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "request_time": "14:14:11 26-05-2020", "emsg": "Error Occurred : 5 \"no data\"" } WARNING: Never poll this in a loop -- The API specification is explicit: use this as a single call to seed your state, not in a while loop. For live mark-to-market, take prices from the WebSocket feed and recompute locally. NOTE: MTM and P&L are not the same number -- Both use the same unrealised formula but a different average price: MTM uses netavgprc, while P&L uses netupldprc (falling back to netavgprc when it is 0). The full documented arithmetic is on the profit and loss page. NOTE: prarr appears where prd is documented -- The published sample contains "prarr": "C" where the field table documents prd. Handle both keys. ### Interoperable Positions Book POST https://api.infinn.in/NorenWClientAPI/InteropPositionBook Returns positions consolidated across interoperable exchanges. Request fields (inside the jData JSON string): actid required Account ID of the logged-in user. Example body: jData={"actid":"IN001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. exch Exchange segment. tsym Trading symbol. token Contract token. uid User ID. actid Account ID. prd Product. s_prdt_ali Product display name. netqty Net quantity: daybuyqty + cfbuyqty - daysellqty - cfsellqty. netavgprc Net average price. daybuyqty Quantity bought today. daysellqty Quantity sold today. daybuyamt Value bought today. daysellamt Value sold today. cfbuyqty Carry-forward buy quantity. cfsellqty Carry-forward sell quantity. cfbuyamt Carry-forward buy value. cfsellamt Carry-forward sell value. openbuyqty Open buy quantity. opensellqty Open sell quantity. openbuyamt Open buy value. opensellamt Open sell value. buyavgprc Buy average price: (daybuyamt + cfbuyamt) / (daybuyqty + cfbuyqty). sellavgprc Sell average price: (daysellamt + cfsellamt) / (daysellqty + cfsellqty). totbuyamt Total buy value. totsellamt Total sell value. totbuyavgprc Total buy average price. totsellavgprc Total sell average price. openbuyavgprc Open buy average price. opensellavgprc Open sell average price. cfbuyavgprc Carry-forward buy average price. cfsellavgprc Carry-forward sell average price. rpnl Realised profit and loss. urmtom Unrealised mark-to-market. instname Instrument name. upload_prc Upload price. mult Multiplier. prcftr Price factor. child_orders The per-exchange breakdown. See below. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "request_time": "14:14:11 26-05-2020", "emsg": "Error Occurred : 5 \"no data\"" } WARNING: The sample response has exch and token swapped -- The published sample shows "exch": "EQT" (a segment, not an exchange) and "token": "PRAKASH" (a name, not a number) at the top level, while the child_orders entries beneath it are correct. Trust the field table and the child rows over the top-level sample. ### Product Conversion POST https://api.infinn.in/NorenWClientAPI/ProductConversion !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Converts an open position from one product type to another. Request fields (inside the jData JSON string): exch required Exchange. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX tsym required Trading symbol. Must match the original position exactly. URL-encode special characters. qty required Quantity to convert. uid required User ID of the logged-in user. actid required Account ID. prd required The product to convert the position to. one of: C, I, M, H, B, S, P prevprd required The position's current product. one of: C, I, M, H, B, S, P trantype required Transaction type. one of: B, S postype required Whether you are converting the day position or the carry-forward position. one of: Day, CF ordersource required For logging. one of: API, WEB, MOB, TT Example body: jData={"exch":"NSE","tsym":"RELIANCE-EQ","qty":"1","uid":"IN001","actid":"IN001","prd":"C","prevprd":"I","trantype":"B","postype":"Day","ordersource":"API"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "10:52:12 02-06-2020", "stat": "Ok" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Invalid Input : Invalid Position Type" } WARNING: Converting changes your margin requirement -- Moving a position from intraday to delivery typically requires substantially more margin, and the conversion is refused if you do not have it. Check Limits first. NOTE: The response carries no confirmation detail -- On success the response is just stat and request_time -- there is no echo of what was converted. Re-read Positions Book to confirm the new state. ### Holdings POST https://api.infinn.in/NorenWClientAPI/Holdings Returns long-term holdings sitting in the demat account. Request fields (inside the jData JSON string): uid required Logged-in user ID. actid required Account ID of the logged-in user. prd required Product name. one of: C, I, M, H, B, S, P Example body: jData={"uid":"IN001","actid":"IN001","prd":"C"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. exch_tsym The instrument, as an array of objects. See below. It is an array because one holding can be listed on several exchanges. holdqty Holding quantity. dpqty Depository participant holding quantity. npoadqty Non-POA display quantity. npoadt1qty Non-POA display T+1 quantity. colqty Collateral quantity. benqty Beneficiary quantity. unplgdqty Unpledged quantity. brkcolqty Broker collateral quantity. btstqty Buy-today-sell-tomorrow quantity. btstcolqty BTST collateral quantity. usedqty Holding used today. upldprc Average price uploaded with the holdings. hair_cut Haircut. brk_hair_cut Broker haircut. prd Product. s_prdt_ali Product display name. trdqty Trade quantity. sell_amt Sell amount. epi_done_qty EPI done quantity. combrkcollqty Commodity broker collateral quantity. eqtbrkcollqty Equity broker collateral quantity. derbrkcollqty Derivative broker collateral quantity. fxbrkcollqty Currency broker collateral quantity. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "exch_tsym": [ { "exch": "NSE", "token": "13", "tsym": "ABB-EQ" } ], "holdqty": "2000000", "colqty": "200", "btstqty": "0", "btstcolqty": "0", "usedqty": "0", "upldprc": "1800.00" }, { "stat": "Ok", "exch_tsym": [ { "exch": "NSE", "token": "22", "tsym": "ACC-EQ" } ], "holdqty": "2000000", "colqty": "200", "btstqty": "0", "btstcolqty": "0", "usedqty": "0", "upldprc": "1400.00" } ] Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Invalid Input : Missing uid or actid or prd." } NOTE: There is no single "how many do I own" field -- The quantity is spread across a dozen buckets, and the two numbers you actually want must be computed. Infinn documents both: valuation quantity = btstqty + holdqty + brkcolqty + unplgdqty + benqty + max(npoadqty, dpqty) − usedqty; saleable quantity = btstqty + holdqty + unplgdqty + benqty + dpqty − usedqty. Note that brkcolqty counts towards value but not towards what you can sell. NOTE: lp is off by default -- The last traded price inside exch_tsym is disabled unless Infinn enables it for your account. Without it you must fetch prices separately to value the holding. ### Holdings Conversion POST https://api.infinn.in/NorenWClientAPI/HoldingsConv !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Converts a holding between product types. Request fields (inside the jData JSON string): uid required Logged-in user ID. actid required Account ID of the logged-in user. prd required The product to convert to. one of: C, I, M, H, B, S, P isin required ISIN of the instrument. Example body: jData={"uid":"IN001","actid":"IN001","prd":"C","isin":"INE002A01018"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. NOTE: Identified by ISIN, not by trading symbol -- Unlike every other order-related endpoint, this one identifies the instrument by isin. Get it from Get Quotes. ## Funds & limits Cash, collateral, margin utilisation and withdrawal limits. ### Limits POST https://api.infinn.in/NorenWClientAPI/Limits Returns cash, collateral, margin used and risk limits. Request fields (inside the jData JSON string): uid required Logged-in user ID. actid required Account ID of the logged-in user. prd optional Product name. one of: C, I, M, H, B, S, P s_prdt_ali optional Product display name. seg optional Segment. one of: EQT, DER, FX, COM exch optional Exchange. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX Example body: jData={"uid":"IN001","actid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. actid Account ID. prd Product name. seg Segment: EQT, DER, FX or COM. exch Exchange. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "18:07:31 29-05-2020", "stat": "Ok", "cash": "1500000000000000.00", "payin": "0.00", "payout": "0.00", "brkcollamt": "0.00", "unclearedcash": "0.00", "daycash": "0.00", "turnoverlmt": "50000000000000.00", "pendordvallmt": "2000000000000000.00", "turnover": "3915000.00", "pendordval": "2871000.00", "marginused": "3945540.00", "mtomcurper": "0.00", "urmtom": "30540.00", "grexpo": "3915000.00", "uzpnl_e_i": "15270.00", "uzpnl_e_m": "61080.00", "uzpnl_e_c": "-45810.00" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Server Timeout : " } NOTE: There is no "available balance" field -- you compute it -- Infinn documents the arithmetic: total credits = cash + payin + payout + daycash + unclearedcash + brkcollamt + collateral + aux_brkcollamt, and available margin = total credits − marginused. marginused alone is your utilisation. WARNING: Two fields in the formula are not in the field table -- collateral and aux_brkcollamt appear in the documented formula but have no entry in the published response field list, and neither appears in the sample payload. Treat them as absent-and-zero unless your live response contains them. Documentation information not available. NOTE: The sample contains undocumented keys -- urmtom and grexpo appear in the sample response but not in the documented field tables. ### Get Sub Limits POST https://api.infinn.in/NorenWClientAPI/GetSubLimits Returns limits broken down to a finer level than Limits. Request fields (inside the jData JSON string): uid required Logged-in user ID. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. ### Get Max Payout Amount POST https://api.infinn.in/NorenWClientAPI/GetMaxPayoutAmount Returns the largest amount the user may withdraw right now. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. actid required Account ID of the logged-in user. seg optional Segment. Send this if limits are managed per segment. one of: EQT, DER, FX, COM exch optional Exchange. Send this if limits are managed per exchange. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX prd optional Product. Send this if limits are set per product. one of: C, I, M, H, B, S, P Example body: jData={"uid":"IN001","actid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. actid Account ID. payout Maximum payout amount. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Human-readable reason for the failure. Example success: { "request_time": "15:52:26 10-05-2021", "stat": "Ok", "actid": "C-IN001", "payout": "21200.20" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } NOTE: Documented twice in the source -- This endpoint appears under both Funds and Holdings and Limits in the API specification. The Holdings version additionally documents the optional seg, exch and prd filters, which are included above. ### Get Content Basket POST https://api.infinn.in/NorenWClientAPI/GetContentBasket Lists the scanner baskets available on an exchange. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. exch required Exchange name. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX Example body: jData={"uid":"IN001","exch":"NSE"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. basketlists The available baskets. emsg Human-readable reason for the failure. Example success: { "request_time": "18:51:38 25-06-2021", "stat": "Ok", "basketlists": [ { "basket": "NSEEQ" }, { "basket": "BSEEQ" }, { "basket": "A" } ] } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } ### Get Content List POST https://api.infinn.in/NorenWClientAPI/GetContentList Runs a market scan and returns the instruments that match. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. exch required Exchange name. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX condition_name required The scan condition to apply. one of: UpperCircuit, LowerCircuit, OpenHigh, OpenLow, HighBreak, LowBreak basket optional Basket name to restrict the scan to. Example body: jData={"uid":"IN001","exch":"NSE","condition_name":"UpperCircuit"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. tsym Trading symbol. lp Last traded price. c Close price. h High price. l Low price. ap Average traded price. v Volume. ltt Last trade time. pc Percentage change. emsg Human-readable reason for the failure. Example success: [ { "request_time": "18:51:38 25-06-2021", "stat": "Ok", "tsym": "AUROPHARMA-EQ", "lp": "1450.00", "c": "0.00", "h": "0.00", "l": "0.00", "ap": "0.00", "v": "0", "ltt": "05:30:00", "Pc": "0.00" } ] WARNING: pc is capitalised in the sample -- The field table documents pc, but the published sample returns "Pc". Read it case-insensitively. ## GTT orders Orders that wait for a price condition before firing, and survive past today. ### Place GTT Order POST https://api.infinn.in/NorenWClientAPI/PlaceGTTOrder !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Creates a Good Till Triggered order that waits for a price condition. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. tsym required Trading symbol. exch required Exchange segment. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX ai_t required Alert type. validity required Alert validity. one of: DAY, GTT d optional The value to compare against the last traded price. remarks required Any message entered during order entry. trantype required Transaction type. one of: B, S prctyp required Price type (order type). one of: LMT, MKT, SL-LMT, SL-MKT, DS, 2L, 3L prd required Product name. one of: C, I, M, H, B, S, P ret required Retention type: how long the order stays live. Offer only the values the chosen exchange permits. one of: DAY, IOC, EOS actid required Account ID of the logged-in user. qty required Order quantity. prc required Order price. Send "0" when prctyp is MKT or SL-MKT. dscqty optional Disclosed quantity. Capped at 10% of qty on NSE and 50% on MCX. Example body: jData={"uid":"IN001","tsym":"RELIANCE-EQ","exch":"NSE","ai_t":"LTP_A","validity":"DAY","remarks":"my-order-tag","trantype":"B","prctyp":"LMT","prd":"C","ret":"DAY","actid":"IN001","qty":"1","prc":"1000"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. al_id The new GTT order's ID. Keep it -- you need it to modify or cancel the GTT. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Error message. The documented values are Invalid Input and Session Expired. Example success: { "request_time": "10:02:06 15-04-2021", "stat": "Oi created", "Al_id": "21041500000010" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } WARNING: stat is NOT "Ok" on this family of endpoints -- Every other Infinn endpoint returns stat: "Ok". The GTT endpoints return a sentence instead: "Oi created" here, "Oi Replacedt" from Modify GTT Order (including that typo), and "Oi delete success" from Cancel GTT Order. Code that tests stat === "Ok" will treat every successful GTT call as a failure. Test for the absence of emsg, or for stat !== "Not_Ok", instead. WARNING: al_id comes back capitalised -- The field table documents al_id, but the published sample response returns "Al_id". Read it case-insensitively. ### Modify GTT Order POST https://api.infinn.in/NorenWClientAPI/ModifyGTTOrder !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Changes an existing GTT order's trigger or order details. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. tsym required Trading symbol. exch required Exchange segment. one of: NSE, NFO, BSE, BFO, CDS, MCX, NCX ai_t required Alert type. al_id optional Alert ID. validity required Alert validity. one of: DAY, GTT d optional The value to compare against the last traded price. remarks required Any message entered during order entry. trantype required Transaction type. one of: B, S prctyp required Price type (order type). one of: LMT, MKT, SL-LMT, SL-MKT, DS, 2L, 3L prd required Product name. one of: C, I, M, H, B, S, P ret required Retention type: how long the order stays live. Offer only the values the chosen exchange permits. one of: DAY, IOC, EOS actid required Account ID of the logged-in user. qty required Order quantity. prc required Order price. Send "0" when prctyp is MKT or SL-MKT. dscqty optional Disclosed quantity. Capped at 10% of qty on NSE and 50% on MCX. Example body: jData={"uid":"IN001","tsym":"RELIANCE-EQ","exch":"NSE","ai_t":"LTP_A","validity":"DAY","remarks":"my-order-tag","trantype":"B","prctyp":"LMT","prd":"C","ret":"DAY","actid":"IN001","qty":"1","prc":"1000"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. al_id Alert ID. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Error message. Example success: { "request_time": "12:15:18 15-04-2021", "stat": "Oi Replacedt", "Al_id": "21041500000008" } WARNING: The success value contains a typo in the API itself -- The documented success response is stat: "Oi Replacedt" -- with the stray t. Do not "fix" it in your comparison; match what the API actually sends, or better, branch on the absence of emsg. NOTE: al_id is documented as optional here -- Unusually for a modify operation, al_id is not marked required in the published request table, although it is the only thing identifying which GTT to change. Send it. ### Cancel GTT Order POST https://api.infinn.in/NorenWClientAPI/CancelGTTOrder !! CHANGES STATE -- this places orders or moves real money. On live this places orders or moves real money. Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Cancels a pending GTT order. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. al_id required Alert ID. Example body: jData={"uid":"IN001","al_id":"21040800000008"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. al_id Alert ID. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. emsg Error message. Example success: { "request_time": "12:20:01 15-04-2021", "stat": "Oi delete success", "Al_id": "21041500000013" } Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Session Expired : Invalid Session Key" } ### Get Pending GTT Orders POST https://api.infinn.in/NorenWClientAPI/GetPendingGTTOrder Lists GTT orders that are still waiting to trigger. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. Example body: jData={"uid":"IN001"} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. ai_t Alert type. al_id Alert ID. tsym Trading symbol. exch Exchange segment. token Contract token. remarks The message entered during order entry. validity DAY or GTT. d The value compared against the last traded price. trantype B for buy, S for sell. prctyp Price type. prd Product name. ret Retention type. actid Account ID. qty Order quantity. prc Order price. emsg Error message. Example success: [ { "stat": "Ok", "ai_t": "LTP_A", "Al_id": "21041500000002", "tsym": "ACC-EQ", "exch": "NSE", "Token": "22", "Remarks": "test", "validity": "DAY", "actid": "IN001", "trantype": "B", "prctyp": "LMT", "Qty": 1, "Prc": "1305.00", "prd": "C", "ordersource": "MOB", "d": "1900.00" } ] WARNING: This sample response is a case-sensitivity minefield -- The published sample mixes cases on five keys -- Al_id, Token, Remarks, Qty and Prc -- against a field table that documents them all in lower case. It also returns Qty as a JSON number while Prc is a string, and includes an undocumented ordersource and a stray "C": "C". Normalise keys to lower case and coerce types defensively. ### Get Enabled GTT Types POST https://api.infinn.in/NorenWClientAPI/GetEnabledGTTs Lists the GTT trigger types enabled for the account. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. ai_ts The enabled alert types. Note that the Infinn field table names this field ai_is, while the sample response returns ai_ts; the sample agrees with the sibling alert-types endpoint (not documented here). emsg Human-readable reason for the failure. Example success: { "stat": "Ok", "request_time": "04062021121503", "ai_ts": [ { "ai_t": "ATP" }, { "ai_t": "LTP" } ] } NOTE: request_time uses a different format here -- Most endpoints return HH:MM:SS dd-mm-yyyy. This one returns an unseparated ddmmyyyyHHMMSS string (04062021121503). Parse per endpoint, not globally. ### Get Unsettled Trading Dates POST https://api.infinn.in/NorenWClientAPI/GetUnStledTradingDate Lists trading dates that have not yet settled. Request fields (inside the jData JSON string): uid required User ID of the logged-in user. Example body: jData={"uid":"IN001"} Response (JSON object): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. request_time The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy. trd_date The unsettled trade dates. emsg Human-readable reason for the failure. Example success: { "stat": "Ok", "Request_time": "10052021152900", "trd_date": [ { "trd_date": "28-04-2021" }, { "trd_date": "29-04-2021" }, { "trd_date": "30-04-2021" } ] } NOTE: Nested key reuse, and a capitalised request_time -- The array is called trd_date and so is the field inside each of its objects. The sample also returns "Request_time" with a capital R, in the unseparated date format. ## Reports Order and trade history over a date range -- the only way to see anything older than today. ### Get Order Report POST https://api.infinn.in/NorenWClientAPI/GetOrderReport Returns historical orders over a date range. Request fields (inside the jData JSON string): actid required Account ID. from_date required Start of the date range, formatted dd-mm-yyyy. to_date required End of the date range, formatted dd-mm-yyyy. brkname optional Broker ID of the logged-in user. Send the key with an empty value unless you have a specific broker ID to pass. Send the key with an empty string when unused; do not omit it. Example body: jData={"actid":"IN001","from_date":"01-04-2026","to_date":"30-04-2026","brkname":""} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno Infinn order number. kidid Kid ID. status Order status, for example New, Replaced, Complete or Rejected. rpt Report type, for example Fill or Complete. uid Logged-in user ID. actid Account ID. token Contract token. cname Company name. symname Symbol name. instname Instrument name. exch Exchange. seg Segment. optt Option type. isin ISIN. ls Lot size. tsym Trading symbol. ordersource Order source. trantype Transaction type. prctyp Price type. ret Order retention type. prd Product name. s_prdt_ali Product display name. qty Order quantity. prc Order price. norentm Infinn timestamp. exchordid Exchange order number. rejreason Rejection reason, if rejected. cancelqty Cancelled quantity. brkname Broker ID. brnchid Branch ID. fillshares Total filled quantity. flprc Fill price. trgprc Trigger price. avgprc Average fill price. strprc Strike price. ti Tick size. prcftr_d Price factor, as ((GN / GD) * (PN / PD)). tsym2 Trading symbol of the second leg. trantype2 Transaction type of the second leg. tsym3 Trading symbol of the third leg. trantype3 Transaction type of the third leg. emsg Human-readable reason for the failure. Example success: [ { "stat": "Ok", "norenordno": "22061700002476", "kidid": "1", "status": "COMPLETE", "rpt": "Fill", "uid": "NARESHDEL", "actid": "IN001", "token": "3435", "cname": "NULL", "symname": "BBOX", "instname": "EQ", "exch": "NSE", "seg": "EQT", "optt": "NULL", "isin": "NULL", "ls": "1", "tsym": "BBOX-EQ", "ordersource": "TT", "trantype": "B", "prctyp": "LMT", "ret": "DAY", "prd": "I", "qty": "10", "prc": "inf", "norentm": "17:08:09 17-06-2022", "exchordid": "81", "rejreason": "NULL", "cancelqty": "0", "brkname": "KSPL", "brnchid": "MANGALORE", "fillshares": "10", "flprc": "inf", "trgprc": "-nan", "avgprc": "inf", "strprc": "-nan", "ti": "inf", "prcftr_d": "(0 / 0 ) * (0 / 0)" } ] Example failure (note the HTTP status is still 200): { "stat": "Not_Ok", "emsg": "Invalid Input : Invalid Position Type" } WARNING: Numeric fields can contain "inf", "-nan" and "NULL" -- This is not a typo in the documentation -- the published sample really does return "prc": "inf", "trgprc": "-nan" and "isin": "NULL" as strings. These are C-library float formatting artefacts leaking through. parseFloat("inf") is NaN in JavaScript and float("inf") is infinity in Python, so guard every numeric parse from this endpoint. ### Get Trade Report POST https://api.infinn.in/NorenWClientAPI/GetTradeReport Returns historical trades over a date range. Request fields (inside the jData JSON string): actid required Account ID. from_date required Start of the date range, formatted dd-mm-yyyy. to_date required End of the date range, formatted dd-mm-yyyy. brkname optional Broker ID of the logged-in user. Send the key with an empty value unless you have a specific broker ID to pass. Send the key with an empty string when unused; do not omit it. Example body: jData={"actid":"IN001","from_date":"01-04-2026","to_date":"30-04-2026","brkname":""} Response (JSON array of objects): stat Ok on success, Not_Ok on failure. Always check this before reading anything else. norenordno Infinn order number. kidid Kid ID. status Order status. rpt Report type. uid Logged-in user ID. actid Account ID. token Contract token. cname Company name. symname Symbol name. instname Instrument name. exch Exchange. seg Segment. optt Option type. isin ISIN. ls Lot size. tsym Trading symbol. ordersource Order source. trantype Transaction type. prctyp Price type. ret Order retention type. prd Product name. s_prdt_ali Product display name. qty Order quantity. prc Order price. norentm Infinn timestamp. exchordid Exchange order number. rejreason Rejection reason, if rejected. cancelqty Cancelled quantity. brkname Broker ID. brnchid Branch ID. fillshares Total filled quantity. flprc Fill price. flqty Fill quantity. trgprc Trigger price. avgprc Average fill price. strprc Strike price. ti Tick size. prcftr_d Price factor. tsym2 Trading symbol of the second leg. trantype2 Transaction type of the second leg. tsym3 Trading symbol of the third leg. trantype3 Transaction type of the third leg. emsg Human-readable reason for the failure. NOTE: Identical to Get Order Report, plus flqty -- The two reports share their entire field list except that the trade report adds flqty, the quantity filled by each individual trade. The same inf / -nan / NULL caveat applies. ## Account & password (not a login method) These four endpoints manage an account password. None of them logs you in or returns a token. Login is OAuth only. POST https://api.infinn.in/NorenWClientAPI/ForgotPassword fields: uid, pan, dob (optional, DDMMYYYY) POST https://api.infinn.in/NorenWClientAPI/FgtPwdOTP fields: uid, pan. Sends an OTP. POST https://api.infinn.in/NorenWClientAPI/ValOTPStPwd fields: uid, otp, pwd (new password) POST https://api.infinn.in/NorenWClientAPI/Changepwd fields: uid, oldpwd (SHA-256 of current), pwd (new) ## WebSocket Endpoints: wss://api.infinn.in/NorenWSTP/ . Connect, then send a connect message; the server replies before it has checked your credentials, so a bad token yields {"t":"ak","s":"NOT_OK"} followed by close code 1008 rather than a failed handshake. Note the value is NOT_OK here, upper case, where REST uses Not_Ok. Feeds send a SNAPSHOT message first (tk, dk, lk) and DELTAS after it (tf, df, lf). A delta contains only the fields that changed. You must merge each delta into the snapshot you are holding; treating a delta as a complete quote gives a quote with most of its fields missing. ### Connect & authenticate Opens the stream and authenticates the session. ### Heartbeat Keeps the connection alive. ### Touchline feed Streams the top-of-book snapshot for one or more instruments. ### Market depth feed Streams five levels of the order book for one or more instruments. ### LTP feed Streams only the last traded price -- the lightest feed. ### Order updates Pushes every change to your orders as it happens. ### Position updates Pushes changes to your open positions. ### Alert updates Pushes notifications when a price alert or GTT triggers. ### Admin messages Pushes administrative messages from the broker. ### Market status updates Pushes changes to each exchange segment's trading status. ## Errors 400 Bad Request The body is not in the form jData={...}.The JSON inside jData does not parse — a trailing comma, a single quote where a double quote belongs, or an unescaped character.Content-Type is not text/plain. FIX: Serialise the JSON with your language's JSON library rather than building the string by hand, then prefix it with jData=.Send Content-Type: text/plain (application/json also works) — see how requests are shaped.URL-encode the symbol VALUE inside the JSON (quote_plus: M&M -> M%26M); raw & or encoding all of jData gives 400. Example symbols: M&M. 403 Forbidden The session expired naturally.The user logged out, or logged in from another client, which invalidated this session. FIX: Discard the stored token — do not retry with it.Send the user through the login flow again to obtain a fresh code, then exchange it with GenAcsTok.Check the call came from your whitelisted static IP. Stop and re-authenticate; never back off and retry. 404 Not Found A typo in the endpoint name. These paths are case-sensitive: /NorenWClientAPI/OrderBook works, /NorenWClientAPI/orderbook does not.You used the wrong base path. Every endpoint lives under /NorenWClientAPI/, including GetBasketOptSeq. FIX: Copy the path from the endpoint's reference page rather than typing it. 405 Method Not Allowed Every endpoint in the Infinn API is POST, including the ones that only read data. A GET to /NorenWClientAPI/OrderBook is a 405. FIX: Use POST everywhere. There are no exceptions across the whole API. 410 Gone An endpoint you are calling has been retired. FIX: Check the endpoint against this reference, and contact Infinn support for the replacement. Do not retry: unlike a 5xx, this will not start working again. 429 Too Many Requests Polling a snapshot endpoint in a loop. Positions Book and Get Quotes are the usual culprits.Fetching quotes per instrument for a long watchlist.Several processes sharing one token without a shared limiter — the limit applies to the account, not the process. FIX: Replace polling with the WebSocket feed. This is the real fix, and it removes the problem rather than slowing it down.Back off exponentially when you do get a 429, with jitter so that parallel workers do not retry in lockstep.Put one rate limiter in front of all your API calls, in a place every process shares.See rate limits for the budget arithmetic. 500 Internal Server Error Not caused by your request. The documentation gives no further detail. FIX: Retry with exponential backoff. If the call was a write — placing, modifying or cancelling an order — do not blindly retry: read the order book first to find out whether it actually took effect. See retrying safely. 502 Bad Gateway The OMS is down or restarting. This is common outside market hours and during scheduled maintenance. FIX: Retry with backoff. Check whether the market is open before assuming a fault — and apply the same caution as for 500 on any write that may have half-completed. 503 Service Unavailable Maintenance or an outage. FIX: Retry with backoff. Surface a clear status to your users rather than letting requests hang. 504 Gateway Timeout The upstream system did not answer quickly enough. FIX: Treat the outcome as unknown. A timeout is not a failure — the order may well have been placed. Reconcile against the order book before retrying anything that sends an order. Session Expired : Invalid Session Key Session expired The token expired, was invalidated by a logout, or was superseded by a login elsewhere. It is the application-layer equivalent of a 403. FIX: Re-run the login flow.Build this into your client as a single check: on any emsg starting Session Expired, clear the stored token and re-authenticate once, rather than retrying the call. Invalid Input : INVALID_VERIFIER Checksum or code rejected The checksum was computed over the wrong string. It must be SHA-256(app_key + secret_key + code) — in that order, concatenated with nothing in between, no spaces and no separators.The code was already used. Login codes work exactly once.The code expired. Its lifetime is short.The hash was uppercased, or sent as raw bytes rather than as lower-case hexadecimal.You used your user ID where the app key belongs. The login URL and the checksum both take the app key. FIX: Verify the concatenation order with a known triple. Worked example (dummy values): app key IN001_U, secret demo-secret-0000, code 7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93 gives the string IN001_Udemo-secret-00007a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93.Log in again for a fresh code — the old one is spent whether or not the call succeeded.Output the digest as lower-case hex. Invalid Input : Missing uid or actid or prd. A required field was omitted The field was genuinely not sent.The field was sent as an empty string. For required fields that is the same as omitting it.A typo in the field name. These are case-sensitive: actid, not actId or ActID.You nested jData inside itself. The body is jData={"uid":"..."}, not jData={"jData":{...}}. FIX: Read the names out of the error message — it tells you exactly which fields are missing.Compare against the parameter table on that endpoint's page; required fields carry a red required badge.Drop optional fields entirely rather than sending them empty. amo is the clearest example: omit it, or send "Yes", but never send it blank. Error Occurred : 2 "invalid input" Generic input rejection A field is present but its value is unacceptable: a price that is not a multiple of the tick size, a quantity that is not a multiple of the lot size, a product code the account is not entitled to use, or an exchange not in your exarr. FIX: Check prc against the instrument's tick size (TickSize in the symbol master, or ti in a quote).Check qty against LotSize for derivatives.Check exch, prd and prctyp against exarr, prarr and orarr from User Details.Call Order Margin with the same values — it often returns a more specific remarks than PlaceOrder's emsg. Error Occurred : 5 "no data" Nothing to return An empty positions book, no quote for that token, no holdings for that product. It is reported as a failure, but in most cases it is an ordinary empty result. FIX: Treat this as "empty", not "broken". Show an empty state, not an error dialog.If you did expect data, check that exch and token actually identify the instrument you had in mind — a token from the wrong exchange returns no data rather than an error. No Data : Search returned nothing The search text matches nothing, or it matches nothing on the exch you restricted the search to. FIX: Try a shorter search string.Drop the exch filter to search all enabled exchanges.Show "no results" in your UI rather than an error. Rejected : ORA:Order not found The order cannot be modified The norenordno is wrong, or belongs to another account.The order is no longer in a modifiable state. Only OPEN and TRIGGER_PENDING orders can be changed — one that has filled, been cancelled or been rejected cannot.It is from a previous trading day. FIX: Read the order's current status with Single Order Status.If it has filled, you cannot modify it — place a new order instead.Expect this error as a normal race: an order can fill in the moment between you reading it as OPEN and your modification arriving. Handle it, do not treat it as a bug. Rejected : ORA:Order not found to Cancel The order cannot be cancelled The order has already filled, already been cancelled, or was rejected. There is nothing left to withdraw. FIX: Check the status first with Single Order Status.For a cover or bracket order, use Exit Cover / Bracket Order instead — plain CancelOrder cannot unwind the linked legs.In a cancel-all routine, log this and carry on rather than aborting the loop. Server Timeout : The trading system did not answer Load or a transient fault in the backend. FIX: Do not assume it failed. For reads, retry. For writes, reconcile first: read the order book and find out what actually happened before sending anything again. A retried order placement can leave you with two positions. Invalid Input : Invalid Position Type Bad postype, or a mismatched report request On Product Conversion: postype must be Day or CF.On the report endpoints, this same message appears as the documented failure sample even though they take no position type — there it most likely signals a malformed date range or brkname. FIX: Send postype as exactly Day or CF.On the reports, check from_date and to_date are dd-mm-yyyy and that brkname matches the value from User Details. Invalid AMO The amo field was sent with the wrong value The API specification is explicit: the message appears “if the amo field is not sent with a Yes value”. Sending amo as an empty string, as "No", as false, or as "yes" in lower case all risk this. FIX: For an after-market order, send exactly "amo": "Yes".For a normal order, omit the field entirely — do not send it blank or set to "No".If you build jData from a struct, make sure the key is dropped rather than serialised as empty when the flag is off. Insufficient funds Rejected by the exchange for margin The account did not have enough margin for the order at the moment it was evaluated. FIX: Call Order Margin before placing. When it returns remarks: "Insufficient Balance", marginused is the shortfall — the extra amount required.Check available margin with Limits: total credits minus marginused.For several orders at once, use Basket Margin — a hedged basket needs far less margin together than its legs do separately. RED:RULE:{Check circuit limit including square off order} Rejected by a risk rule In the documented example the limit price of ₹2,400.00 sat outside the instrument's circuit band of ₹1,590.05 to ₹1,943.35, so the exchange would not accept it. FIX: Show this string to the user verbatim. It already contains the diagnosis; replacing it with "order failed" throws away the only useful information.Read the circuit limits from uc and lc in a quote and validate the price in your own UI first. ## Enumerations Exchanges: NSE National Stock Exchange - cash / equity NFO NSE equity derivatives (futures & options) BSE Bombay Stock Exchange - cash / equity BFO BSE equity derivatives CDS NSE currency derivatives MCX Multi Commodity Exchange NCX NSE commodity Products (prd): C Delivery - shares settle into your demat account (CNC) I Intraday - must be squared off the same day (MIS) M Margin - carry-forward derivatives position (NRML) H Cover order - entry plus a compulsory stop-loss B Bracket order - entry plus a stop-loss and a target S Special P Special2 Price types (prctyp): LMT Limit - fills at your price or better MKT Market - fills immediately at whatever the market offers SL-LMT Stop-loss limit - becomes a limit order once trgprc is hit SL-MKT Stop-loss market - becomes a market order once trgprc is hit DS Disclosed quantity order 2L Two-leg order - both legs sent together 3L Three-leg order - all three legs sent together Retention (ret): DAY Valid for the rest of today's session IOC Immediate or cancel - fill what you can now, cancel the rest EOS End of session Transaction type (trantype): B Buy S Sell Official documentation of HKKR Finserv Pvt Ltd (INFINN). Support: support@infinn.in. ## Login in 5 minutes (beginners) /getting-started/login-in-5-minutes/ : whitelist your IP (top-right profile icon -> Generate Key -> API Key panel: Client ID = user ID, App Key = API key, Secret Code = API secret, Redirect URL must match, Webhook URL leave blank), build the login link (route_to = sha256(USER_ID|SECRET_KEY)), copy the code after code= quickly, checksum = sha256(API_KEY+SECRET_KEY+code), call GenAcsTok. One-file auto login: /downloads/infinn_quick_login.py (redirect URL http://127.0.0.1:8899/callback). GenAcsTok Not_Ok: check the static IP first. /getting-started/first-trade-30-minutes/ : fresher path in 30 minutes. Prep: active account, TOTP app, API key approved, static IP registered (trade.infinn.in > profile > Generate Key), market open or AMO. Steps: credentials, TOTP, OAuth login > code > checksum > GenAcsTok, UserDetails, 1-share LMT order far below market > OrderBook > CancelOrder. Script: /downloads/infinn_first_trade.py (dry run by default, type YES to send). /guides/place-order-learn-more/ : detailed steps for placing a safe test order (SearchScrip, GetQuotes, validation, GetOrderMargin, PlaceOrder, SingleOrdStatus, CancelOrder) with full code. Short version: /guides/place-order/. ## API Key panel item 10: more than 10 orders per second Leave the box "Applicable for more than 10 orders per second" unticked if you send 10 orders per second or fewer. If you need more, tick it; a "Select Exchanges" list appears (MCX, NSE, NFO, BSE, BFO). For each selected exchange fill "Algo ID for " with the algo ID that exchange approved, then press Update. Common mistake: ticking the box without algo IDs -- Update fails or is incomplete. ## FAQ (v4.6) ### General 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. 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. 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). Q4. Where can I contact API support? You can email all your API queries to support@infinn.in. Detailed documentation is also available at docs.infinn.in. A5 (added for clarity). Is there a test or sandbox server? No. These docs list only the LIVE addresses: REST `https://api.infinn.in` and WebSocket `wss://api.infinn.in/NorenWSTP/`. Every call runs on your real account, and every order is real. For paper trading, see Q9. To test safely, place a 1-share limit order priced far from the market so it cannot fill, check it in the order book, then cancel it. ### Getting Started 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/ 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. Q7. Which programming libraries does Infinn provide? Infinn currently offers libraries for: Python .NET Node.js JavaScript PHP Java 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 Q9. Does Infinn offer paper trading for testing and development? Yes. Infinn provides a paper trading facility. To request access, please contact support@infinn.in. 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 support@infinn.in 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. Q11. Does Infinn provide cURL-based code? Yes. The Infinn REST API backend supports cURL-based requests. A1 (added for clarity). I logged in, but the token step fails. Am I copying the redirect URL correctly? 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. A4 (added for clarity). What do I send as uid and actid? A call rejects my user ID. `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. A6 (added for clarity). What goes in api_key and route_to in the login URL, and how is the checksum made? The login URL has two values: `https://api.infinn.in/OAuthlogin/investor-entry-level/login?api_key=&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. A8 (added for clarity). Every call returns HTTP 401 with an empty body. How do I check my static IP? 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. A9 (added for clarity). Client ID, App Key, Secret Code, login code, access token: which is which? | Value | Where you find it | Used for | |---|---|---| | Client ID (user ID) | Top row of the API Key panel; the ID you log in with | `uid` (and `actid` on an individual account) in request bodies | | App Key | API Key panel; your Client ID with `_U` added, for example `IN001_U` | `api_key` in the login URL; first part of the checksum | | Secret Code | API 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 dashes | Sent once to GenAcsTok | | Access token | GenAcsTok response; 64 hex characters, no dashes | `Authorization: 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. A17 (added for clarity). The login page asks for TOTP. How do I set it up, and can my script log in by itself? 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). ### Segments, Orders and Limits 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. Q14. Are Bracket and Cover orders available? Yes. The APIs allow you to place, modify and cancel both Bracket and Cover orders. 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 Type | Code | |---|---| | 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. 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. 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. A10 (added for clarity). What do the codes in an order mean (prd, prctyp, ret)? Every order carries three code fields. The product codes are listed in Q15; the most common are below. | Field | Code | Meaning | |---|---|---| | prd (product) | C | Delivery (CNC) | | prd | I | Intraday (MIS); squared off the same day | | prd | M | Margin / carry forward (NRML) | | prd | H | Cover order: entry plus a compulsory stop-loss | | prd | B | Bracket order: entry plus stop-loss plus target | | prctyp (price type) | LMT | Limit: your price or better | | prctyp | MKT | Market: send `prc` as "0" | | prctyp | SL-LMT | Stop-loss limit: needs `trgprc` and `prc` | | prctyp | SL-MKT | Stop-loss market: needs `trgprc` | | ret (validity) | DAY | Valid for the rest of today | | ret | IOC | Immediate or cancel | | ret | EOS | End 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`. A11 (added for clarity). Which order statuses can I modify or cancel? 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. A12 (added for clarity). I get HTTP 429. What should I do, and what is the "more than 10 orders per second" box? 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. ### Market Data and WebSocket Q19. Does Infinn API support live price streaming? Yes. Infinn offers a WebSocket service to stream live prices across all segments and exchanges. Q20. What types of feed are available in the WebSocket? Three feed types are available: Depth, Order and Touchline. Q21. Is there a limit on the number of tokens I can subscribe to? No. There is no restriction on the number of tokens you can subscribe to. Q22. Is there a sample program for connecting to the WebSocket? Yes. Please refer to test_websocket_feed in the tests folder of the Python library. 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. Q24. How can I check whether the exchanges are open before placing orders? Market status for NSE, BSE and NFO is available through the WebSocket Market Status Update API: https://docs.infinn.in/websocket/market-status/ 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. 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. 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']) A13 (added for clarity). My WebSocket connects but I get no prices, or it stops after a while. What should I check? - Connect to `wss://api.infinn.in/NorenWSTP/`, then send the connect message `{"t":"a","uid":"IN001","actid":"IN001","source":"API","accesstoken":""}`. - 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. ### Trading Symbols 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. | Instrument | Format | Example | |---|---|---| | Equity Spot | Instrument Name + -EQ | RELIANCE-EQ | | Equity Futures | Name + Date + Month + Year + F | BAJFINANCE30JUN22F | | Equity Options | Name + Date + Month + Year + P/C + Strike | DELTACORP28JUL22C110 | | Index Futures (NIFTY, BANKNIFTY, FINNIFTY) | Name + Date + Month + Year + F | BANKNIFTY25AUG22F | | Index Options (NIFTY, BANKNIFTY, FINNIFTY) | Name + Date + Month + Year + P/C + Strike | BANKNIFTY17FEB22P38600 | | Commodity Futures | Name + Date + Month + Year | ALUMINIUM29JUL22 | | Commodity Options | Name + Date + Month + Year + P/C + Strike | CRUDEOIL17AUG22P11150 | A14 (added for clarity). Where do I get the token, lot size and tick size for an instrument? 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. ### Sessions and Multiple Accounts 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. 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. 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. A2 (added for clarity). Why does my token stop working every morning? Do I have to log in every day? 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. ### Third-Party Platform Integration 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. ### Troubleshooting Q35. I am getting the error "ModuleNotFoundError: No module named 'WebSocket'". What should I do? Install the required package using: pip install websocket_client 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. 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. 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 support@infinn.in. 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 support@infinn.in for assistance. A7 (added for clarity). GenAcsTok returns "Invalid Input : INVALID_VERIFIER". What is wrong? 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). A15 (added for clarity). My order is rejected with "Error Occurred : 2 "invalid input"". What is wrong? 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). A16 (added for clarity). I get HTTP 400, 404 or 405. Is my request built wrongly? 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/`. 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 ` and `Content-Type: text/plain`, as in Q44. A19 (added for clarity). I have an error message. Which answer should I read? | You see | Read | |---|---| | `Invalid Input : INVALID_VERIFIER` at login | A7, A6 | | HTTP 401 with an empty body | A8, Q44 | | HTTP 403 with an empty body, or `Session Expired : Invalid Session Key` | A2, Q30, Q36 | | A call rejects your user ID or account ID | A4 | | `Error Occurred : 2 "invalid input"` | A15 | | HTTP 400, 404 or 405 | A16 | | HTTP 429 | A12, Q17 | | `Rejected : ORA:Order not found` | A11 | | `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 1008 | A13 | | `Service Unavailable 503` | Q38 | | `User is Blocked for Trading` | Q39 | | `ModuleNotFoundError: No module named 'WebSocket'` | Q35 | | Login page blank after sign-in, or token step fails | A1 | Still stuck? Print the HTTP status and the raw response body, then follow the debugging checklist. ### Partner and Platform Integration 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=&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. 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. 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. 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. Q44. How do I send the access token with each request? Send the access token in the Authorization header in the format Bearer . 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 ' \ --data 'jData={"uid":""}' 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. 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. 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. 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. 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. Q53. Is there an API for the ledger and charges (brokerage, STT, etc.)? Currently, there is no such API. Please contact support@infinn.in if you have a specific requirement. A18 (added for clarity). My GTT call worked, but my code reports it as failed. Why? 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"`. ## v4.8 additions - Sandbox / UAT: https://docs.infinn.in/getting-started/sandbox-uat/ - TOTP checker: https://docs.infinn.in/tools/totp/ - Playground default server: Sandbox / UAT (https://uat.infinn.in) - [FAQ — Examples and Strategy Builder](https://docs.infinn.in/faq/#sec-examples): E1–E10 on the Strategy Builder, the Straddle / Strangle example, underlyings, expiry, stop loss, Sandbox, the disclaimer, SDK 0.1.2, install, and support. The FAQ page has a keyword search box.