Skip to content

Portfolio

This section provides endpoints for retrieving a user's portfolio, including current holdings and open positions.

Request Type Path Description
GET /portfolio/holdings Retrieves the user's equity holdings.
GET /portfolio/positions Retrieves the user's open positions.

Get Holdings

Retrieves the user's current equity holdings (stocks held in their Demat account).

Endpoint

Text Only
GET /portfolio/holdings

Example Request

Bash
curl --location 'https://api.indstocks.com/portfolio/holdings' \
--header 'Authorization: YOUR_ACCESS_TOKEN'

Response Payload (Success)

JSON
{
  "status": "success",
  "data": [
    {
      "security_id": "12345",
      "trading_symbol": "RELIANCE-EQ",
      "exchange_segment": "NSE_EQ",
      "isin": "INE002A01018",
      "quantity": 50,
      "average_price": 2200.00,
      "last_traded_price": 2505.10,
      "close_price": 2495.00,
      "market_value": 125255.00,
      "pnl_absolute": 15255.00,
      "pnl_percent": 13.87
    }
  ]
}


Get Positions

Retrieves the user's open positions, such as intraday trades and F&O positions.

Endpoint

Text Only
GET /portfolio/positions

Example Request

For Derivative Positions (MARGIN/INTRADAY):

Bash
curl --location 'https://api.indstocks.com/portfolio/positions?segment=derivative&product=margin' \
--header 'Authorization: YOUR_ACCESS_TOKEN'

For Equity Positions (CNC/INTRADAY):

Bash
curl --location 'https://api.indstocks.com/portfolio/positions?segment=equity&product=cnc' \
--header 'Authorization: YOUR_ACCESS_TOKEN'

Query Parameters: - segment: derivative or equity - product: - For derivative: margin or intraday - For equity: cnc or intraday

Response Payload (Success)

JSON
{
  "status": "success",
  "data": {
    "net_positions": [
      {
        "security_id": "67890",
        "trading_symbol": "NIFTY25MAYFUT",
        "exchange_segment": "NSE_FNO",
        "net_quantity": 100,
        "average_price": 18500.00,
        "last_traded_price": 18550.50,
        "market_value": 1855050.00,
        "pnl_absolute": 5050.00,
        "multiplier": 50,
        "position_type": "open"
      }
    ],
    "day_positions": []
  }
}