Skip to content

Portfolio

This API lets you retrieve holdings and positions in your portfolio.

Method API Detail
GET api/ho-rest/holdings Retrieve the list of long term equity holdings
GET api/po-rest/positions Retrieve the list of short term positions
POST api/po-rest/positions/conversion Convert intraday to long term or long term to intraday

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": [
        {
            "stat": "Ok",
            "poaStatus": 0,
            "holdings": [
                {
                    "isin": "INE512B01022",
                    "realizedPnl": "-0.10",
                    "unrealizedPnl": "-0.10",
                    "netPnl": "-0.10",
                    "netQty": "2",
                    "buyPrice": "2.85",
                    "holdQty": "0",
                    "dpQty": "0",
                    "benQty": "0",
                    "unpledgedQty": "0",
                    "collateralQty": "0",
                    "brkCollQty": "0",
                    "btstQty": "0",
                    "usedQty": "0",
                    "tradedQty": "0",
                    "sellableQty": "0",
                    "authQty": "0",
                    "authFlag": false,
                    "sellAmount": null,
                    "symbol": [
                        {
                            "exchange": "BSE",
                            "token": "532666",
                            "tradingSymbol": "FCSSOFT",
                            "pdc": "2.82",
                            "ltp": "2.80"
                        },
                        {
                            "exchange": "NSE",
                            "token": "11999",
                            "tradingSymbol": "FCSSOFT",
                            "pdc": "2.8",
                            "ltp": "2.80"
                        }
                    ]
                }
            ]
        }
    ]
}

Parameters

Field Type Description
status String The status of the request or transaction.
message String Any message or information related to the status.
result String The outcome or result of the operation.
isin String International Securities Identification Int, a unique identifier for a security.
realizedProfitOrLoss Int The actual profit or loss made after closing a position.
unrealizedProfitOrLoss Int The potential profit or loss on open positions based on the current market price.
netProfitOrLoss Int The overall profit or loss, including both realized and unrealized amounts.
netQty Int The net quantity of securities after all trades have been considered.
buyPrice Float The price at which the securities were purchased.
holdingQty Int The total quantity of securities currently held in the account.
dematerializedQty Float The quantity of securities that have been converted from physical certificates to electronic form.
beneficiaryQty Int The quantity of securities held in the beneficiary account.
unpledgedQty Int The quantity of securities that are not pledged as collateral.
collateralQty Float The quantity of securities that are pledged as collateral.
brokerCollateralQty Float The quantity of securities pledged as collateral with the broker.
buyTodaySellTomorrowQty Int The quantity of securities bought today that are available for selling tomorrow.
usedQty Int The quantity of securities that have been used or settled.
tradedQty Float The total quantity of securities that have been traded.
sellableQty Int The quantity of securities available for sale.
authorizedQty Int The quantity of securities authorized for a specific action, like sale or pledge.
sellAmount Int The total amount of money that can be obtained from selling the sellable quantity.
authorizedFlag boolean A flag indicating whether the quantity or action has been authorized.
symbol Array The trading symbol or ticker of the security.
exchange String Code representing the exchange where the trade is executed
token String A unique identifier or code representing the security or transaction.
tradingSymbol String The symbol used to identify the security in the trading system.
pdc String Post Dated Cheque; details about any pending post-dated cheque transactions.
ltp String Last Traded Price; the most recent price at which the security was traded.

Positions

Users can retrieve a list of all open positions for the day. This includes all F&O carryforward positions as well.

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "result": [
        {
            "displayName": "ADANIENT JUL FUT",
            "tradingsymbol": "ADANIENT",
            "token": "42717",
            "exchange": "NFO",
            "product": "CNC",
            "netQty": "1200",
            "netAvgPrice": null,
            "buyQty": "1200",
            "buyPrice": "2418.8",
            "sellQty": "0",
            "sellPrice": "0.0",
            "mtm": null,
            "mtmBuyPrice": "2418.8",
            "mtmSellprice": "0.0",
            "pnl": null,
            "realizedPnl": "0.0",
            "unrealizedPnl": null,
            "multiplier": "1.0",
            "lotsize": "300",
            "ticksize": null,
            "pdc": "2418.8",
            "ltp": null,
            "breakevenPrice": "0.0",
            "overnightQty": "0",
            "overnightPrice": "0.0",
            "orderType": null
        }
     ]
 }

Parameters

Field Type Description
status String The current status of the operation or request.
message String Any message or information related to the status.
result Array Array containing details of the stock holdings.
displayName String The name displayed for the security or product.
tradingsymbol String The symbol or ticker representing the security in the trading system.
token String A unique identifier or code representing the security or transaction.
exchange String Code representing the exchange where the trade is executed
product String Product category of the trade.
netQty Int The net quantity of securities after considering all trades.
netAveragePrice Float The average price of the securities based on net quantity.
buyQty Int The quantity of securities purchased.
buyPrice Float The price at which the securities were purchased.
sellQty Int The quantity of securities sold.
sellPrice Float The price at which the securities were sold.
marketToMarket Float The mark-to-market value, showing the current value of the open positions based on the latest market price.
marketToMarketBuyPrice Float The mark-to-market value based on the buying price.
marketToMarketSellprice Float The mark-to-market value based on the selling price.
profitOrLoss Float The overall profit or loss from the trade or position.
realizedProfitOrLoss String The profit or loss realized after closing a position.
unrealizedProfitOrLoss Float The potential profit or loss on open positions based on the current market price.
multiplier String A factor used to adjust the quantity or price, often related to derivatives.
lotsize String The minimum quantity or lot size for trading the security.
ticksize String The minimum price movement allowed for the security.
previousDayClose Float The closing price of the security on the previous trading day.
ltp String Last Traded Price; the most recent price at which the security was traded.
breakevenPrice String The price at which the position would result in neither profit nor loss.
overnightQty Int The quantity of securities held overnight.
overnightPrice Float The price of the securities held overnight.
orderType String Type of order

Convert Position

Users can convert their open position from intraday to delivery .

Request Structure

{
    "exchange": "NSE",
    "qty": 2,
    "product": "NRML",
    "prevProduct": "CNC",
    "transType": "B",
    "posType": "DAY",
    "token": "1491"
}

Parameters

Field Type Description
exchange String Code representing the exchange where the trade is executed
qty String Quantity to transact
product String Product category of the trade.
prevProduct Int The previous product code or type of the position before conversion. (Note: The specific product codes or their corresponding meanings may need further context or reference from the trading system.)
tranType String Type of transaction: Indicates whether it's a Buy or Sell action.
transType String Type of transaction, indicating whether the trade is a "BUY" or "SELL"
posType String Type or category of the position (e.g., Long, Short).
token String Token of the scrip. It is a unique code assigned to companies listed on the exchange, providing a standardized identifier for the instrument. The specific token number for the selected instrument is displayed under the scrip details.

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "result": []
}

Parameters

Field Type Description
status string Indicates the status of the operation.
message string A message providing additional information about the operation.
result array An array containing the results of the operation.