@gainsnetwork/sdk 0.0.30-rc3 → 0.0.30-rc5
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 +2 -1
- package/lib/constants.js +6 -1
- package/lib/contracts/utils/pairs.js +2 -2
- package/package.json +1 -1
package/lib/constants.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export declare const pairs: {
|
|
|
110
110
|
"RPL/USD": string;
|
|
111
111
|
"ARB/USD": string;
|
|
112
112
|
};
|
|
113
|
-
export declare const getAssetClassFromGroupIndex: (groupIndex: number) =>
|
|
113
|
+
export declare const getAssetClassFromGroupIndex: (groupIndex: number) => string | undefined;
|
|
114
114
|
export declare const tickerChanges: {
|
|
115
115
|
FB: {
|
|
116
116
|
newTicker: string;
|
|
@@ -136,3 +136,4 @@ export declare const stockSplits: {
|
|
|
136
136
|
};
|
|
137
137
|
};
|
|
138
138
|
export declare const defaultSpreadReductionsP100: number[];
|
|
139
|
+
export declare const delistedPairIxs: Set<number>;
|
package/lib/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultSpreadReductionsP100 = exports.stockSplits = exports.tickerChanges = exports.getAssetClassFromGroupIndex = exports.pairs = void 0;
|
|
3
|
+
exports.delistedPairIxs = exports.defaultSpreadReductionsP100 = exports.stockSplits = exports.tickerChanges = exports.getAssetClassFromGroupIndex = exports.pairs = void 0;
|
|
4
4
|
exports.pairs = {
|
|
5
5
|
"BTC/USD": "crypto",
|
|
6
6
|
"ETH/USD": "crypto",
|
|
@@ -143,3 +143,8 @@ exports.stockSplits = {
|
|
|
143
143
|
"TSLA_1/USD": { date: "8/25/2022", split: 3 },
|
|
144
144
|
};
|
|
145
145
|
exports.defaultSpreadReductionsP100 = [15, 20, 25, 30, 35];
|
|
146
|
+
exports.delistedPairIxs = new Set([
|
|
147
|
+
6, 31, 36, 42, 45, 48, 50, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
|
|
148
|
+
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
|
|
149
|
+
89, 97, 99, 101, 106, 107, 108,
|
|
150
|
+
]);
|
|
@@ -104,12 +104,12 @@ const fetchOpenInterest = (contracts, pairIxs) => __awaiter(void 0, void 0, void
|
|
|
104
104
|
const openInterests = yield Promise.all(pairIxs.map(pairIndex => Promise.all([
|
|
105
105
|
contracts.gfarmTradingStorageV5.openInterestDai(pairIndex, 0),
|
|
106
106
|
contracts.gfarmTradingStorageV5.openInterestDai(pairIndex, 1),
|
|
107
|
-
contracts.
|
|
107
|
+
contracts.gnsBorrowingFees.getPairMaxOi(pairIndex),
|
|
108
108
|
])));
|
|
109
109
|
return openInterests.map(openInterest => ({
|
|
110
110
|
long: parseFloat(openInterest[0].toString()) / 1e18,
|
|
111
111
|
short: parseFloat(openInterest[1].toString()) / 1e18,
|
|
112
|
-
max: parseFloat(openInterest[2].toString()) /
|
|
112
|
+
max: parseFloat(openInterest[2].toString()) / 1e10,
|
|
113
113
|
}));
|
|
114
114
|
});
|
|
115
115
|
exports.fetchOpenInterest = fetchOpenInterest;
|