1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//! Constants for the DhanHQ API v2.
//!
//! Contains base URLs, WebSocket endpoints, and rate limit values.
//! These are used internally by [`DhanClient`](crate::client::DhanClient)
//! and the WebSocket stream types, but are also exported for advanced usage.
// ---------------------------------------------------------------------------
// Base URLs
// ---------------------------------------------------------------------------
/// Base URL for the DhanHQ REST API v2.
pub const API_BASE_URL: &str = "https://api.dhan.co";
/// Base URL for authentication endpoints.
pub const AUTH_BASE_URL: &str = "https://auth.dhan.co";
// ---------------------------------------------------------------------------
// WebSocket URLs
// ---------------------------------------------------------------------------
/// WebSocket endpoint for live market feed (binary).
pub const WS_MARKET_FEED_URL: &str = "wss://api-feed.dhan.co/";
/// WebSocket endpoint for live order updates (JSON).
pub const WS_ORDER_UPDATE_URL: &str = "wss://api-order-update.dhan.co/";
/// WebSocket endpoint for 20-level full market depth (binary).
pub const WS_DEPTH_20_URL: &str = "wss://depth-api-feed.dhan.co/twentydepth";
/// WebSocket endpoint for 200-level full market depth (binary).
pub const WS_DEPTH_200_URL: &str = "wss://full-depth-api.dhan.co/twohundreddepth";
// ---------------------------------------------------------------------------
// Rate Limits
// ---------------------------------------------------------------------------
/// Rate limit configuration for the different API categories.