Current Price¶
current_price() returns a lightweight latest-price snapshot for one instrument without order book depth. Use it when you only need the latest traded price, previous close, and percentage change.
This API supports instruments from NSE, BSE, and MCX. If exchange is omitted, the SDK uses NSE.
When To Use This Page¶
Use this page when you need to:
- fetch a quick latest-price snapshot for one symbol
- show top-line prices in dashboards or simple monitoring tools
- check price movement from the previous close
- avoid the heavier market-quote response when depth is not needed
LLM guidance
Prefer current_price() over full market-quote methods when only the latest price, previous close, and percentage change are needed. Use market quotes only when you need richer quote detail or depth-related fields.
Basic Usage¶
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
market_data = MarketData(nubra)
nifty_price = market_data.current_price("NIFTY", exchange="NSE")
reliance_price = market_data.current_price("RELIANCE", exchange="NSE")
print(nifty_price)
print(reliance_price)
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
nubra = InitNubraSdk(NubraEnv.UAT, env_creds=True)
market_data = MarketData(nubra)
sensex_price = market_data.current_price("SENSEX", exchange="BSE")
hdfc_price = market_data.current_price("HDFCBANK", exchange="BSE")
print(sensex_price)
print(hdfc_price)
from nubra_python_sdk.marketdata.market_data import MarketData
from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
nubra = InitNubraSdk(NubraEnv.PROD, env_creds=True)
market_data = MarketData(nubra)
crudeoil_price = market_data.current_price("FUT_CRUDEOIL_20260618", exchange="MCX")
gold_price = market_data.current_price("GOLD", exchange="MCX")
print(crudeoil_price)
print(gold_price)
Accessing Response Fields¶
print(f"Message: {nifty_price.message}")
print(f"Exchange: {nifty_price.exchange}")
print(f"Current Price: {nifty_price.price}")
print(f"Previous Close: {nifty_price.prev_close}")
print(f"Change (%): {nifty_price.change}")
Request Contract¶
| Parameter | Type | Required | Example | Meaning |
|---|---|---|---|---|
instrument |
str |
yes | NIFTY, RELIANCE |
instrument symbol |
exchange |
enum-like | no | NSE, BSE, MCX |
exchange override, defaults to NSE |
Response Shape¶
Response Shape
class CurrentPrice(BaseModel):
change: Optional[float] = None
message: str
exchange: Optional[str] = None
prev_close: Optional[int] = None
price: Optional[int] = None
Response Contract¶
| Field | Type | Nullable | Unit | Meaning |
|---|---|---|---|---|
message |
str |
no | n/a | response label |
exchange |
str |
yes | n/a | exchange name |
price |
int |
yes | exchange-native integer | latest traded price |
prev_close |
int |
yes | exchange-native integer | previous close |
change |
float |
yes | percent | percentage change from previous close |
Implementation Notes¶
changerepresents percentage movement from the previous close.- If your UI needs decimal display values, convert them in the display layer.
Important Rules
- Use
current_price()for lightweight latest-price checks, not for full quote depth. current_price()supports symbols fromNSE,BSE, andMCX.priceandprev_closeare returned in exchange-native integer units such as paise for NSE instruments.- This is a snapshot response, not a realtime streaming feed.
- Use the correct symbol for the current environment and exchange.
- Resolve instruments first when you are unsure about symbol correctness or downstream trading usage.
- If you need richer quote detail or order-book depth, use Market Quotes instead.
What To Read Next¶
The most common next pages are: