
Dhanhq
Trading toolkit for Dhan on NSE, BSE, and MCX, covering orders, portfolio, market data, and option chains.
- skills.sh installs
- 1.5K
- GitHub stars
- 44
- last updated
- Jul 14, 2026
Own this skill? Claim it
What it does
- Covers order placement, modification, and cancellation, plus portfolio holdings, positions, fund limits, and margin checks
- Includes live and historical market data, option chains with Greeks, instrument ID resolution, and WebSocket feeds for quotes and order updates
- Enforces confirmation before live orders,
LIMITby default, aRs. 50,000notional warning, F&O lot-size checks, and noCNCorMTFoutside equities - Designed for Python developers automating Indian market trading through a Dhan broker account, with static IP and Data Plan prerequisites noted
Install
$ npx -y skills add dhan-oss/dhanhq-skills --skill dhanhq -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
DhanHQ — Indian Market Trading Skill
Setup
Stable install:
pip install dhanhq
Use the current SDK branch when you need newer v2 capabilities such as 200-level depth or the latest helper coverage:
pip install --upgrade dhanhq
Minimal initialization:
from dhanhq import DhanContext, dhanhq
dhan_context = DhanContext("YOUR_CLIENT_ID", "YOUR_ACCESS_TOKEN")
dhan = dhanhq(dhan_context)
Environment-variable setup:
import os
from dhanhq import DhanContext, dhanhq
dhan_context = DhanContext(
os.environ["DHAN_CLIENT_ID"],
os.environ["DHAN_ACCESS_TOKEN"],
)
dhan = dhanhq(dhan_context)
If generating scripts for this repo, prefer:
from scripts.dhan_helpers import get_client
dhan, dhan_context = get_client()
Safety Rules — Always Enforce
Details
- Repository
- github.com/dhan-oss/dhanhq-skills
- Categories
- Finance & Trading, Data Science & Analytics, Python
- First seen
- Jul 14, 2026
Similar to Dhanhq
More Finance & Trading
Trayd McpMCP servertrayders41 starsTrade Robinhood brokerage accounts with portfolio, quote, and order tools.
Trade ItMCP servertrade-it-inc62 starsConnects brokerage accounts for holdings, orders, asset lookup, and approved trading.
trading-expertSkillpersonamanagmentlayer/pcl969 installsExpert guidance for algorithmic trading systems, market data processing, and execution with pre-trade risk checks.
longbridge-portfolioSkilllongbridge/skills4K installsAccount, position, and order tools for Longbridge, plus portfolio diagnosis, rebalancing, and risk frameworks.