dhan config
Manage non-secret preferences stored at %AppData%\dhan-cli\config.json (or
~/.config/dhan-cli/config.json on macOS/Linux). Never store secrets here.
Commands
Section titled “Commands”dhan config set <key> <value> --json --no-colordhan config get [key] --json --no-colorconfig get with no key dumps all preferences.
Standard keys
Section titled “Standard keys”| Key | Default | Purpose |
|---|---|---|
baseUrl |
https://api.dhan.co/v2/ |
Override the trading API base URL. Use only for controlled testing. |
authBaseUrl |
https://auth.dhan.co/ |
Override the auth base URL. |
redirectPort |
17890 |
Loopback callback port for auth login / auth partner-login. |
Examples
Section titled “Examples”dhan config set redirectPort 17890 --json --no-colordhan config set baseUrl https://api.dhan.co/v2/ --json --no-colordhan config get baseUrl --json --no-colordhan config get --json --no-color