I am writing to report and seek clarification on a dependency issue encountered while attempting to install and use the latest version of the Dhan-Tradehull library. I have described the environment, steps performed, and the exact issue in detail below so your engineering team can review it.
Environment Details
Operating System: Windows 10 (64-bit)
Python Version: Python 3.12.9
pip Version: Latest version installed via python -m pip install --upgrade pip
Installation Method: Standard pip installation from PyPI
Initial Objective
I was attempting to install and use the latest version of the Dhan-Tradehull library available on PyPI for building an automated trading workflow using Python.
Step 1: Attempt to install the latest Tradehull package
I attempted to install the latest version using the following command:
pip install Dhan-Tradehull==3.2.0
However, pip failed with a dependency resolution error indicating that a required dependency could not be found.
Observed Error
The pip installer returned the following type of error message:
“Could not find a version that satisfies the requirement dhanhq >= 2.1.0 (from Dhan-Tradehull)”
“No matching distribution found for dhanhq >= 2.1.0”
Step 2: Verification of available dhanhq versions on PyPI
To investigate further, I checked the versions available for the dhanhq package using:
pip index versions dhanhq
The versions available on PyPI appeared to be:
1.x series versions
2.0.0
2.0.1
2.0.2
2.2.0rc1 (release candidate)
There was no stable release version >= 2.1.0 available.
Dependency Mismatch Identified
The latest Dhan-Tradehull version (3.2.0) appears to require:
dhanhq >= 2.1.0
However, since a stable dhanhq version >= 2.1.0 is not available on PyPI, pip cannot resolve this dependency during installation.
Step 3: pip fallback installation
Because of this mismatch, pip automatically installed the latest compatible combination that satisfied available dependencies:
Dhan-Tradehull 3.0.6
dhanhq 2.0.2
This environment worked correctly and the API was functional.
Verification performed using:
pip show Dhan-Tradehull
pip show dhanhq
Resulting environment:
Python 3.12.9
Dhan-Tradehull 3.0.6
dhanhq 2.0.2
API calls such as authentication, LTP retrieval, ATM strike selection, and option LTP queries worked successfully with this configuration.
Step 4: Testing updated codebase provided by the community
In addition to the pip package, I also tested the updated local codebase file provided in the community:
Dhan_Tradehull_V2.py
This codebase reports internally:
“Codebase Version 2.8 : Solved - Strike Selection Issue”
Using this implementation with dhanhq 2.0.2 also worked correctly for the following functions:
get_ltp_data()
ATM_Strike_Selection()
get_live_pnl()
Instrument file loading
Spot and option LTP retrieval
Current Understanding
Based on the above testing, the main issue appears to be a dependency mismatch in the PyPI release.
Specifically:
The latest version of Dhan-Tradehull requires dhanhq >= 2.1.0
However, a stable dhanhq version >= 2.1.0 does not appear to be available on PyPI.
Because of this, installing the latest Tradehull version in a clean Python environment fails.
Questions for the Engineering Team
-
Has dhanhq >= 2.1.0 been officially released but not published on PyPI?
-
Is the dependency requirement in Dhan-Tradehull 3.2.x intended to be dhanhq >= 2.0.x instead?
-
Is there a recommended stable combination of versions that should currently be used for production environments?
-
Will a corrected dependency version be published for the Tradehull package?
My goal is to ensure that I am using the officially supported and stable library versions for building an automated trading workflow.
If there is updated documentation or a recommended installation method for the latest versions, I would appreciate guidance.
Thank you for your support and for maintaining the API ecosystem.