Skip to content

Positions

Fetch current portfolio positions for a V3 mapped account. The response returns a flattened positions list with buy, sell, and net quantity fields.

Method: GET
Endpoint: /sentinel/portfolio/positions

Base URLs

Environment Base URL
PROD https://api.nubra.io
UAT https://uatapi.nubra.io

cURL

curl --location 'https://api.nubra.io/sentinel/portfolio/positions' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>'

Request Payload

This is a GET endpoint and does not require a request body.

Response Structure

{
  "message": "positions",
  "portfolio": {
    "clientCode": "XXXXXX",
    "positionStats": {
      "totalPnl": -75180,
      "totalPnlChg": -35.191193
    },
    "positions": [
      {
        "refId": 847854,
        "symbol": "YESBANK",
        "exchange": "BSE",
        "asset": "YESBANK",
        "assetType": "STOCK",
        "deliveryType": "CNC",
        "orderSide": "BUY",
        "netQuantity": 1,
        "buyQuantity": 1,
        "sellQuantity": 0,
        "lastTradedPrice": 1853,
        "avgPrice": 1868,
        "avgBuyPrice": 1868,
        "avgSellPrice": 0,
        "pnl": -15,
        "pnlChg": -0.8029979
      }
    ]
  }
}

Response Attributes

Field Type Description
message string Response message
portfolio.clientCode string Trading account client code
portfolio.positionStats.totalPnl number Total profit or loss
portfolio.positionStats.totalPnlChg number Total profit or loss percentage change
portfolio.positions array Flattened list of current positions

Important position-level fields include:

Field Description
portfolio.positions[].refId Instrument reference ID
portfolio.positions[].symbol Tradable symbol
portfolio.positions[].exchange Exchange such as NSE or BSE
portfolio.positions[].asset Instrument asset or underlying
portfolio.positions[].assetType Instrument asset classification when returned
portfolio.positions[].deliveryType Product or delivery bucket
portfolio.positions[].orderSide Direction associated with the position
portfolio.positions[].netQuantity Net position quantity
portfolio.positions[].buyQuantity Total buy quantity
portfolio.positions[].sellQuantity Total sell quantity
portfolio.positions[].lastTradedPrice Latest traded price used for valuation
portfolio.positions[].avgPrice Average position price
portfolio.positions[].avgBuyPrice Average buy price
portfolio.positions[].avgSellPrice Average sell price
portfolio.positions[].pnl Current position profit or loss
portfolio.positions[].pnlChg Percentage change in profit or loss

Important Rules

Important Rules

  • Use this endpoint for V3 mapped accounts.
  • This endpoint is a portfolio snapshot. The response does not auto-update after it is returned.
  • Position price and PnL fields are typically returned in exchange-native integer units such as paise for NSE instruments.
  • Use realtime order or market-data streams when you need continuously updating values instead of a fetched portfolio snapshot.
  • Use the environment that matches the mapped account. PROD and UAT portfolios are separate.
NEO Assistant