Positions & Holdings FAQs¶
Below are the most common questions related to fetching live portfolio data, the difference between Day/Net positions and Holdings, and converting product types. Click any question to expand the detailed answer.
Portfolio Data Retrieval¶
How can I fetch my live positions and holdings through the API?
Positions (Intraday or F&O):
from nubra_python_sdk.portfolio.portfolio_data import NubraPortfolio
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
nubra = InitNubraSdk(NubraEnv.PROD)
portfolio = NubraPortfolio(nubra)
result = portfolio.positions()
for pos in result.portfolio.opt_positions:
print(pos.symbol, pos.quantity, pos.pnl)
Holdings (Equity or Delivery):
result = portfolio.holdings()
for h in result.portfolio.holdings:
print(h.symbol, h.quantity, h.current_value, h.net_pnl)
These give you a live snapshot of both open trading positions and demat holdings, including current quantities, MTM, realised/unrealised P&L, and pledged status.
Position Types & Reconciliation¶
What’s the difference between Day and Net positions in Nubra?
-
Day Positions (Intraday):
Represent trades opened and closed within the same trading day. They reflect real-time intraday quantities, MTM, and P&L for MIS (intraday) orders.
You can view these via the Positions API (
portfolio.positions()), understock_positions,fut_positions, andopt_positions.Intraday mark-to-market (MTM) for these is also visible in the Funds API under:
result.port_funds_and_margin.mtm_eq_iday_cnc -
Net Positions:
Represent overnight or carry-forward positions (NRML/CNC) that persist beyond the current trading day.
These appear in the Holdings API (
portfolio.holdings()) as active holdings, includinginvested_value,current_value, and long-term P&L fields (net_pnl,day_pnl,total_pnl).
In short:
positions()→ intraday/day-level breakdownsholdings()→ overnight/net positions and demat holdings
I just bought a stock for overnight — why does it show in Positions but not in Holdings?
When you buy a stock in CNC/NRML mode during market hours, it first appears under Positions (via portfolio.positions()) because the trade is executed but not yet settled into your demat account.
Here’s what happens step by step:
-
Trade Execution:
Once your CNC (delivery) buy order is filled, the quantity and average price appear under:
result.portfolio.stock_positionsThis represents your traded-but-not-settled position.
-
End-of-Day (EOD) Settlement:
At the end of the trading day, your broker sends the buy trade for T+1 or T+2 settlement (depending on the exchange).
-
Holding Update (Next Day):
Once the shares are credited to your demat account, they move from
positions()→ toholdings():result.portfolio.holdingsAt that point, you’ll see them reflected as a holding with fields like
quantity,avg_price,current_value, andnet_pnl.
Management & Product Conversion¶
How do I convert a position from MIS to NRML or vice versa?
You can convert MIS ↔ NRML by:
- Closing the current position, and
- Re-entering it under the new product type.
In API terms:
- Fetch live position via
portfolio.positions()(checkproductfield —MISorNRML). - Place an opposite-side order to close the existing MIS/NRML position.
- Place a new order in the desired product type.
Why can’t I sell unpledged holdings on the same day?
When you unpledge a stock, it first moves from pledged margin pool → back to demat balance, but this settlement completes on T+1.
Until then:
- The quantity appears as
available_to_pledgein the Holdings API, but not yet in your free holdings balance. - You’ll see it under
t1_qty(T+1 unsettled quantity).
Hence, you cannot sell unpledged holdings on the same day, as they are not yet released for delivery sell.
Once settlement completes, it will reflect under quantity and can then be sold.
Continue exploring related FAQs¶
Click any category to navigate directly to its FAQ group.
Market Data & WebSocket
Snapshot vs streaming, tick frequency, depth, and subscriptions.
Historical Data & Analytics
Intervals, corporate actions, adjustments, gaps, candle logic.
Orders & Execution
Order types, flexi & basket orders, modify/cancel, common errors.
Margins & Risk
Margin checks, aggressor limits, live updates, and risk rules.
Positions & Holdings
Day vs net, conversions, holding logic, and reconciliation.
Options Greeks & Strategy APIs
Real-time Greeks, IV/Delta strategies, multi-leg logic.