dhan quote
Read live market quotes. Requires a separately-subscribed Dhan Data API — without it the underlying endpoints return a permission error.
Uses numeric security IDs (from dhan instruments search), not
exchange-prefixed symbols. The internal body shape is {"<segment>": [<id>, ...]}.
Commands
Section titled “Commands”Each subcommand supports --file <json> (overrides args), --segment (default NSE_EQ),
and zero-or-more positional security-id integers.
| Subcommand | Dhan endpoint | Purpose |
|---|---|---|
dhan quote ltp --segment <seg> <id>... |
POST marketfeed/ltp |
Last traded prices. |
dhan quote ohlc --segment <seg> <id>... |
POST marketfeed/ohlc |
LTP and OHLC. |
dhan quote full --segment <seg> <id>... |
POST marketfeed/quote |
Full quote and market depth. |
Examples
Section titled “Examples”# By positional IDsdhan quote ltp --segment NSE_EQ 1333 --json --no-colordhan quote full --segment NSE_FNO 49081 1333 --json --no-color
# By file (overrides the positional IDs)dhan quote ohlc --file quote.json --json --no-colorThe --file <json> shape:
{ "NSE_EQ": [1333, 11536], "NSE_FNO": [49081]}See also
Section titled “See also”dhan instruments— resolve a symbol to its numeric security ID.- Concepts › Static IP whitelisting — quotes
use the
access-tokenandclient-idheaders, no static-IP needed.