dhan raw
Call any Dhan API path directly. Use it for newly released Dhan endpoints that the CLI
hasn’t been wrapped around yet, while still keeping authentication and the --json / --no-color output contract consistent.
Commands
Section titled “Commands”| Subcommand | HTTP | Purpose | Flags |
|---|---|---|---|
dhan raw get <path> |
GET | Unwrapped GET. | — |
dhan raw delete <path> |
DELETE | Unwrapped DELETE. | — |
dhan raw post <path> --file <json> [--include-client-id] |
POST | Unwrapped POST. | --file (req), --include-client-id |
dhan raw put <path> --file <json> [--include-client-id] |
PUT | Unwrapped PUT. | --file (req), --include-client-id |
<path> is the suffix after /v2/ — e.g. profile, globalstocks/marketstatus,
charts/rollingoption.
--include-client-id
Section titled “--include-client-id”For wrapped trading payloads (orders place, super place, etc.) the CLI auto-injects
dhanClientId into the top-level JSON body only when not already present. raw post /
raw put require the explicit --include-client-id flag to opt in to the same injection —
the default is no injection, so you control the body shape precisely.
Examples
Section titled “Examples”dhan raw get profile --json --no-colordhan raw get globalstocks/marketstatus --json --no-colordhan raw post charts/rollingoption --file payload.json --json --no-colordhan raw post globalstocks/margincalculator --file payload.json --include-client-id --json --no-colorWhen to use raw
Section titled “When to use raw”- A Dhan endpoint was added after the last CLI release and isn’t yet wrapped.
- You need an unusual method on a wrapped endpoint that the CLI doesn’t expose.
Do not use raw to bypass agent guardrails — there’s no --yes enforcement on
mutating raw commands, so the operator (or agent) takes full responsibility for the payload
they send.
See also
Section titled “See also”- Terminal agent guide — the raw escape hatch keeps auth and output behaviour consistent so it’s safe to use from terminal agents.