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 +4 -4
- data/lib/DhanHQ/configuration.rb +1 -0
- data/lib/DhanHQ/version.rb +1 -1
- data/lib/DhanHQ/ws/client.rb +1 -0
- data/lib/DhanHQ/ws/market_depth/client.rb +1 -0
- data/lib/DhanHQ/ws/orders/connection.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f0476726fe811ed0f25424e4e29c0e4d0b2bb7f18732883aed5902ae8fde017
|
|
4
|
+
data.tar.gz: ece7774203912cb63ce57c9b723450290e01239415d573aa4b5a190039023ded
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4733638b5d2687f0f4ebfb9f08925ae980ce90d822fe0473438b43057b242e64f6cf3915a69b602adc87eeb9b2d282c62c2446ecef44cd2f327d2997844b5d52
|
|
7
|
+
data.tar.gz: fec3e15617126ddc8f218765b284f1ba8e7c14defd0c3d41b3b4d5cf16480188a0abdb5f449835c7b4243ed21a606a38566ca4858a50ecf56f1ed8824f4864d8
|
data/lib/DhanHQ/configuration.rb
CHANGED
data/lib/DhanHQ/version.rb
CHANGED
data/lib/DhanHQ/ws/client.rb
CHANGED
|
@@ -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 },
|