hedgequantx 1.2.117 → 1.2.119
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.
- package/package.json +1 -1
- package/src/pages/algo.js +1 -1
- package/src/services/projectx.js +17 -0
package/package.json
CHANGED
package/src/pages/algo.js
CHANGED
package/src/services/projectx.js
CHANGED
|
@@ -26,6 +26,7 @@ class ProjectXService {
|
|
|
26
26
|
*/
|
|
27
27
|
constructor(propfirmKey = 'topstep') {
|
|
28
28
|
this.propfirm = PROPFIRMS[propfirmKey] || PROPFIRMS.topstep;
|
|
29
|
+
this.propfirmKey = propfirmKey;
|
|
29
30
|
this.token = null;
|
|
30
31
|
this.user = null;
|
|
31
32
|
this.rateLimiter = getLimiter('api');
|
|
@@ -33,6 +34,22 @@ class ProjectXService {
|
|
|
33
34
|
this.orderLimiter = getLimiter('orders');
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Get current auth token
|
|
39
|
+
* @returns {string|null} The JWT token
|
|
40
|
+
*/
|
|
41
|
+
getToken() {
|
|
42
|
+
return this.token;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Get propfirm key
|
|
47
|
+
* @returns {string} The propfirm identifier
|
|
48
|
+
*/
|
|
49
|
+
getPropfirm() {
|
|
50
|
+
return this.propfirmKey;
|
|
51
|
+
}
|
|
52
|
+
|
|
36
53
|
/**
|
|
37
54
|
* Makes a rate-limited HTTPS request
|
|
38
55
|
* @param {string} host - API host
|