@gainsnetwork/sdk 1.8.8-rc4 → 1.8.9-rc1
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.d.ts +1 -0
- package/lib/constants.js +3 -0
- package/lib/contracts/utils/pairs.js +1 -0
- package/lib/markets/schedules/holidays.js +46 -27
- package/lib/trade/fees/borrowingV2/fetcher.d.ts +1 -0
- package/lib/trade/types.d.ts +2 -1
- package/lib/trade/types.js +1 -0
- package/package.json +1 -1
package/lib/constants.d.ts
CHANGED
|
@@ -451,6 +451,7 @@ export declare const pairs: {
|
|
|
451
451
|
"NATGAS/USD": string;
|
|
452
452
|
"BRENT/USD": string;
|
|
453
453
|
"URNM/USD": string;
|
|
454
|
+
"HYPEDEGEN/USD": string;
|
|
454
455
|
};
|
|
455
456
|
export declare const syntheticPairs: Set<string>;
|
|
456
457
|
export declare const parentToSyntheticPairMap: Map<string, string>;
|
package/lib/constants.js
CHANGED
|
@@ -459,6 +459,7 @@ exports.pairs = {
|
|
|
459
459
|
"NATGAS/USD": COMMODITIES,
|
|
460
460
|
"BRENT/USD": COMMODITIES,
|
|
461
461
|
"URNM/USD": INDICES,
|
|
462
|
+
"HYPEDEGEN/USD": CRYPTO,
|
|
462
463
|
};
|
|
463
464
|
exports.syntheticPairs = new Set([
|
|
464
465
|
"BTCDEGEN/USD",
|
|
@@ -466,6 +467,7 @@ exports.syntheticPairs = new Set([
|
|
|
466
467
|
"SOLDEGEN/USD",
|
|
467
468
|
"XRPDEGEN/USD",
|
|
468
469
|
"BNBDEGEN/USD",
|
|
470
|
+
"HYPEDEGEN/USD",
|
|
469
471
|
]);
|
|
470
472
|
exports.parentToSyntheticPairMap = new Map([
|
|
471
473
|
["BTC/USD", "BTCDEGEN/USD"],
|
|
@@ -473,6 +475,7 @@ exports.parentToSyntheticPairMap = new Map([
|
|
|
473
475
|
["SOL/USD", "SOLDEGEN/USD"],
|
|
474
476
|
["XRP/USD", "XRPDEGEN/USD"],
|
|
475
477
|
["BNB/USD", "BNBDEGEN/USD"],
|
|
478
|
+
["HYPE/USD", "HYPEDEGEN/USD"],
|
|
476
479
|
]);
|
|
477
480
|
const getAssetClassFromGroupIndex = (groupIndex) => {
|
|
478
481
|
switch (groupIndex) {
|
|
@@ -605,4 +605,5 @@ const PAIR_INDEX_TO_DESCRIPTION = {
|
|
|
605
605
|
[types_1.PairIndex.NATGASUSD]: "Natural Gas to US Dollar",
|
|
606
606
|
[types_1.PairIndex.BRENTUSD]: "Brent Crude Oil to US Dollar",
|
|
607
607
|
[types_1.PairIndex.URNMUSD]: "Sprott Uranium Miners ETF to US Dollar",
|
|
608
|
+
[types_1.PairIndex.HYPEDEGEN]: "Hyperliquid to US Dollar",
|
|
608
609
|
};
|
|
@@ -18,60 +18,79 @@ const partial = (year, month, day, name, startH, startM, endH, endM) => ({
|
|
|
18
18
|
});
|
|
19
19
|
// Shared holidays
|
|
20
20
|
const HOLIDAYS = [
|
|
21
|
-
// 2025
|
|
22
|
-
full(2025, 5, 26, "Memorial Day"),
|
|
23
|
-
full(2025, 6, 19, "Juneteenth"),
|
|
24
|
-
partial(2025, 7, 3, "Day Before Independence Day", 9, 30, 13, 0),
|
|
25
|
-
full(2025, 7, 4, "Independence Day"),
|
|
26
|
-
full(2025, 9, 1, "Labor Day"),
|
|
27
|
-
full(2025, 11, 27, "Thanksgiving Day"),
|
|
28
|
-
partial(2025, 11, 28, "Black Friday", 9, 30, 13, 0),
|
|
29
|
-
full(2025, 12, 25, "Christmas Day"),
|
|
30
|
-
// 2026
|
|
31
|
-
full(2026, 1, 1, "New Year's Day"),
|
|
32
|
-
full(2026, 1, 19, "Martin Luther King Jr. Day"),
|
|
33
21
|
full(2026, 4, 3, "Good Friday"),
|
|
22
|
+
full(2026, 5, 25, "Memorial Day"),
|
|
23
|
+
full(2026, 6, 19, "Juneteenth"),
|
|
24
|
+
partial(2026, 7, 2, "Day Before Independence Day", 9, 30, 13, 0),
|
|
25
|
+
full(2026, 7, 3, "Independence Day"),
|
|
26
|
+
full(2026, 9, 7, "Labor Day"),
|
|
27
|
+
full(2026, 11, 26, "Thanksgiving Day"),
|
|
28
|
+
partial(2026, 11, 27, "Black Friday", 9, 30, 13, 0),
|
|
29
|
+
full(2026, 12, 25, "Christmas Day"),
|
|
30
|
+
// 2027
|
|
31
|
+
full(2027, 1, 1, "New Year's Day"),
|
|
32
|
+
full(2027, 1, 18, "Martin Luther King Jr. Day"),
|
|
33
|
+
full(2027, 3, 26, "Good Friday"),
|
|
34
|
+
full(2027, 5, 31, "Memorial Day"),
|
|
35
|
+
full(2027, 6, 18, "Juneteenth"),
|
|
36
|
+
full(2027, 7, 5, "Independence Day"),
|
|
37
|
+
full(2027, 9, 6, "Labor Day"),
|
|
38
|
+
full(2027, 11, 25, "Thanksgiving Day"),
|
|
39
|
+
partial(2027, 11, 26, "Black Friday", 9, 30, 13, 0),
|
|
40
|
+
full(2027, 12, 24, "Christmas Day"),
|
|
34
41
|
];
|
|
35
42
|
// Market-specific holiday overrides
|
|
36
43
|
const HOLIDAYS_OVERRIDES = {
|
|
37
44
|
stocks: [
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
// 2026
|
|
46
|
+
partial(2026, 12, 24, "Christmas Eve", 9, 30, 13, 0),
|
|
47
|
+
// 2027
|
|
48
|
+
full(2027, 2, 15, "Presidents' Day"),
|
|
40
49
|
],
|
|
41
50
|
indices: [
|
|
42
|
-
|
|
43
|
-
partial(
|
|
44
|
-
|
|
51
|
+
// 2026
|
|
52
|
+
partial(2026, 12, 24, "Christmas Eve", 9, 30, 12, 15),
|
|
53
|
+
partial(2026, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
54
|
+
// 2027
|
|
55
|
+
full(2027, 2, 15, "Presidents' Day"),
|
|
56
|
+
partial(2027, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
45
57
|
],
|
|
46
58
|
commodities: [
|
|
47
|
-
//
|
|
59
|
+
// 2026
|
|
60
|
+
partial(2026, 4, 2, "Maundy Thursday", 0, 0, 13, 0),
|
|
61
|
+
partial(2026, 12, 24, "Christmas Eve", 0, 0, 12, 45),
|
|
62
|
+
partial(2026, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
63
|
+
// 2027
|
|
64
|
+
// MLK Jr. Day: Open until 1 PM ET, closed 1-6 PM, reopens 6 PM
|
|
48
65
|
{
|
|
49
|
-
year:
|
|
66
|
+
year: 2027,
|
|
50
67
|
month: 1,
|
|
51
|
-
day:
|
|
68
|
+
day: 18,
|
|
52
69
|
name: "Martin Luther King Jr. Day",
|
|
53
70
|
openWindows: [
|
|
54
71
|
{ start: { hour: 0, minute: 0 }, end: { hour: 13, minute: 0 } },
|
|
55
72
|
{ start: { hour: 18, minute: 0 }, end: { hour: 24, minute: 0 } },
|
|
56
73
|
],
|
|
57
74
|
},
|
|
58
|
-
|
|
59
|
-
partial(2025, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
60
|
-
// Presidents' Day: Open until 2:30 ET, closed from 2:30-6 PM ET, then reopens at 6 PM ET
|
|
75
|
+
// Presidents' Day: Open until 2:30 PM ET, closed 2:30-6 PM, reopens 6 PM
|
|
61
76
|
{
|
|
62
|
-
year:
|
|
77
|
+
year: 2027,
|
|
63
78
|
month: 2,
|
|
64
|
-
day:
|
|
79
|
+
day: 15,
|
|
65
80
|
name: "Presidents' Day",
|
|
66
81
|
openWindows: [
|
|
67
82
|
{ start: { hour: 0, minute: 0 }, end: { hour: 14, minute: 30 } },
|
|
68
83
|
{ start: { hour: 18, minute: 0 }, end: { hour: 24, minute: 0 } },
|
|
69
84
|
],
|
|
70
85
|
},
|
|
86
|
+
partial(2027, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
71
87
|
],
|
|
72
88
|
forex: [
|
|
73
|
-
|
|
74
|
-
partial(
|
|
89
|
+
// 2026
|
|
90
|
+
partial(2026, 12, 24, "Christmas Eve", 0, 0, 12, 45),
|
|
91
|
+
partial(2026, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
92
|
+
// 2027
|
|
93
|
+
partial(2027, 12, 31, "New Year's Eve", 0, 0, 16, 0),
|
|
75
94
|
],
|
|
76
95
|
};
|
|
77
96
|
const getHolidaysForYear = (market, year) => {
|
package/lib/trade/types.d.ts
CHANGED
package/lib/trade/types.js
CHANGED
|
@@ -481,4 +481,5 @@ var PairIndex;
|
|
|
481
481
|
PairIndex[PairIndex["NATGASUSD"] = 449] = "NATGASUSD";
|
|
482
482
|
PairIndex[PairIndex["BRENTUSD"] = 450] = "BRENTUSD";
|
|
483
483
|
PairIndex[PairIndex["URNMUSD"] = 451] = "URNMUSD";
|
|
484
|
+
PairIndex[PairIndex["HYPEDEGEN"] = 452] = "HYPEDEGEN";
|
|
484
485
|
})(PairIndex = exports.PairIndex || (exports.PairIndex = {}));
|