Skip to content

Holdings ​

Get portfolio holdings (delivery positions) with P&L information.

Endpoint URL ​

http
Local Host   :  POST http://127.0.0.1:5000/api/v1/holdings
Ngrok Domain :  POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/holdings
Custom Domain:  POST https://<your-custom-domain>/api/v1/holdings

Sample API Request ​

json
{
  "apikey": "<your_app_apikey>"
}

Sample cURL Request ​

bash
curl -X POST http://127.0.0.1:5000/api/v1/holdings \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": "<your_app_apikey>"
}'

Sample API Response ​

json
{
  "status": "success",
  "data": {
    "holdings": [
      {
        "symbol": "RELIANCE",
        "exchange": "NSE",
        "product": "CNC",
        "quantity": 1,
        "pnl": -149.0,
        "pnlpercent": -11.1
      },
      {
        "symbol": "TATASTEEL",
        "exchange": "NSE",
        "product": "CNC",
        "quantity": 1,
        "pnl": -15.0,
        "pnlpercent": -10.41
      },
      {
        "symbol": "CANBK",
        "exchange": "NSE",
        "product": "CNC",
        "quantity": 5,
        "pnl": -69.0,
        "pnlpercent": -13.43
      }
    ],
    "statistics": {
      "totalholdingvalue": 1768.0,
      "totalinvvalue": 2001.0,
      "totalprofitandloss": -233.15,
      "totalpnlpercentage": -11.65
    }
  }
}

Request Body ​

ParameterDescriptionMandatory/OptionalDefault Value
apikeyYour Tradeboard API keyMandatory-

HoldingsSchema declares only apikey. Any other field returns HTTP 400.

Response Fields ​

FieldTypeDescription
statusstring"success" or "error"
dataobjectHoldings data

Data Object Fields ​

FieldTypeDescription
holdingsarrayArray of holding objects
statisticsobjectPortfolio statistics

Holding Object Fields ​

FieldTypeDescription
symbolstringStock symbol
exchangestringExchange (NSE/BSE)
productstringProduct type (CNC)
quantitynumberNumber of shares held
pnlnumberProfit/Loss in currency
pnlpercentnumberProfit/Loss percentage

Statistics Object Fields ​

FieldTypeDescription
totalholdingvaluenumberCurrent market value of holdings
totalinvvaluenumberTotal investment value (cost)
totalprofitandlossnumberTotal P&L in currency
totalpnlpercentagenumberTotal P&L percentage

Notes ​

  • Holdings are delivery positions (CNC product type)
  • Different from PositionBook which shows intraday positions
  • pnl is calculated as: (Current Price - Average Buy Price) × Quantity
  • totalholdingvalue is the current market value of entire portfolio
  • Holdings persist across trading days (unlike MIS positions)

Use Cases ​

  • Portfolio tracking: View all delivery holdings
  • Wealth monitoring: Track total portfolio value
  • Performance analysis: Monitor overall P&L

Back to: API Documentation