On this page
Every one of the 63 endpoints takes the same shape. Learn it once and the only thing that changes between calls is the path and the contents of one JSON object.
The shape
POST /NorenWClientAPI/<EndpointName> HTTP/1.1
Host: api.infinn.in
Authorization: Bearer <access_token>
Content-Type: text/plain
jData=<a JSON object, as a string>Four rules that apply to everything
1. The method is always POST
Including for endpoints that only read.
Order Book fetches data and
is still a POST. A GET returns
405 Method Not Allowed.
This is unusual, and it has a practical consequence: you cannot link to an API call, bookmark one, or test one by pasting a URL into a browser.
2. The content type is text/plain
Not application/json - even though the body contains
JSON. Not application/x-www-form-urlencoded - even though
the body is a form field.
Many HTTP clients set Content-Type for you when you hand them
an object, and will set it to something Infinn rejects. Set it explicitly.
3. The body is one form field called jData
The literal characters jData=, followed by a JSON object
serialised to a string. Not a JSON document; not a multi-field form. One
field, one value.
4. Every endpoint uses the same path prefix
All 58 endpoints live under /NorenWClientAPI/, including Get Basket Optimal Sequence.
Why the body looks like that
jData={"uid":"IN001"} is two things glued together.
jData= is a label, like writing "Name:" on a form. Everything after the equals sign is the value.
The value happens to be JSON. So you are sending a form with one field, whose contents are a small structured document.
Every request carries one form field, jData, with a JSON payload, plus the header Authorization: Bearer <token>. Get the token through the OAuth login; it is the only login method.
Building the body correctly
Serialise with your language's JSON library and prepend the prefix. Never build the string by hand - a symbol like M&M or a remark containing a quote will break it.
import json
payload = {
"uid": "IN001",
"exch": "NSE",
"tsym": "RELIANCE-EQ",
}
body = "jData=" + json.dumps(payload)
# jData={"uid": "IN001", "exch": "NSE", "tsym": "RELIANCE-EQ"}
# Pass it as `data=`, NOT as `json=`. Using json= would set the content type
# to application/json and send a bare object with no jData prefix.
# requests.post(url, headers=..., data=body)const payload = {
uid: 'IN001',
exch: 'NSE',
tsym: 'RELIANCE-EQ',
};
const body = 'jData=' + JSON.stringify(payload);
// jData={"uid":"IN001","exch":"NSE","tsym":"RELIANCE-EQ"}
// Pass it as `body:`, and set Content-Type yourself -- fetch will not
// guess text/plain for you when given a string it thinks is a form.using System.Collections.Generic;
using System.Text;
using System.Text.Json;
var payload = new Dictionary<string, string>
{
["uid"] = "IN001",
["exch"] = "NSE",
["tsym"] = "RELIANCE-EQ",
};
var body = "jData=" + JsonSerializer.Serialize(payload);
// StringContent's third argument sets the media type explicitly.
var content = new StringContent(body, Encoding.UTF8, "text/plain");<?php
$payload = [
'uid' => 'IN001',
'exch' => 'NSE',
'tsym' => 'RELIANCE-EQ',
];
$body = 'jData=' . json_encode($payload);
// Note: passing an ARRAY to CURLOPT_POSTFIELDS makes cURL send
// multipart/form-data. Pass the string, as above.Everything is a string
Quantities, prices and trigger levels all go on the wire as JSON strings, not numbers. This is how every example in the API specification sends them.
{
"qty": "1",
"prc": "1402.30",
"trgprc": "0"
}{
"qty": 1,
"prc": 1402.30,
"trgprc": 0
}If you model an order as a struct with int qty and decimal prc, your serialiser will emit numbers and the call will be rejected with the unhelpful Error Occurred : 2 "invalid input".
Keep the wire model as strings, and convert at the edges of your own code. The C# sample above uses Dictionary<string, string> for exactly this reason.
Omitting optional fields
An optional field you are not using should be left out entirely, not sent as an empty string.
The API specification states that the message Invalid AMO appears "if the amo field is not sent with a Yes value", and adds: "If amo is not required, do not send this field."
So "amo": "Yes" is valid, omitting amo is valid, and "amo": "" or "amo": "No" risks a rejection.
If you build the payload from a struct, make sure unset fields are dropped rather than serialised as empty.
# Build the payload from only what is actually set.
order = {
"uid": UID,
"actid": UID,
"exch": "NSE",
"tsym": "RELIANCE-EQ",
"qty": "1",
"prc": "1000",
"prd": "C",
"trantype": "B",
"prctyp": "LMT",
"ret": "DAY",
}
if is_after_market:
order["amo"] = "Yes" # only ever added when true
# A general guard, if your payload comes from somewhere less tidy:
order = {k: v for k, v in order.items() if v not in (None, "")}const order = {
uid: UID,
actid: UID,
exch: 'NSE',
tsym: 'RELIANCE-EQ',
qty: '1',
prc: '1000',
prd: 'C',
trantype: 'B',
prctyp: 'LMT',
ret: 'DAY',
};
if (isAfterMarket) {
order.amo = 'Yes'; // only ever added when true
}
// A general guard: drop null, undefined and empty-string values.
const clean = Object.fromEntries(
Object.entries(order).filter(([, v]) => v !== null && v !== undefined && v !== ''),
);Symbols with special characters
A symbol that contains &, such as M&M-EQ, must be URL-encoded inside the JSON value before you build the body. In Python use urllib.parse.quote_plus(tsym); in JavaScript use encodeURIComponent(tsym). So M&M becomes M%26M and the body is jData={"uid":"IN001","exch":"NSE","stext":"M%26M"}.
Tested on the live API (16 Oct 2026): a raw & in the body, or URL-encoding the whole jData value, both return HTTP 400. Encode only the field value.
Headers in full
| Header | Required | Value |
|---|---|---|
Authorization | required on 62 of 63 | Bearer <access_token>. Only GenAcsTok is exempt, since it is what produces a token. |
Content-Type | required | text/plain or application/json. Both work; the body is always jData=<JSON>. |
Host | automatic | api.infinn.in. Your HTTP client sets this. |
Content-Length | automatic | Set by your HTTP client. |
| Any version header | not used | Infinn has no API version header and no version in the path, unlike some other broker APIs that require a version header. |
Unlike some other broker APIs, which require a version header, Infinn has no version header and no version in the path. There is one version of the API, and the only published changes are in the endpoints themselves.
A request that is correct in every respect
curl --request POST \
--url 'https://api.infinn.in/NorenWClientAPI/SearchScrip' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: text/plain' \
--data 'jData={"uid":"IN001","stext":"RELIANCE","exch":"NSE"}'