DhanHQ 2.8.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +16 -5
- data/docs/RAILS_WEBSOCKET_INTEGRATION.md +1 -1
- data/docs/STANDALONE_RUBY_WEBSOCKET_INTEGRATION.md +1 -1
- data/docs/TECHNICAL_ANALYSIS.md +1 -1
- data/exe/DhanHQ +1 -1
- data/lib/DhanHQ/version.rb +1 -1
- data/lib/dhan_hq/analysis.rb +9 -0
- data/lib/dhan_hq/ta.rb +5 -0
- data/lib/dhan_hq.rb +0 -2
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf675947ad1be99c9af911e63ded9e131e85eec23703f9de3540c30a69b27749
|
|
4
|
+
data.tar.gz: 2248c7ea6c009e0017327d3483c2bf13354a4994bf7a4fc63b76519f44e93b07
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e485bf1b92f5de3277b6cc611cc7f29035f70ccbea9c59bd8945c456382e5bc415795ba7d60f5d69b193c3c2d270a9cd2ed53502870fed6a4731e0b7fc2ac94d
|
|
7
|
+
data.tar.gz: eb094317cddd3d927bfbd54a8b0b8598b367217cf67c0a8fc1000d0f5258bd6009007bb6be30b36868746f1fa2b22037fad4a9ad872f3ca0b294bad388656b32
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [3.0.0] - 2026-05-19
|
|
2
|
+
|
|
3
|
+
### Breaking Changes
|
|
4
|
+
|
|
5
|
+
- **TA and analysis modules are now opt-in**. `require 'dhan_hq'` no longer auto-loads `DhanHQ::Analysis::*` or `TA::*`. Explicitly require what you need:
|
|
6
|
+
```ruby
|
|
7
|
+
require 'dhan_hq/analysis' # OptionsBuyingAdvisor, MultiTimeframeAnalyzer
|
|
8
|
+
require 'dhan_hq/ta' # TA::TechnicalAnalysis, TA::Fetcher, TA::Candles
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- `exe/DhanHQ` now correctly uses `require "dhan_hq"` (was the old `require "DhanHQ"`).
|
|
14
|
+
- Gemspec file renamed back to `DhanHQ.gemspec` (was `dhan_hq.gemspec`) to resolve RubyGems "too similar" name collision and ensure successful push of the `DhanHQ` gem.
|
|
15
|
+
- Updated all `Gemfile` references and installation docs to use `DhanHQ` while maintaining `require 'dhan_hq'` for standard Ruby conventions.
|
|
16
|
+
- SimpleCov now tracks all `lib/**/*.rb` files (was models-only).
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
1
20
|
## [2.8.0] - 2026-03-21
|
|
2
21
|
|
|
3
22
|
### Added
|
data/README.md
CHANGED
|
@@ -153,16 +153,23 @@ gem install DhanHQ
|
|
|
153
153
|
|
|
154
154
|
**`bundle update` / `bundle install` warnings** — If you see "Local specification for rexml-3.2.8 has different dependencies" or "Unresolved or ambiguous specs during Gem::Specification.reset: psych", the bundle still completes successfully. To clear the rexml warning once, run: `gem cleanup rexml`. The psych message is a known Bundler quirk and can be ignored.
|
|
155
155
|
|
|
156
|
-
###
|
|
156
|
+
### Gem name vs require path
|
|
157
157
|
|
|
158
|
-
The require
|
|
158
|
+
RubyGems normalizes names, so `DhanHQ` and `dhan_hq` refer to the same slot — the published name stays `DhanHQ` and will never change. The require path has used snake_case since v2.1.5:
|
|
159
159
|
|
|
160
160
|
```ruby
|
|
161
|
-
#
|
|
162
|
-
|
|
161
|
+
# Gemfile # Ruby file
|
|
162
|
+
gem 'DhanHQ' require 'dhan_hq'
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
### Optional features
|
|
166
|
+
|
|
167
|
+
The core SDK (`require 'dhan_hq'`) only loads the API client. Technical analysis and the options advisor are opt-in:
|
|
168
|
+
|
|
169
|
+
```ruby
|
|
170
|
+
require 'dhan_hq/analysis' # DhanHQ::Analysis::OptionsBuyingAdvisor, MultiTimeframeAnalyzer
|
|
171
|
+
require 'dhan_hq/ta' # TA::TechnicalAnalysis, TA::Fetcher, TA::Candles
|
|
172
|
+
```
|
|
166
173
|
|
|
167
174
|
---
|
|
168
175
|
|
|
@@ -485,6 +492,10 @@ bundle exec rubocop # lint
|
|
|
485
492
|
bin/console # interactive console
|
|
486
493
|
```
|
|
487
494
|
|
|
495
|
+
## Disclaimer
|
|
496
|
+
|
|
497
|
+
This gem is an independent, community-maintained project and is **not officially affiliated with, endorsed by, or supported by Dhan (Mirae Asset Capital Markets)**. Trading in financial instruments carries significant risk. Use this SDK at your own risk and always verify order placement in a sandbox environment before going live.
|
|
498
|
+
|
|
488
499
|
## License
|
|
489
500
|
|
|
490
501
|
[MIT](LICENSE.txt)
|
data/docs/TECHNICAL_ANALYSIS.md
CHANGED
|
@@ -65,7 +65,7 @@ indicators = TA::TechnicalAnalysis.new.compute_from_file(
|
|
|
65
65
|
## Analyze Multi-Timeframe Bias
|
|
66
66
|
|
|
67
67
|
```ruby
|
|
68
|
-
require "
|
|
68
|
+
require "dhan_hq/analysis"
|
|
69
69
|
|
|
70
70
|
analyzer = DhanHQ::Analysis::MultiTimeframeAnalyzer.new(data: indicators)
|
|
71
71
|
summary = analyzer.call
|
data/exe/DhanHQ
CHANGED
data/lib/DhanHQ/version.rb
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "dhan_hq"
|
|
4
|
+
|
|
5
|
+
require_relative "../dhanhq/contracts/options_buying_advisor_contract"
|
|
6
|
+
require_relative "../dhanhq/analysis/helpers/bias_aggregator"
|
|
7
|
+
require_relative "../dhanhq/analysis/helpers/moneyness_helper"
|
|
8
|
+
require_relative "../dhanhq/analysis/multi_timeframe_analyzer"
|
|
9
|
+
require_relative "../dhanhq/analysis/options_buying_advisor"
|
data/lib/dhan_hq/ta.rb
ADDED
data/lib/dhan_hq.rb
CHANGED
|
@@ -34,10 +34,8 @@ module DhanHQ
|
|
|
34
34
|
"ws" => "WS"
|
|
35
35
|
)
|
|
36
36
|
LOADER.push_dir(File.join(__dir__, "DhanHQ"), namespace: self)
|
|
37
|
-
LOADER.push_dir(File.join(__dir__, "dhanhq"), namespace: self)
|
|
38
37
|
LOADER.collapse(File.join(__dir__, "DhanHQ", "core"))
|
|
39
38
|
LOADER.collapse(File.join(__dir__, "DhanHQ", "helpers"))
|
|
40
|
-
LOADER.collapse(File.join(__dir__, "dhanhq", "analysis", "helpers"))
|
|
41
39
|
LOADER.ignore(
|
|
42
40
|
File.join(__dir__, "DhanHQ", "errors.rb"),
|
|
43
41
|
File.join(__dir__, "DhanHQ", "version.rb")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: DhanHQ
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shubham Taywade
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -354,6 +354,8 @@ files:
|
|
|
354
354
|
- lib/DhanHQ/ws/sub_state.rb
|
|
355
355
|
- lib/DhanHQ/ws/websocket_packet_parser.rb
|
|
356
356
|
- lib/dhan_hq.rb
|
|
357
|
+
- lib/dhan_hq/analysis.rb
|
|
358
|
+
- lib/dhan_hq/ta.rb
|
|
357
359
|
- lib/dhanhq/analysis/helpers/bias_aggregator.rb
|
|
358
360
|
- lib/dhanhq/analysis/helpers/moneyness_helper.rb
|
|
359
361
|
- lib/dhanhq/analysis/multi_timeframe_analyzer.rb
|