On this page
What this endpoint does

When the same stock trades on more than one exchange, this shows your position as a single combined figure, with the per-exchange detail underneath.

POSThttps://api.infinn.in/NorenWClientAPI/InteropPositionBook
Method
POST
Authentication
Token required
Content-Type
text/plain
Body
jData=<json>
Returns
JSON array
Rate limit
20 orders/sec, 200/min (account-wide)

What it does

When the same stock trades on more than one exchange, this shows your position as a single combined figure, with the per-exchange detail underneath.

Returns positions consolidated across interoperable exchanges.

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.

Request

Send a POST with the header Content-Type: text/plain. The body is a single form field, jData, whose value is a JSON string. Include Authorization: Bearer <access_token>. See how requests are shaped if that sounds unfamiliar.

Headers

Request headers
HeaderTypeDescription
Authorization
required
string

Bearer <access_token>, using the access_token from GenAcsTok. A missing or rejected token returns an HTTP error (usually 403) with an empty body.

Content-Type
required
string

text/plain (used in these docs) or application/json. Both work. The body is always jData=<JSON>.

jData fields

Request parameters
FieldTypeDescription
actid
required
string

Account ID of the logged-in user.

Your trading account number. For an individual account this is the same as your user ID.

ExampleIN001
Where to get itReturned as actid by GenAcsTok and UserDetails. Same as the user ID for individual accounts.

Request and response together

The same call, shown as raw HTTP on the left and the documented response on the right.

Request
HTTP request
POST /NorenWClientAPI/InteropPositionBook HTTP/1.1
Host: api.infinn.in
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: text/plain

jData={"actid":"IN001"}
Response
Response

No sample response is published for this endpoint. See Known limitations.

A failure, for comparison

Note the HTTP status: it is still 200. The failure is reported inside the body. See the two error layers.

Request
HTTP request
POST /NorenWClientAPI/InteropPositionBook HTTP/1.1
Host: api.infinn.in
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: text/plain

jData={"actid":"IN001"}
Error
200 OK — but stat is Not_Ok
{
"stat": "Not_Ok",
"request_time": "14:14:11 26-05-2020",
"emsg": "Error Occurred : 5 \"no data\""
}

Code examples

Each sample is a complete, runnable program. Replace YOUR_ACCESS_TOKEN and the placeholder field values, and it will run as-is. Every one checks both error layers.

cURL
curl --request POST \
--url 'https://api.infinn.in/NorenWClientAPI/InteropPositionBook' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: text/plain' \
--data 'jData={"actid":"IN001"}'

Response

On success the body is a JSON array of objects. Infinn omits fields rather than returning null, so check that a field is present before reading it.

Response fields
FieldTypeDescription
statstring

Ok on success, Not_Ok on failure. Always check this before reading anything else.

Did it work? Ok means yes, Not_Ok means no.

exchstring

Exchange segment.

tsymstring

Trading symbol.

tokenstring

Contract token.

uidstring

User ID.

actidstring

Account ID.

prdstring

Product.

s_prdt_alistring

Product display name.

netqtystring

Net quantity: daybuyqty + cfbuyqty - daysellqty - cfsellqty.

netavgprcstring

Net average price.

daybuyqtystring

Quantity bought today.

daysellqtystring

Quantity sold today.

daybuyamtstring

Value bought today.

daysellamtstring

Value sold today.

cfbuyqtystring

Carry-forward buy quantity.

cfsellqtystring

Carry-forward sell quantity.

cfbuyamtstring

Carry-forward buy value.

cfsellamtstring

Carry-forward sell value.

openbuyqtystring

Open buy quantity.

opensellqtystring

Open sell quantity.

openbuyamtstring

Open buy value.

opensellamtstring

Open sell value.

buyavgprcstring

Buy average price: (daybuyamt + cfbuyamt) / (daybuyqty + cfbuyqty).

sellavgprcstring

Sell average price: (daysellamt + cfsellamt) / (daysellqty + cfsellqty).

totbuyamtstring

Total buy value.

totsellamtstring

Total sell value.

totbuyavgprcstring

Total buy average price.

totsellavgprcstring

Total sell average price.

openbuyavgprcstring

Open buy average price.

opensellavgprcstring

Open sell average price.

cfbuyavgprcstring

Carry-forward buy average price.

cfsellavgprcstring

Carry-forward sell average price.

rpnlstring

Realised profit and loss.

urmtomstring

Unrealised mark-to-market.

instnamestring

Instrument name.

upload_prcstring

Upload price.

multstring

Multiplier.

prcftrstring

Price factor.

child_ordersobject[]

The per-exchange breakdown. See below.

request_timestring

The time Infinn processed the request, formatted HH:MM:SS dd-mm-yyyy.

PresencePresent on success.
emsgstring

Human-readable reason for the failure.

If something went wrong, this says what.

PresencePresent only when stat is Not_Ok.

child_orders object

One entry per underlying exchange that contributed to the consolidated position.

child_orders object
FieldTypeDescription
exchstring

Exchange segment.

tokenstring

Contract token.

daybuyqtystring

Quantity bought today.

daysellqtystring

Quantity sold today.

daybuyamtstring

Value bought today.

daysellamtstring

Value sold today.

cfbuyqtystring

Carry-forward buy quantity.

cfsellqtystring

Carry-forward sell quantity.

cfbuyamtstring

Carry-forward buy value.

cfsellamtstring

Carry-forward sell value.

openbuyqtystring

Open buy quantity.

opensellqtystring

Open sell quantity.

openbuyamtstring

Open buy value.

opensellamtstring

Open sell value.

upload_prcstring

Upload price.

totbuyamtstring

Total buy value.

totsellamtstring

Total sell value.

totbuyavgprcstring

Total buy average price.

totsellavgprcstring

Total sell average price.

openbuyavgprcstring

Open buy average price.

opensellavgprcstring

Open sell average price.

cfbuyavgprcstring

Carry-forward buy average price.

cfsellavgprcstring

Carry-forward sell average price.

netupldprcstring

Net upload price.

Errors

This endpoint can fail at either layer. A transport failure returns a 4xx or 5xx with an empty body; an application failure returns 200 with stat: "Not_Ok" and an emsg.

Esc
↑↓ navigate↵ openEsc close/ to search