@gainsnetwork/sdk 0.2.59-rc4 → 0.2.59-rc6
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 +1 -2
- package/lib/markets/commodities.js +9 -7
- package/package.json +1 -1
package/lib/constants.js
CHANGED
|
@@ -410,8 +410,7 @@ exports.delistedPairIxs = new Set([
|
|
|
410
410
|
4, 6, 31, 36, 48, 51, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
|
|
411
411
|
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
|
|
412
412
|
97, 99, 101, 106, 52, 147, 152, 160, 179, 182, 183, 190, 229, 163, 15, 170,
|
|
413
|
-
239, 254, 230, 4, 275, 290, 296, 311, 330, 250, 276,
|
|
414
|
-
352,
|
|
413
|
+
239, 254, 230, 4, 275, 290, 296, 311, 330, 250, 276,
|
|
415
414
|
]);
|
|
416
415
|
exports.delistedGroupsIxs = new Set([6, 7]);
|
|
417
416
|
exports.DEFAULT_PROTECTION_CLOSE_FACTOR = 1;
|
|
@@ -15,17 +15,19 @@ const isCommoditiesOpen = (dateToCheck) => {
|
|
|
15
15
|
const minute = now.minute;
|
|
16
16
|
const isClosed =
|
|
17
17
|
// Christmas 2023
|
|
18
|
-
(month === 12 && dayOfMonth >=
|
|
18
|
+
(month === 12 && dayOfMonth >= 24) ||
|
|
19
19
|
// New Year's Eve 2023
|
|
20
20
|
(month === 1 && dayOfMonth >= 1 && dayOfMonth <= 2) ||
|
|
21
|
-
// Friday Closing
|
|
22
|
-
(weekday === 5 && hour >=
|
|
21
|
+
// Friday Closing: After 4:30 PM (Friday is closed for the whole day after 4:30 PM)
|
|
22
|
+
(weekday === 5 && (hour > 16 || (hour === 16 && minute >= 30))) ||
|
|
23
|
+
// Sunday Closing: before 7:30 PM (closed until Sunday 7:30 PM)
|
|
24
|
+
(weekday === 7 && (hour < 19 || (hour === 19 && minute < 30))) ||
|
|
23
25
|
// Saturday Closed
|
|
24
26
|
weekday === 6 ||
|
|
25
|
-
//
|
|
26
|
-
(
|
|
27
|
-
//
|
|
28
|
-
hour ===
|
|
27
|
+
// Daily Closing: 4:30 PM to 6:30 PM (every day except Friday after 4:30 PM)
|
|
28
|
+
(hour === 16 && minute >= 30) || // 4:30 PM to 5:00 PM
|
|
29
|
+
hour === 17 || // 5:00 PM to 6:00 PM
|
|
30
|
+
(hour === 18 && minute <= 30); // 6:00 PM to 6:30 PM
|
|
29
31
|
return !isClosed;
|
|
30
32
|
};
|
|
31
33
|
exports.isCommoditiesOpen = isCommoditiesOpen;
|