Summary
A dependency resolution failure on Dhan Cloud’s Python execution environment is preventing dhanhq==2.3.0rc1 from installing on any deployment, despite being explicitly pinned in the user’s own requirements.txt. As a direct consequence, Global Stocks functionality (holdings retrieval, live tick feed, and order placement) is unavailable, since the environment silently falls back to an older, incompatible dhanhq build. This issue is reproducible and appears to originate from Dhan Cloud’s own injected base dependencies, not from user configuration.
Technical Detail
Dhan Cloud appears to prepend a set of its own base dependencies to the user-supplied requirements.txt prior to installation. One of these injected lines pins numpy==2.5.1, a version that is not available for the Python interpreter version running in the sandbox. The resulting pip failure, captured from a live deployment log, is as follows:
ERROR: Ignored the following versions that require a different python version:
1.21.2 Requires-Python >=3.7,<3.11; ... 2.5.0 Requires-Python >=3.12; 2.5.0rc1 Requires-Python >=3.12;
2.5.1 Requires-Python >=3.12; 2.5.2 Requires-Python >=3.12; 2.5.3 Requires-Python >=3.12
ERROR: Could not find a version that satisfies the requirement numpy==2.5.1 (from versions: 1.3.0, ... 2.4.6)
ERROR: No matching distribution found for numpy==2.5.1
The same log confirms the merged requirements file places the user’s own dhanhq==2.3.0rc1 entry at line 22 or later, indicating approximately twenty lines of platform-injected dependencies precede it. Because the overall pip install fails on this unsatisfiable constraint, no package in the user’s requirements.txt — including the pinned dhanhq pre-release — is actually installed. The execution environment instead falls back to whatever dhanhq version is already present in the base image.
Downstream Impact
The fallback dhanhq build does not expose the Global Stocks API surface. The following have been confirmed missing on live runs:
AttributeError: 'dhanhq' object has no attribute 'get_global_holdings'
AttributeError: 'dhanhq' object has no attribute 'place_global_order'
DhanContext and the live-tick feed class (GlobalStocksFeed) are similarly unavailable. The practical effect is that Global Stocks holdings cannot be read, the live feed cannot be started, and no order of any kind can be placed — regardless of how the user’s requirements.txt is configured.
Verification Performed
This was confirmed not to be a caching artifact. A deliberate change to the dependency set (rather than a reordering of existing lines) was made to force a genuine cache invalidation, and the subsequent deployment log confirmed a fresh pip install attempt — which is what surfaced the numpy==2.5.1 failure documented above. The failure is therefore reproducible on a clean install, not a stale-state issue.
Request
We would appreciate confirmation from the Dhan team on either of the following:
- Whether the platform-injected base dependency list can be corrected so that it does not pin a
numpyversion unavailable for the sandbox’s Python interpreter, or - Whether users can override or exclude the platform-injected dependency set from their own project’s installation.
Until this is resolved, dhanhq==2.3.0rc1 cannot be installed on Dhan Cloud under any configuration, which blocks Global Stocks trading entirely for any script run through the platform rather than locally. Full logs and screenshots are available on request to assist with triage.