Overview of DhanHQ-py features
mainDhanHQ-py is the official Python client for the Dhan API, designed to automate investing and trading. Key capabilities include:
- Order Management: Place, cancel, or modify orders; retrieve order/trade status, order book, and tradebook.
- Live Market Feed: Real-time market data via WebSocket.
- Market Quote: REST API snapshots in ticker, quote, or full mode.
- Option Chain: Retrieve entire option chains including OI, greeks, volume, and bid/ask data.
- Forever Orders: Manage single or OCO (One-Cancels-the-Other) swing trades.
- Conditional Orders: Automate orders based on price or technical-indicator conditions (Equities & Indices).
- Global Stocks: Trade US stocks, including orders, holdings, fund limits, and market status, with a dedicated live feed.
- P&L based Exit: Automatically square-off positions when cumulative profit or loss hits specific thresholds.
- Multi-leg Margin Calculator: Compute combined margin for multiple orders with hedge benefits.
- Portfolio Management: Retrieve and manage holdings and positions.
- Historical Data: Fetch OHLC candle data (multiple minute timeframes and Daily) for various scrips.
- Fund Details: Access account balance, margin utilized, collateral, and margin requirements.
- eDIS Authorisation: Manage CDSL eDIS flows, including T-PIN generation and marking stocks for sale.