@gainsnetwork/sdk 0.1.20-rc1 → 0.1.21
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/lib/constants.js +0 -1
- package/lib/markets/forex.js +4 -3
- package/package.json +1 -1
package/lib/constants.js
CHANGED
|
@@ -261,6 +261,5 @@ exports.delistedPairIxs = new Set([
|
|
|
261
261
|
6, 31, 36, 42, 45, 48, 51, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
|
|
262
262
|
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
|
|
263
263
|
89, 97, 99, 101, 106, 107, 108, 52, 131, 147, 160, 179, 182, 183, 190, 194,
|
|
264
|
-
218, 219,
|
|
265
264
|
]);
|
|
266
265
|
exports.delistedGroupsIxs = new Set([6, 7]);
|
package/lib/markets/forex.js
CHANGED
|
@@ -27,7 +27,7 @@ const isForexOpen = (dateToCheck) => {
|
|
|
27
27
|
return !isClosed;
|
|
28
28
|
};
|
|
29
29
|
exports.isForexOpen = isForexOpen;
|
|
30
|
-
const
|
|
30
|
+
const extendedLowLiqPairIds = [28, 116, 120, 123, 125, 127, 95];
|
|
31
31
|
const isForexLowLiquidity = (timestampToCheck, pair) => {
|
|
32
32
|
const now = luxon_1.DateTime.fromMillis(timestampToCheck).setZone(FOREX_MARKETS_TIME_ZONE_IANA);
|
|
33
33
|
const hour = now.hour;
|
|
@@ -35,8 +35,9 @@ const isForexLowLiquidity = (timestampToCheck, pair) => {
|
|
|
35
35
|
const isInDST = now.isInDST;
|
|
36
36
|
// CHF minor pairs: increase low liquidity window by additional 30 mins
|
|
37
37
|
const pairIndex = pair === null || pair === void 0 ? void 0 : pair.pairIndex;
|
|
38
|
-
if (pairIndex &&
|
|
39
|
-
return ((isInDST &&
|
|
38
|
+
if (pairIndex && extendedLowLiqPairIds.includes(+pairIndex)) {
|
|
39
|
+
return ((isInDST &&
|
|
40
|
+
((hour == 15 && minute >= 15) || (hour >= 16 && hour < 19))) ||
|
|
40
41
|
(!isInDST && ((hour == 16 && minute >= 15) || (hour >= 17 && hour < 20))));
|
|
41
42
|
}
|
|
42
43
|
return ((isInDST && ((hour == 15 && minute >= 45) || (hour >= 16 && hour < 19))) ||
|