Skip to content

Releases: dhan-oss/DhanHQ-py

v2.3.0rc1

v2.3.0rc1 Pre-release
Pre-release

Choose a tag to compare

@dhan-oss dhan-oss released this 07 Jul 05:52

Add major new features for v2.3.0 release candidate:

  • Conditional Orders: Price/indicator-based alert system to trigger orders automatically
  • Global Stocks: Trade US stocks with orders, holdings, margin, and market status APIs
  • Global Stocks Live Feed: Real-time WebSocket feed for US stock trades and OHLC data
  • P&L Based Exit: Auto square-off on cumulative profit/loss thresholds
  • Multi-leg Margin Calculator: Calculate combined margin for multi-leg strategies with hedge benefits

Also includes:

  • Enhanced FullDepth callback handling
  • New Portfolio.exit_all_positions() method
  • Updated documentation links and README
  • Comprehensive examples and unit tests
  • Python 3.10+ requirement and Dev Status classifier

v2.2.0

Choose a tag to compare

@dhan-oss dhan-oss released this 24 Apr 11:41

v2.2.0 — What’s New
This release significantly expands the capabilities of the DhanHQ Python Library, bringing deeper market data access, improved instrument coverage, and new order-management utilities.

🔍 Deeper Market Data
You can now access the full market depth (up to 200 levels) directly via DhanHQ APIs, fully supported in the Python library. This enables advanced order-book analysis, liquidity tracking, and high-precision trading strategies.

🕒 Expired Options Data
The library now supports fetching expired options data across both NSE and BSE instruments. This makes it easier to backtest strategies, analyse historical derivatives behavior, and perform post-expiry research without external data sources.

⚡ Super Orders
Super Orders are now available in the Python library—smart orders designed to help manage risk and profit targets more efficiently. This simplifies the execution of advanced trading logic while maintaining tighter control over exits.

🔐 IP Management via API
You can now set, modify, and manage IP restrictions for your account directly from the Python library. Sample code for IP management is available under the examples section to help you get started quickly.

🚀 Improvements & Enhancements
Along with these major updates, v2.2.0 includes multiple internal improvements and expanded API coverage, making more DhanHQ functionality accessible directly through the Python SDK.

v2.2.0rc1

v2.2.0rc1 Pre-release
Pre-release

Choose a tag to compare

@dhan-oss dhan-oss released this 02 Jan 14:11

v2.2.0 — What’s New

This release significantly expands the capabilities of the DhanHQ Python Library, bringing deeper market data access, improved instrument coverage, and new order-management utilities.

🔍 Deeper Market Data
You can now access the full market depth (up to 200 levels) directly via DhanHQ APIs, fully supported in the Python library. This enables advanced order-book analysis, liquidity tracking, and high-precision trading strategies.

🕒 Expired Options Data
The library now supports fetching expired options data across both NSE and BSE instruments. This makes it easier to backtest strategies, analyse historical derivatives behavior, and perform post-expiry research without external data sources.

⚡ Super Orders
Super Orders are now available in the Python library—smart orders designed to help manage risk and profit targets more efficiently. This simplifies the execution of advanced trading logic while maintaining tighter control over exits.

🔐 IP Management via API
You can now set, modify, and manage IP restrictions for your account directly from the Python library. Sample code for IP management is available under the examples section to help you get started quickly.

🚀 Improvements & Enhancements
Along with these major updates, v2.2.0 includes multiple internal improvements and expanded API coverage, making more DhanHQ functionality accessible directly through the Python SDK.


⚠️ Pre-release & Breaking Changes Notice
v2.2.0 is currently available as a pre-release.
With the release of v2.2.0, there are breaking changes introduced since v2.1.0, which may impact existing integrations.

If you prefer stability, we recommend continuing with the current stable version.
To try the pre-release version, install it explicitly using:

pip install --pre dhanhq

v2.1.0

Choose a tag to compare

@dhan-oss dhan-oss released this 12 Mar 11:34

This is a major release with following in focus:

  • Added 20 Depth
  • Modular library
  • Added data, integration and unit tests

v2.0.2

Choose a tag to compare

@dhan-oss dhan-oss released this 29 Nov 08:57

Added compatibility for dependent library - Websockets v14.1

v2.0.1

Choose a tag to compare

@dhan-oss dhan-oss released this 07 Nov 06:26

Adding missing constants - for BSE_FNO and NSE_FNO

v2

v2

Choose a tag to compare

@dhan-oss dhan-oss released this 25 Oct 07:55

v2.0 - What's New

DhanHQ v2 extends execution capability with live order updates, market quotes and forever orders on superfast APIs. Some of the key highlights from this version are:

  • Fetch LTP, Quote (with OI) and Market Depth data directly on API, for upto 1000 instruments at once with Market Quote API.
  • Option Chain API which gives OI, greeks, volume, top bid/ask and price data of all strikes of a particular underlying.
  • Place, modify and manage your Forever Orders, including single and OCO orders to manage risk and trade efficiently with Forever Order API.
  • Order Updates are sent in real time via websockets, which will update order status of all your orders placed via any platform - order_update.
  • Intraday Minute Data now provides OHLC with Volume data for last 5 trading days across timeframes such as 1 min, 5 min, 15 min, 25 min and 60 min - intraday_minute_data.
  • Full Packet in Live Market Feed (marketfeed).
  • Margin Calculator (margin_calculator) and Kill Switch (kill_switch) APIs.

Breaking Changes

  • Replaced intraday_daily_minute_data and historical_minute_charts as functions from v1.2.4
  • quantity field needs to be placed order quantity instead of pending order quantity in Order Modification
  • EPOCH time instead of Julian time in Historical Data API, and same changed for convert_to_date_time function
  • historical_daily_data takes security_id as argument instead of symbol
  • Nomenclature changes in get_order_by_corelationID to get_order_by_correlationID.

You can read about all other updates from DhanHQ V2 here: DhanHQ Releases.

v1.3.3

Choose a tag to compare

@dhan-oss dhan-oss released this 01 Oct 06:51
ec627cd

Handling of SSL verification along with requirement addition of pyOpenSSL.

v1.3.2

Choose a tag to compare

@dhan-oss dhan-oss released this 22 Aug 13:22
2249034

Optimising marketfeed module

  • Adding upto 5000 instruments in a single list
  • Subscribing to multiple modes simultaneously
  • Websocket disconnect function
  • Removed Warning message

v1.3

Choose a tag to compare

@dhan-oss dhan-oss released this 01 Feb 11:59
a320eed

Adding class for Market Feed data

Live Market data is via DhanHQ Websockets - which establishes connection between your local and server.

Highlights of Python Client:

  • Initiate and Authorise Connection
  • Maintain Connection
  • Subscribe to Instruments
  • Parse receiving data from binary