Skip to content

Strategy Portfolio

Use strategy portfolio APIs to view positions, holdings, PnL, and intent orders grouped by stratTag.

A strategy tag is created when an order is placed or updated with a tag. In V3, one order can carry only one strategy tag.

Strategy tag rules

  • Use only one tag inside stratTags.
  • Use hyphen-separated tag names only, such as momentum-breakout.
  • Do not use underscores, spaces, colons, plus signs, timestamps, or other special characters.
  • Maximum tag length is 64 characters.
Base path: /sentinel/strategy-portfolio

Base URLs

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

Headers

Header Required Description
Authorization yes Bearer <session_token>
x-device-id yes Device ID used for the authenticated session
Content-Type for JSON body Use application/json for POST requests

List Active Strategy Tags

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

Example response:

{
  "stratTags": ["momentum-breakout", "weekly-hedge"]
}

Get Positions By Strategy Tag

Method: GET
Endpoint: /sentinel/strategy-portfolio/portfolio/positions
curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/portfolio/positions?tag=momentum-breakout' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>'

To fetch all tagged positions, omit the tag query parameter.

Example response:

{
  "stratPortfolios": [
    {
      "stratTag": "momentum-breakout",
      "portfolio": {
        "clientCode": "I00001_momentum-breakout",
        "positionStats": {
          "totalPnl": 12500,
          "totalPnlChg": 0.0,
          "todayPnl": 3400,
          "unrealisedPnl": 12500,
          "realisedPnl": 0
        },
        "positions": [
          {
            "refId": 73361,
            "zanskarName": "STOCK_IDEA.NSECM",
            "displayName": "IDEA",
            "derivativeType": "STOCK",
            "lotSize": 1,
            "exchange": "NSE",
            "asset": "IDEA",
            "symbol": "IDEA",
            "assetType": "STOCKS",
            "tickSize": 10,
            "deliveryType": "IDAY",
            "orderSide": "BUY",
            "status": "OPEN",
            "buyQty": 1,
            "sellQty": 0,
            "netQty": 1,
            "ltp": 1350,
            "pnl": 12500,
            "pnlChg": 0.0,
            "pnlToday": 3400,
            "positionId": "73361_IDAY"
          }
        ],
        "refreshTimestamp": 1784626674749914029
      }
    }
  ]
}

Get Holdings By Strategy Tag

Method: GET
Endpoint: /sentinel/strategy-portfolio/portfolio/holdings
curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/portfolio/holdings?tag=delivery-portfolio' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>'

To fetch all tagged holdings, omit the tag query parameter.

Example response:

{
  "stratPortfolios": [
    {
      "stratTag": "delivery-portfolio",
      "portfolio": {
        "clientCode": "I00001_delivery-portfolio",
        "holdingStats": {
          "investedAmount": 250000,
          "currentValue": 265000,
          "totalPnl": 15000,
          "totalPnlChg": 6.0,
          "dayPnl": 1200,
          "dayPnlChg": 0.45
        },
        "holdings": [
          {
            "refId": 73361,
            "isin": "INE669E01016",
            "zanskarName": "STOCK_IDEA.NSECM",
            "displayName": "IDEA",
            "derivativeType": "STOCK",
            "exchange": "NSE",
            "asset": "IDEA",
            "symbol": "IDEA",
            "assetType": "STOCKS",
            "qty": 10,
            "avgPrice": 1250,
            "ltp": 1350,
            "netPnl": 1000,
            "dayPnl": 200
          }
        ],
        "refreshTimestamp": 1784626674749914029
      }
    }
  ]
}

Get PnL Summary By Strategy Tag

Method: GET
Endpoint: /sentinel/strategy-portfolio/portfolio/summary
curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/portfolio/summary?tag=momentum-breakout' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>'

To fetch summary for all active strategy tags, omit the tag query parameter.

Example response:

{
  "stratPortfolios": [
    {
      "stratTag": "momentum-breakout",
      "totalPnl": 12500,
      "todayPnl": 3400,
      "startOfDayRealisedPnl": 0
    }
  ],
  "totalPnl": 12500
}

Get Orders By Strategy Tag

Method: GET
Endpoint: /sentinel/strategy-portfolio/orders

At least one tag query parameter is required.

curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/orders?tag=momentum-breakout' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>'

Example response:

{
  "ordersByTag": [
    {
      "stratTag": "momentum-breakout",
      "intentOrders": {
        "orders": {
          "open": [],
          "executed": [
            {
              "intentOrderId": 123456,
              "exchange": "NSE",
              "status": "EXECUTED",
              "refId": 73361,
              "filledQty": 1,
              "orderQty": 1,
              "deliveryType": "IDAY",
              "priceType": "MARKET",
              "validityType": "IOC",
              "stratTags": ["momentum-breakout"],
              "side": "BUY"
            }
          ],
          "cancelled": [],
          "rejected": [],
          "expired": [],
          "gtt": []
        }
      }
    }
  ]
}

Add Or Move A Tag On Orders

Method: POST
Endpoint: /sentinel/strategy-portfolio/orders

Add a tag to an order:

curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/orders' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
  "orders": [
    {
      "orderId": 123456,
      "oldStratTags": [],
      "newStratTags": ["momentum-breakout"]
    }
  ]
}'

Move an order from one tag to another:

curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/orders' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
  "orders": [
    {
      "orderId": 123456,
      "oldStratTags": ["momentum-breakout"],
      "newStratTags": ["weekly-hedge"]
    }
  ]
}'

Example response:

{
  "results": [
    {
      "orderId": 123456,
      "updatedStratTags": ["weekly-hedge"]
    }
  ]
}

Clear A Tag From An Order

curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/orders' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
  "orders": [
    {
      "orderId": 123456,
      "clearTags": true
    }
  ]
}'

Apply One Tag To Multiple Orders

Method: POST
Endpoint: /sentinel/strategy-portfolio/tag/edit-orders
curl --location 'https://api.nubra.io/sentinel/strategy-portfolio/tag/edit-orders' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
  "orderIds": [123456, 123457],
  "stratTag": "weekly-hedge"
}'

Example response:

{
  "results": [
    {
      "orderId": 123456,
      "updatedStratTags": ["weekly-hedge"]
    },
    {
      "orderId": 123457,
      "updatedStratTags": ["weekly-hedge"]
    }
  ]
}

Delete A Strategy Portfolio

Deleting a strategy portfolio removes the tag from the portfolio view. The orders themselves are not deleted.

Method: DELETE
Endpoint: /sentinel/strategy-portfolio
curl --location --request DELETE 'https://api.nubra.io/sentinel/strategy-portfolio?tag=weekly-hedge' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>'

Success response:

204 No Content

Response Scope

API Scope
GET /sentinel/strategy-portfolio Active strategy tags for the account
GET /sentinel/strategy-portfolio/portfolio/positions Filled portfolio positions grouped by tag
GET /sentinel/strategy-portfolio/portfolio/holdings Holdings grouped by tag
GET /sentinel/strategy-portfolio/portfolio/summary Strategy-level PnL summary
GET /sentinel/strategy-portfolio/orders Intent orders grouped by tag and status

Important Rules

Important Rules

  • Strategy portfolio is available for V3 mapped accounts.
  • One order can have only one strategy tag.
  • Portfolio views such as positions, holdings, and summary reflect filled portfolio data.
  • Orders by tag is an intent-order view and can show open, executed, cancelled, rejected, expired, and GTT buckets.
  • Monetary fields are typically returned in exchange-native integer units such as paise for NSE instruments.
  1. Positions
  2. Holdings
  3. Get Orders
NEO Assistant