@gainsnetwork/sdk 0.1.9 → 0.1.10-rc2
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/contracts/utils/pairs.js +2 -2
- package/lib/markets/forex.d.ts +1 -1
- package/lib/markets/forex.js +7 -1
- package/package.json +1 -1
- package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.d.ts +0 -979
- package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.js +0 -2
- package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.d.ts +0 -1058
- package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.js +0 -2
- package/lib/contracts/types/generated/GNSPairInfosV6_1.d.ts +0 -911
- package/lib/contracts/types/generated/GNSPairInfosV6_1.js +0 -2
- package/lib/contracts/types/generated/GNSPairsStorageV6.d.ts +0 -660
- package/lib/contracts/types/generated/GNSPairsStorageV6.js +0 -2
- package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.d.ts +0 -806
- package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.js +0 -2
- package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.d.ts +0 -821
- package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.js +0 -2
- package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +0 -1838
- package/lib/contracts/types/generated/GTokenV6_3_2.js +0 -2
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.d.ts +0 -88
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.js +0 -1654
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.d.ts +0 -113
- package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.js +0 -1742
- package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.d.ts +0 -98
- package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.js +0 -1485
- package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.d.ts +0 -117
- package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.js +0 -1265
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.d.ts +0 -82
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.js +0 -1273
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.d.ts +0 -82
- package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.js +0 -1326
- package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +0 -110
- package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +0 -2682
|
@@ -98,7 +98,7 @@ const fetchOpenInterest = (contracts, pairIxs) => __awaiter(void 0, void 0, void
|
|
|
98
98
|
});
|
|
99
99
|
exports.fetchOpenInterest = fetchOpenInterest;
|
|
100
100
|
const getPairDescription = (pairIndex) => {
|
|
101
|
-
return PAIR_INDEX_TO_DESCRIPTION[pairIndex] ||
|
|
101
|
+
return PAIR_INDEX_TO_DESCRIPTION[pairIndex] || "";
|
|
102
102
|
};
|
|
103
103
|
exports.getPairDescription = getPairDescription;
|
|
104
104
|
const PAIR_INDEX_TO_DESCRIPTION = {
|
|
@@ -287,7 +287,7 @@ const PAIR_INDEX_TO_DESCRIPTION = {
|
|
|
287
287
|
[types_1.PairIndex.ANTUSD]: "Aragon to US Dollar",
|
|
288
288
|
[types_1.PairIndex.WAVESUSD]: "Waves to US Dollar",
|
|
289
289
|
[types_1.PairIndex.SKLUSD]: "SKALE to US Dollar",
|
|
290
|
-
[types_1.PairIndex.SUPERUSD]: "
|
|
290
|
+
[types_1.PairIndex.SUPERUSD]: "SuperVerse to US Dollar",
|
|
291
291
|
[types_1.PairIndex.BALUSD]: "Balancer to US Dollar",
|
|
292
292
|
[types_1.PairIndex.WTIUSD]: "Oil to US Dollar",
|
|
293
293
|
[types_1.PairIndex.XPTUSD]: "Platinum to US Dollar",
|
package/lib/markets/forex.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const isForexOpen: (dateToCheck: Date) => boolean;
|
|
2
|
-
export declare const isForexLowLiquidity: (timestampToCheck: number) => boolean;
|
|
2
|
+
export declare const isForexLowLiquidity: (timestampToCheck: number, pairId?: number) => boolean;
|
package/lib/markets/forex.js
CHANGED
|
@@ -27,11 +27,17 @@ const isForexOpen = (dateToCheck) => {
|
|
|
27
27
|
return !isClosed;
|
|
28
28
|
};
|
|
29
29
|
exports.isForexOpen = isForexOpen;
|
|
30
|
-
const isForexLowLiquidity = (timestampToCheck) => {
|
|
30
|
+
const isForexLowLiquidity = (timestampToCheck, pairId) => {
|
|
31
31
|
const now = luxon_1.DateTime.fromMillis(timestampToCheck).setZone(FOREX_MARKETS_TIME_ZONE_IANA);
|
|
32
32
|
const hour = now.hour;
|
|
33
33
|
const minute = now.minute;
|
|
34
34
|
const isInDST = now.isInDST;
|
|
35
|
+
// NZD/CHF: increase low liquidity window by additional 30 mins
|
|
36
|
+
if (pairId === 123) {
|
|
37
|
+
return ((isInDST &&
|
|
38
|
+
((hour == 15 && minute >= 15) || (hour >= 16 && hour < 19))) ||
|
|
39
|
+
(!isInDST && ((hour == 16 && minute >= 15) || (hour >= 17 && hour < 20))));
|
|
40
|
+
}
|
|
35
41
|
return ((isInDST && ((hour == 15 && minute >= 45) || (hour >= 16 && hour < 19))) ||
|
|
36
42
|
(!isInDST && ((hour == 16 && minute >= 45) || (hour >= 17 && hour < 20))));
|
|
37
43
|
};
|