Skip to content

Holdings

Use holdings() to fetch the current holdings snapshot for the linked account, including invested value, current value, PnL, haircut, pledge-related fields, and holding-level metadata.

LLM guidance

Use this page for demat inventory and collateral-aware holdings state, not for order placement or intraday execution tracking. Holdings are fetched snapshots of what the account currently owns.

Basic Usage

from nubra_python_sdk.portfolio.portfolio_data import NubraPortfolio
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv

nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
portfolio = NubraPortfolio(nubra)

result = portfolio.holdings()

Accessing Data

print(result.portfolio.client_code)
print(result.portfolio.holding_stats.invested_amount)
print(result.portfolio.holding_stats.total_pnl)
print(result.portfolio.holding_stats.day_pnl)

if result.portfolio.holdings:
    holding = result.portfolio.holdings[0]
    print(holding.symbol)
    print(holding.quantity)
    print(holding.avg_price)
    print(holding.prev_close)
    print(holding.last_traded_price)
    print(holding.current_value)
    print(holding.net_pnl)
    print(holding.margin_benefit)
    print(holding.available_to_pledge)

Request Contract

Input Meaning
holdings() fetch the current holdings snapshot

Response Contract

Field Type Meaning
message str response message
portfolio.client_code str demat-linked client code
portfolio.holding_stats.invested_amount int total invested amount
portfolio.holding_stats.current_value int current market value
portfolio.holding_stats.total_pnl int total PnL
portfolio.holding_stats.total_pnl_chg float total PnL percentage change
portfolio.holding_stats.day_pnl int day PnL
portfolio.holding_stats.day_pnl_chg float day PnL percentage change
portfolio.holdings list[Holding] holding-level records

Response Meaning

Important holding-level fields include:

Field Meaning
ref_id instrument reference ID
symbol tradable symbol
quantity current held quantity
pledged_qty quantity already pledged
t1_qty unsettled T+1 quantity
avg_price average acquisition price
prev_close previous close
last_traded_price latest traded price
invested_value invested amount for the holding
current_value current marked-to-market value
net_pnl net holding PnL
day_pnl day holding PnL
haircut haircut used for collateral valuation
margin_benefit margin value available from the holding
available_to_pledge quantity still available to pledge
is_pledgeable whether the holding is eligible for pledge

Important Rules

Important Rules

  • Holdings are account-state snapshots. The response does not auto-update after it is returned.
  • Holding price, value, and PnL fields are typically returned in exchange-native integer units such as paise for NSE instruments.
  • pledged_qty, available_to_pledge, and is_pledgeable are holding-specific operational fields and may be absent for instruments where they do not apply.
  • Use holdings for demat inventory and collateral context, not for intraday order-state tracking.
  • Use environment-correct login and account context. UAT and PROD holdings are separate.
  1. Positions
  2. Funds
  3. Get Margin
NEO Assistant