dhan historical
Read historical candles from Dhan. Requires a Dhan Data API subscription (the same data
subscription as quote).
Commands
Section titled “Commands”| Subcommand | Dhan endpoint | Purpose | Flags |
|---|---|---|---|
dhan historical daily |
POST charts/historical |
Daily candles. | --file or --security-id + --exchange-segment + --instrument + --from + --to |
dhan historical intraday |
POST charts/intraday |
Intraday candles. | Above plus --interval (1/5/15/30/60) |
dhan historical rolling-options --file <json> |
POST charts/rollingoption |
Read expired rolling option data. | --file (req) |
Use --file <json> for the API-shaped request body, or the explicit flags. For daily
and intraday, one of those two sources must be supplied; both modes are equivalent — the
flags are conveniences that build the JSON body.
Examples
Section titled “Examples”# Daily candles via explicit flagsdhan historical daily \ --security-id 1333 \ --exchange-segment NSE_EQ \ --instrument EQUITY \ --from 2026-01-01 \ --to 2026-01-02 \ --json --no-color
# Intraday candles — 5-minute intervaldhan historical intraday \ --security-id 1333 \ --exchange-segment NSE_EQ \ --instrument EQUITY \ --interval 5 \ --from 2026-01-01 \ --to 2026-01-02 \ --json --no-color
# Rolling option datadhan historical rolling-options --file rolling.json --json --no-colorSee also
Section titled “See also”dhan instruments— resolve a symbol to its numeric security ID.