Portfolio¶
This API lets you retrieve holdings and positions in your portfolio.
Method | API Endpoint | Description |
---|---|---|
GET | /holdings/ |
Retrieve the list of long-term equity holdings. |
GET | /holdings/mtf/ |
Retrieve holdings under Margin Trading Facility (MTF). |
GET | /positions/ |
Retrieve the list of current short-term or intraday positions. |
POST | /positions/conversion |
Convert positions from intraday to delivery (CNC) or vice versa. |
Holdings¶
Holdings contain the long term equity Holdings of the customer. All the financial instruments in the holdings reside in the customer’s DEMAT account indefinitely until its sold or is delisted or changed by the exchanges. Changes to DEMAT account is settled in T+1 days.
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"poa": false,
"product": "CNC",
"holdings": [
{
"isin": "INE00ZE01026",
"realizedPnl": "0.0",
"unrealizedPnl": "-809900.0244140625",
"netPnl": "-809900.0244140625",
"netQty": "2000",
"buyPrice": "404.95001220703125",
"holdQty": "2000",
"dpQty": "0",
"benQty": "0",
"unpledgedQty": "0",
"collateralQty": "0",
"brkCollQty": "0",
"btstQty": "0",
"usedQty": "0",
"tradedQty": "0",
"sellableQty": "2000",
"authQty": "0",
"authFlag": false,
"sellAmount": "0.0",
"symbol": [
{
"exchange": "NSE",
"token": "13288",
"tradingSymbol": "AFSL-EQ",
"pdc": "234.21",
"ltp": "234.21"
}
],
"isAmoAuth": 0,
"amoAuthQty": 0
},
{
"isin": "INE731G01027",
"realizedPnl": "0.0",
"unrealizedPnl": "-1644.9999809265137",
"netPnl": "-1644.9999809265137",
"netQty": "500",
"buyPrice": "3.2899999618530273",
"holdQty": "500",
"dpQty": "0",
"benQty": "0",
"unpledgedQty": "0",
"collateralQty": "0",
"brkCollQty": "0",
"btstQty": "0",
"usedQty": "0",
"tradedQty": "0",
"sellableQty": "500",
"authQty": "0",
"authFlag": false,
"sellAmount": "0.0",
"symbol": [
{
"exchange": "BSE",
"token": "535730",
"tradingSymbol": "KHOOBSURAT",
"pdc": "0.58",
"ltp": "0.58"
}
],
"isAmoAuth": 0,
"amoAuthQty": 0
}
]
}
],
"infoMessage": null
}
Parameters
Field | Type | Description |
---|---|---|
status | String | API call status (e.g., "Ok"). |
message | String | Result message (e.g., "Success"). |
result | Array | Array of holding blocks (can include POA/non-POA separation). |
poa | Boolean | Indicates if holdings fall under Power of Attorney (POA). |
product | String | Type of product (e.g., "CNC" = delivery-based holdings). |
isin | String | ISIN (International Securities Identification Number) of the stock. |
realizedPnl | String | Realized profit/loss (from sold quantities). |
unrealizedPnl | String | Current unrealized PnL based on LTP vs. buy price. |
netPnl | String | Total PnL = realized + unrealized. |
netQty | String | Total quantity held. |
buyPrice | String | Average buy price. |
holdQty | String | Quantity currently held. |
dpQty | String | Quantity in Demat. |
benQty | String | Beneficiary quantity. |
unpledgedQty | String | Unpledged quantity (available to sell or pledge). |
collateralQty | String | Quantity pledged as collateral. |
brkCollQty | String | Quantity pledged to broker. |
btstQty | String | Buy Today, Sell Tomorrow quantity. |
usedQty | String | Quantity already used in a trade. |
tradedQty | String | Quantity that has been traded today. |
sellableQty | String | Quantity available for selling. |
authQty | String | Quantity awaiting authorization (for non-POA accounts). |
authFlag | Boolean | If true, holdings require authorization before selling. |
sellAmount | String | Amount that would be received if holdings are sold at current LTP. |
isAmoAuth | Integer | Flag for AMO (After Market Order) authorization required (0/1). |
amoAuthQty | Integer | Quantity eligible for AMO authorization. |
exchange | String | Exchange where the stock is listed (e.g., NSE, BSE). |
token | String | Internal token/ID used for the stock. |
tradingSymbol | String | Tradable stock symbol. |
pdc | String | Previous day close price. |
ltp | String | Latest traded price (used for unrealized PnL). |
MTF Holdings¶
The MTF Holdings API returns a list of stocks held under the Margin Trading Facility (MTF). These holdings are financed partially by the broker, and margin interest is applicable.
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"poa": false,
"product": "MTF",
"holdings": [
{
"isin": "INE00ZE01026",
"realizedPnl": "0.0",
"unrealizedPnl": "-809900.0244140625",
"netPnl": "-809900.0244140625",
"netQty": "2000",
"buyPrice": "404.95001220703125",
"holdQty": "2000",
"dpQty": "0",
"benQty": "0",
"unpledgedQty": "0",
"collateralQty": "0",
"brkCollQty": "0",
"btstQty": "0",
"usedQty": "0",
"tradedQty": "0",
"sellableQty": "2000",
"authQty": "0",
"authFlag": false,
"sellAmount": "0.0",
"symbol": [
{
"exchange": "NSE",
"token": "13288",
"tradingSymbol": "AFSL-EQ",
"pdc": "234.21",
"ltp": "234.21"
}
],
"isAmoAuth": 0,
"amoAuthQty": 0
}
]
}
],
"infoMessage": null
}
Parameters
Field | Type | Description |
---|---|---|
status | String | API call status (e.g., "Ok"). |
message | String | Result message (e.g., "Success"). |
result | Array | Array of holding blocks (can include POA/non-POA separation). |
poa | Boolean | Indicates if holdings fall under Power of Attorney (POA). |
product | String | Type of product (e.g., "MTF"). |
isin | String | ISIN (International Securities Identification Number) of the stock. |
realizedPnl | String | Realized profit/loss (from sold quantities). |
unrealizedPnl | String | Current unrealized PnL based on LTP vs. buy price. |
netPnl | String | Total PnL = realized + unrealized. |
netQty | String | Total quantity held. |
buyPrice | String | Average buy price. |
holdQty | String | Quantity currently held. |
dpQty | String | Quantity in Demat. |
benQty | String | Beneficiary quantity. |
unpledgedQty | String | Unpledged quantity (available to sell or pledge). |
collateralQty | String | Quantity pledged as collateral. |
brkCollQty | String | Quantity pledged to broker. |
btstQty | String | Buy Today, Sell Tomorrow quantity. |
usedQty | String | Quantity already used in a trade. |
tradedQty | String | Quantity that has been traded today. |
sellableQty | String | Quantity available for selling. |
authQty | String | Quantity awaiting authorization (for non-POA accounts). |
authFlag | Boolean | If true, holdings require authorization before selling. |
sellAmount | String | Amount that would be received if holdings are sold at current LTP. |
isAmoAuth | Integer | Flag for AMO (After Market Order) authorization required (0/1). |
amoAuthQty | Integer | Quantity eligible for AMO authorization. |
exchange | String | Exchange where the stock is listed (e.g., NSE, BSE). |
token | String | Internal token/ID used for the stock. |
tradingSymbol | String | Tradable stock symbol. |
pdc | String | Previous day close price. |
ltp | String | Latest traded price (used for unrealized PnL). |
Positions¶
The API returns a list of current derivative positions (Futures & Options) for the client across instruments, including buy/sell quantities, average prices, unrealized PnL, and other trade metrics.
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"displayName": "HDFCBANK 26th JUN 1920 CE",
"tradingsymbol": "HDFCBANK26JUN25C1920",
"token": "94089",
"exchange": "NFO",
"product": "NRML",
"netQty": "550",
"netAvgPrice": "33.25",
"buyQty": "550",
"buyPrice": "33.25",
"sellQty": "0",
"sellPrice": "0.0",
"mtm": null,
"mtmBuyPrice": "27.2",
"mtmSellprice": "0.0",
"pnl": null,
"realizedPnl": "-0.0",
"unrealizedPnl": "0.00",
"multiplier": "1",
"lotsize": "550",
"ticksize": "0.05",
"pdc": "27.2",
"ltp": "27.20",
"breakevenPrice": "27.2",
"overnightQty": "550",
"overnightPrice": "33.25",
"orderType": "Regular",
"pnlLotsize": "550"
},
{
"displayName": "NIFTY 19th JUN 25000 CE",
"tradingsymbol": "NIFTY19JUN25C25000",
"token": "51011",
"exchange": "NFO",
"product": "NRML",
"netQty": "-150",
"netAvgPrice": "0.0",
"buyQty": "75",
"buyPrice": "120.0",
"sellQty": "225",
"sellPrice": "120.0",
"mtm": null,
"mtmBuyPrice": "277.85",
"mtmSellprice": "277.85",
"pnl": null,
"realizedPnl": "0.0",
"unrealizedPnl": "19927.50",
"multiplier": "1",
"lotsize": "75",
"ticksize": "0.05",
"pdc": "22.05",
"ltp": "145.00",
"breakevenPrice": "277.85",
"overnightQty": "75",
"overnightPrice": "120.0",
"orderType": "Regular",
"pnlLotsize": "75"
}
]
}
Parameters
Field | Type | Description |
---|---|---|
displayName | String | Readable contract name (e.g., HDFCBANK 26th JUN 1920 CE). |
tradingsymbol | String | Tradable symbol used in the F\&O segment. |
token | String | Internal instrument identifier. |
exchange | String | Exchange name (NFO for NSE F\&O segment). |
product | String | Product type (NRML, MIS, etc.). |
netQty | Integer | Net open quantity. Positive = long, Negative = short. |
netAvgPrice | Float | Average price for the net position. |
buyQty / sellQty | Integer | Total buy and sell quantities. |
buyPrice / sellPrice | Float | Average buy/sell prices. |
mtmBuyPrice | Float | Mark-to-market buy price (used for MTM calcs). |
pnl | Float/null | Net profit or loss (can be null if not calculated server-side). |
realizedPnl | Float | Profit or loss from closed positions. |
unrealizedPnl | Float | PnL from open positions based on current LTP. |
ltp | Float | Last traded price of the instrument. |
breakevenPrice | Float | Effective breakeven point including entry and cost. |
overnightQty | Integer | Quantity carried forward from previous day. |
overnightPrice | Float | Price at which the overnight quantity was acquired. |
lotsize | Integer | Lot size of the instrument (e.g., 75 for NIFTY). |
ticksize | Float | Minimum price movement allowed (e.g., 0.05). |
Position Conversion¶
The Position Conversion API enables users to convert an existing open position from one product type to another.
Request Structure
{
"exchange": "NFO",
"tradingsymbol": "HDFCBANK26JUN25C1920",
"qty": "550",
"product": "MIS",
"prevProduct": "NRML",
"transType": "S",
"posType": "DAY",
"orderSource":"API"
}
Parameters
Field | Type | Description |
---|---|---|
exchange | String | Name of the exchange (e.g., NSE, BSE, MCX) |
token | String | Unique token/identifier for the instrument |
tradingSymbol | String | Symbol of the security/contract being converted |
qty | Integer | Quantity of the position to convert |
product | String | Target product type (e.g., NRML for delivery) |
prevProduct | String | Current product type of the open position (e.g., MIS) |
transType | String | Transaction type – Buy (B) or Sell (S) |
orderSource | String | Platform source initiating the conversion (e.g., WEB, API, MOB) |
posType | String | Position type |
Response Structure
Parameters