Skip to main content

Position book

A trading or position book is an up-to-date record of a trader's open positions.

The Position Book holds the user's collection of short-term to medium-term derivative instruments such as futures and options contracts, as well as intraday equity stocks. These instruments remain within the portfolio until they are sold or reach their expiration date.Any equity positions that are held overnight will be transferred to the Holding Portfolio the following day.

Method: POST

Request details

ParameterDescriptionData typesExample
userIdUser Id of the login userString"AA1999"
jKeyKey Obtained on login success.String"d9b4e1b1c79042476fd96
curl --location '' \
--header 'Content-Type: application/json' \
--data '{
"userId": "AA123",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38"

Response details

Response data will be in json Array of objects with below fields in case of success.

ParameterDescriptionData typesExamples
data.userIdUser IdString"AA0011"
data.exchangeExchange SegmentString"NSE"
data.tradingSymbolTrading symbol / contract.String"ITC-EQ"
data.productProduct name to be shown.String"I"
data.tokenContract tokenString"1660"
data.pricePrecisionPrice precisionString"2"
data.unrealizedMTOMUnrealizedMTOM.(Can be recalculated in LTP update : = netqty * (lp from web socket - netavgprc) * prcftrString"0.00"
data.priceFactorpriceFactorString "1.000000"
data.dayBuyQuantityDay Buy QuantityString"4"
data.daySellQuantityDay Sell QuantityString"4"
data.dayBuyAveragePriceDay Buy average priceString"326.48"
data.daySellAveragePriceDay buy average priceString"326.48"
data.dayBuyAmountDay Buy AmountString"1305.90"
data.netQuantityNet Position quantityString"0"
data.netAveragePriceNet position average priceString"0.00"
data.uploadPriceAverage price uploaded along with holdingsString"0.00"

Failure response details

ParameterDescriptionData TypeExample
codeHTTP CodeString"404"
nameType of errorString"ORDERS_NOT_FOUND"
error.fieldError fieldString"orderDetails"
error.messageError messageString"No data on the orders was found"

Sample response

"status": "Success",
"data": {
"userId": "AA0011",
"exchange": "NSE",
"tradingSymbol": "ITC-EQ",
"product": "I",
"token": "1660",
"pricePrecision": "2",
"lotSize": "1",
"tickSize": "0.05",
"mult": "1",
"priceFactor": "1.000000",
"dayBuyQuantity": "4",
"daySellQuantity": "4",
"dayBuyAmount": "1305.90",
"dayBuyAveragePrice": "326.48",
"datSellAveragePrice": "328.44",
"netQuantity": "0",
"netAveragePrice": "0.00",
"uploadPrice": "0.00",
"netUploadPrice": "0.00",
"unrealizedMTOM": "0.00",
"RealizedPNL": "7.85"