Get full quote (OHLC + depth summary)
quote() returns much more than ltp() — today's OHLC, volume, open interest (for F&O), and a snapshot of top-of-book depth.
quotes = kite.quote(["NSE:INFY"])
print(quotes["NSE:INFY"])
{
"instrument_token": 408065,
"last_price": 1478.9,
"volume": 3821450,
"buy_quantity": 12500,
"sell_quantity": 9800,
"ohlc": {"open": 1465.0, "high": 1482.0, "low": 1460.5, "close": 1470.2},
"net_change": 8.7,
"oi": 0, # open interest, non-zero for F&O
"oi_day_high": 0,
"oi_day_low": 0,
"depth": {
"buy": [{"price": 1478.8, "quantity": 75, "orders": 3}, ...], # 5 levels
"sell": [{"price": 1479.0, "quantity": 60, "orders": 2}, ...], # 5 levels
},
}
close in ohlc is *yesterday's* close, not today's
A common misread: ohlc.close is the previous trading day's closing price (used to compute net_change), not today's current close (the market is still open). Today's running high/low/open are the other three fields.
def percent_change_from_prev_close(quote: dict) -> float:
prev_close = quote["ohlc"]["close"]
return (quote["last_price"] - prev_close) / prev_close * 100
When to use quote() vs ltp() vs ohlc()
ltp()— cheapest, just price. Use for frequent polling of many symbols where you only need price.ohlc()— price + today's OHLC, no depth. Middle ground.quote()— everything, including depth and OI. Use when you actually need depth (e.g. estimating slippage before a market order, chapter 86) or OI (F&O strategies) — it's the most expensive call of the three, use sparingly in tight loops.