Skip to Main Content
POST/NorenWClientAPI/Holdings

Holdings

Fetch demat holdings (delivery-settled equity) for the account, including collateral and pledge quantities.

Overview

Holdings returns settled, delivery-held equity — distinct from Positions, which covers same-day and carry-forward trading positions. A share bought under CNC today shows up in Positions until settlement, then moves here.

Parameters

FieldTypeRequiredDescription
uid / actidstringRequiredUser and account ID.
prdstringOptionalFilter holdings by product.

Request example

import requests, json
 
payload = {"uid": "AB1234", "actid": "AB1234"}
data = f"jData={json.dumps(payload)}&jKey={accessToken}"
 
resp = requests.post("https://api.shoonya.com/NorenWClientAPI/Holdings", data=data)
for h in resp.json():
    tsym = h["exch_tsym"][0]["tsym"]
    print(tsym, "holdqty:", h["holdqty"], "avg cost:", h["upldprc"])
const payload = { uid: "AB1234", actid: "AB1234" };
const data = `jData=${JSON.stringify(payload)}&jKey=${accessToken}`;
 
const res = await fetch("https://api.shoonya.com/NorenWClientAPI/Holdings", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: data,
});
console.log(await res.json());
curl -X POST https://api.shoonya.com/NorenWClientAPI/Holdings \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'jData={"uid":"AB1234","actid":"AB1234"}' \
  --data-urlencode "jKey=$ACCESS_TOKEN"

Response

json
[
  {
    "stat": "Ok",
    "exch_tsym": [{ "exch": "NSE", "token": "22", "tsym": "ABB-EQ" }],
    "holdqty": "20",
    "colqty": "0",
    "btstqty": "0",
    "btstcolqty": "0",
    "usedqty": "0",
    "upldprc": "1800.00"
  }
]
FieldDescription
exch_tsymArray — a holding can map to more than one exchange/token pair for dually-listed scrips.
holdqtyCore demat holding quantity.
dpqty / npoadqtyDP holding quantity and non-POA display quantity — relevant when POA isn't set up on the account.
colqty / brkcolqty / unplgdqtyPledged/collateral and unpledged quantities.
btstqty / btstcolqtyBTST (buy-today-sell-tomorrow) quantity and its collateral portion.
usedqtyQuantity already used/sold today — subtract this before computing what's still sellable.
upldprcAverage cost price uploaded with the holding.
Computing valuation vs. sellable quantity Valuation = btstqty + holdqty + brkcolqty + unplgdqty + benqty + max(npoadqty, dpqty) − usedqty
Salable = btstqty + holdqty + unplgdqty + benqty + dpqty − usedqty

Error handling

json
{ "stat": "Not_Ok", "emsg": "Invalid Input : Missing uid or actid or prd." }

Best practices

  • Use the salable-quantity formula above before placing a sell order against holdings — don't sell against raw holdqty, since pledged/used portions aren't available to trade.
  • Cache holdings for the session; they change on settlement (T+1), not intraday, unlike Positions.

Notes

For same-day and carry-forward trading exposure, see Positions instead — Holdings only reflects settled demat stock.