Skip to main content
DhanHQ Developer Documentation

Everything you need to
build on Superfast APIs.

Trade with algorithms, connect with apps, build services - all with free of cost Trading API.

Explore APIs
Trading + Data APIAgent NativeLow Latency
first_order.pyPython
$ pip install dhanhq
...
from dhanhq import DhanContext, dhanhq

ctx = DhanContext(client_id, access_token)
dhan = dhanhq(ctx)

# place your first order
dhan.place_order(
  security_id="1333",
  exchange_segment="NSE_EQ",
  quantity=10,
)
MCPUpcoming

A native Model Context Protocol server is on the roadmap so any MCP-aware client can call DhanHQ directly. For AI coding agents today, use Agent Skills.

Upcoming

Native MCP server

Tool surface
Read & trade capabilities mapped to MCP tools.
Scopes & auth
Per-session permission model with explicit consent.
Upcoming

Supported clients

Claude Desktop
Drop-in JSON config when the spec lands
soon
Cursor
Connect inside your IDE
soon
Custom MCP client
BYO client over stdio or HTTP
soon
Preview
Dhan CloudComing soon

Cloud infrastructure purpose-built for algorithmic trading — deploy, run and scale strategies on reliable, low-latency infra without managing servers.

ProjectComing soon

Projects

Create, version and deploy strategies on the Dhan Cloud runtime — no servers to babysit.

0 of 5 slots· Learn more →
RuntimePreview · 24h histogram

Runs & Deployments

Scheduled, event-driven and on-demand runs with full logs and one-click replay.