DhanHQ 2.2.0 → 2.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51941a246763b26e7a08508c3bb5349079ed6312e1ef5bf7593dadb36808e13c
4
- data.tar.gz: 12c7d276dbe39ee14df02feff9c61914ac91d049a10b644ac7e184778eea1a68
3
+ metadata.gz: 7f0476726fe811ed0f25424e4e29c0e4d0b2bb7f18732883aed5902ae8fde017
4
+ data.tar.gz: ece7774203912cb63ce57c9b723450290e01239415d573aa4b5a190039023ded
5
5
  SHA512:
6
- metadata.gz: cfc4cfd03d5d722d4bc8451d71d7189404fc38f931d1ab8772bc796191934b72d82239d5096e272b9aa27aea1a974bb2c6a469cd670dbb7ba85f205d6c291ab8
7
- data.tar.gz: f7a17fafd835d9ceb339b255f17f1e408692af094c2658ee9aedf13f013e8558a9170771a7acf2b03b35e39412d9dcaf308ac9e76db168cb39e7b1f745ee1a35
6
+ metadata.gz: 4733638b5d2687f0f4ebfb9f08925ae980ce90d822fe0473438b43057b242e64f6cf3915a69b602adc87eeb9b2d282c62c2446ecef44cd2f327d2997844b5d52
7
+ data.tar.gz: fec3e15617126ddc8f218765b284f1ba8e7c14defd0c3d41b3b4d5cf16480188a0abdb5f449835c7b4243ed21a606a38566ca4858a50ecf56f1ed8824f4864d8
@@ -84,6 +84,7 @@ module DhanHQ
84
84
  if access_token_provider
85
85
  token = access_token_provider.call
86
86
  raise DhanHQ::AuthenticationError, "access_token_provider returned nil or empty" if token.nil? || token.to_s.empty?
87
+
87
88
  token.to_s
88
89
  else
89
90
  access_token
@@ -2,5 +2,5 @@
2
2
 
3
3
  module DhanHQ
4
4
  # Semantic version of the DhanHQ client gem.
5
- VERSION = "2.2.0"
5
+ VERSION = "2.2.1"
6
6
  end
@@ -29,6 +29,7 @@ module DhanHQ
29
29
 
30
30
  token = DhanHQ.configuration.resolved_access_token
31
31
  raise DhanHQ::AuthenticationError, "Missing access token" if token.nil? || token.empty?
32
+
32
33
  cid = DhanHQ.configuration.client_id or raise "DhanHQ.client_id not set"
33
34
  ver = (DhanHQ.configuration.respond_to?(:ws_version) && DhanHQ.configuration.ws_version) || 2
34
35
  @url = url || "wss://api-feed.dhan.co?version=#{ver}&token=#{token}&clientId=#{cid}&authType=2"
@@ -82,6 +82,7 @@ module DhanHQ
82
82
  def build_market_depth_url(config)
83
83
  token = config.resolved_access_token
84
84
  raise DhanHQ::AuthenticationError, "Missing access token" if token.nil? || token.empty?
85
+
85
86
  cid = config.client_id or raise "DhanHQ.client_id not set"
86
87
  depth_level = config.market_depth_level || 20 # Default to 20 level depth
87
88
 
@@ -88,6 +88,7 @@ module DhanHQ
88
88
  else
89
89
  token = cfg.resolved_access_token
90
90
  raise DhanHQ::AuthenticationError, "Missing access token" if token.nil? || token.empty?
91
+
91
92
  cid = cfg.client_id or raise "DhanHQ.client_id not set"
92
93
  payload = {
93
94
  LoginReq: { MsgCode: 42, ClientId: cid, Token: token },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: DhanHQ
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shubham Taywade