@gainsnetwork/sdk 1.7.0-rc2 → 1.7.0-rc3
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.
|
@@ -24,8 +24,9 @@ const buildForexWeeklySchedule = (currentDate = new Date(), opts) => {
|
|
|
24
24
|
const lowLiq = emptyWeekly();
|
|
25
25
|
const openHour = isInDST ? 16 : 17; // Monday open
|
|
26
26
|
const closeHour = isInDST ? 16 : 17; // Friday close
|
|
27
|
-
// Open windows (ET):
|
|
28
|
-
add(open, types_1.WeekDay.
|
|
27
|
+
// Open windows (ET): Sun 16/17:00 -> 24:00, Mon-Thu 0-24, Fri 0 -> 16/17:00
|
|
28
|
+
add(open, types_1.WeekDay.Sunday, { start: { hour: openHour, minute: 0 }, end: { hour: 24, minute: 0 } });
|
|
29
|
+
add(open, types_1.WeekDay.Monday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
|
|
29
30
|
add(open, types_1.WeekDay.Tuesday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
|
|
30
31
|
add(open, types_1.WeekDay.Wednesday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
|
|
31
32
|
add(open, types_1.WeekDay.Thursday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
|
|
@@ -37,13 +38,13 @@ const buildForexWeeklySchedule = (currentDate = new Date(), opts) => {
|
|
|
37
38
|
const llStartMinute = 45;
|
|
38
39
|
const llEndHour = isInDST ? (useExtended ? 21 : 19) : (useExtended ? 22 : 20);
|
|
39
40
|
const llEndMinute = 0;
|
|
40
|
-
for (const d of [types_1.WeekDay.Monday, types_1.WeekDay.Tuesday, types_1.WeekDay.Wednesday, types_1.WeekDay.Thursday, types_1.WeekDay.Friday]) {
|
|
41
|
+
for (const d of [types_1.WeekDay.Sunday, types_1.WeekDay.Monday, types_1.WeekDay.Tuesday, types_1.WeekDay.Wednesday, types_1.WeekDay.Thursday, types_1.WeekDay.Friday]) {
|
|
41
42
|
add(lowLiq, d, { start: { hour: llStartHour, minute: llStartMinute }, end: { hour: llEndHour, minute: llEndMinute } });
|
|
42
43
|
}
|
|
43
44
|
const holidays = (0, holidays_1.getHolidaysInCurrentWeek)('forex', currentDate);
|
|
44
45
|
const summary = isInDST
|
|
45
|
-
? '
|
|
46
|
-
: '
|
|
46
|
+
? 'Sunday 4:00 pm - Friday 4:00 pm ET (Closed weekends & holidays)'
|
|
47
|
+
: 'Sunday 5:00 pm - Friday 5:00 pm ET (Closed weekends & holidays)';
|
|
47
48
|
return { open, lowLiq, holidays, summary };
|
|
48
49
|
};
|
|
49
50
|
exports.buildForexWeeklySchedule = buildForexWeeklySchedule;
|
|
@@ -29,12 +29,15 @@ const HOLIDAYS_OVERRIDES = {
|
|
|
29
29
|
],
|
|
30
30
|
indices: [
|
|
31
31
|
partial(2025, 12, 24, "Christmas Eve", 9, 30, 12, 15),
|
|
32
|
+
partial(2025, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
32
33
|
],
|
|
33
34
|
commodities: [
|
|
34
35
|
partial(2025, 12, 24, "Christmas Eve", 0, 0, 12, 45),
|
|
36
|
+
partial(2025, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
35
37
|
],
|
|
36
38
|
forex: [
|
|
37
39
|
partial(2025, 12, 24, "Christmas Eve", 0, 0, 12, 45),
|
|
40
|
+
partial(2025, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
38
41
|
],
|
|
39
42
|
};
|
|
40
43
|
const getHolidaysForYear = (market, year) => {
|