Funds¶
Use funds() to fetch the current funds and margin snapshot for the account, including available cash, blocked margin, collateral, MTM values, brokerage, and withdrawal-related fields.
LLM guidance
Use this page for fetched capital and margin visibility, not for live streaming updates or pre-trade request-specific margin simulation. Use Get Margin when the goal is to estimate margin for a specific order payload.
Basic Usage¶
from nubra_python_sdk.portfolio.portfolio_data import NubraPortfolio
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.trading.trading_enum import TradingAPIVersion
nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True, trading_version=TradingAPIVersion.V3)
portfolio = NubraPortfolio(nubra)
result = portfolio.funds()
funds() returns the Trading API V3 funds and margin snapshot with the response fields documented below.
Accessing Data¶
pfm = result.portFundsAndMargin
print(pfm.clientCode)
print(pfm.startOfDayFunds)
print(pfm.netTradingAmount)
print(pfm.netWithdrawalAmount)
print(pfm.totalCollateral)
print(pfm.netMarginAvailable)
print(pfm.totalMarginBlocked)
print(pfm.derivativeMarginBlocked)
print(pfm.brokerage)
Request Contract¶
| Input | Meaning |
|---|---|
NubraPortfolio(nubra).funds() |
fetch the Trading API V3 funds and margin snapshot |
Response Contract¶
| Field | Type | Meaning |
|---|---|---|
message |
str |
response message |
portFundsAndMargin.clientCode |
str |
trading account client code |
portFundsAndMargin.startOfDayFunds |
int |
opening funds balance |
portFundsAndMargin.netTradingAmount |
int |
net trading amount |
portFundsAndMargin.netWithdrawalAmount |
int |
net withdrawal amount |
portFundsAndMargin.totalCollateral |
int |
total collateral |
portFundsAndMargin.netMarginAvailable |
int |
currently available margin |
portFundsAndMargin.totalMarginBlocked |
int |
total blocked margin |
portFundsAndMargin.derivativeMarginBlocked |
int |
blocked derivative margin |
portFundsAndMargin.brokerage |
int |
brokerage field when present |
Response Meaning¶
Important funds-level fields include:
| Field | Meaning |
|---|---|
payInCredit |
funds credited through pay-in |
payOutDebit |
funds debited through payout |
netDerivativePremBuy |
option premium paid |
netDerivativePremSell |
option premium received |
cashBlockedCncTraded |
cash blocked for CNC trades |
cashBlockedCncOpen |
cash blocked for open CNC orders |
cashBlockedDerivOpen |
cash blocked for open derivative orders |
mtmDeriv |
derivative mark-to-market value |
mtmEqIdayCnc |
intraday and CNC equity MTM |
mtmEqDelivery |
delivery equity MTM |
startOfDayCollateral |
opening collateral value |
idayCollateralPledge |
intraday collateral from pledged holdings |
idayCollateralPledgeSell |
intraday collateral from sell-side pledge benefit |
marginUsedDerivTraded |
used margin for derivative trades |
marginBlockDerivOpenOrder |
blocked margin for derivative open orders |
marginUsedEqIday |
used intraday equity margin |
marginBlockedEqIdayOpen |
blocked intraday equity order margin |
Important Rules¶
Important Rules
- Funds are account-state snapshots. The response does not auto-update after it is returned.
- Use
NubraPortfolio(nubra).funds()for Trading API V3 funds and margin. - Cash, collateral, margin, MTM, and brokerage fields are typically returned in exchange-native integer units such as paise for NSE-linked values.
- Use
funds()for available-capital visibility, not as a substitute for pre-trade margin estimation. - Use Get Margin before order placement when you need request-specific margin requirements.
- Use environment-correct login and account context. UAT and PROD funds are separate.