Skip to content

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.

SDK 0.5.2 also exposes the optional indicative_close_price field when the exchange provides an indicative closing price for an applicable NSE or BSE cash-market instrument and session.

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.PROD, 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.PROD, 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}")
print(f"Indicative Close Price: {nifty_price.indicative_close_price}")

# Print every parsed response field, including fields that are None.
print(nifty_price.model_dump(exclude_none=False))

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
    indicative_close_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
indicative_close_price int yes exchange-native integer indicative closing price when provided; otherwise None

Implementation Notes

  • change represents percentage movement from the previous close.
  • indicative_close_price is optional and may be None outside the applicable indicative-price session or when the exchange does not provide it.
  • The field is currently applicable to eligible NSE and BSE cash-market instruments; it is not guaranteed in every snapshot.
  • 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 from NSE, BSE, and MCX.
  • price and prev_close are 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.

The most common next pages are:

  1. Get Instruments
  2. Market Quotes
  3. Place Order
NEO Assistant