@gainsnetwork/sdk 0.0.20 → 0.0.21
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 +21 -1
- package/package.json +1 -1
package/lib/constants.d.ts
CHANGED
|
@@ -110,6 +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) => "crypto" | "forex" | "stocks" | "indices" | "commodities" | undefined;
|
|
113
114
|
export declare const tickerChanges: {
|
|
114
115
|
FB: {
|
|
115
116
|
newTicker: string;
|
package/lib/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stockSplits = exports.tickerChanges = exports.pairs = void 0;
|
|
3
|
+
exports.stockSplits = exports.tickerChanges = exports.getAssetClassFromGroupIndex = exports.pairs = void 0;
|
|
4
4
|
exports.pairs = {
|
|
5
5
|
"BTC/USD": "crypto",
|
|
6
6
|
"ETH/USD": "crypto",
|
|
@@ -113,6 +113,26 @@ exports.pairs = {
|
|
|
113
113
|
"RPL/USD": "crypto",
|
|
114
114
|
"ARB/USD": "crypto",
|
|
115
115
|
};
|
|
116
|
+
const getAssetClassFromGroupIndex = (groupIndex) => {
|
|
117
|
+
switch (groupIndex) {
|
|
118
|
+
case 0:
|
|
119
|
+
return "crypto";
|
|
120
|
+
case 1:
|
|
121
|
+
case 8:
|
|
122
|
+
case 9:
|
|
123
|
+
return "forex";
|
|
124
|
+
case 2:
|
|
125
|
+
case 3:
|
|
126
|
+
case 4:
|
|
127
|
+
return "stocks";
|
|
128
|
+
case 5:
|
|
129
|
+
return "indices";
|
|
130
|
+
case 6:
|
|
131
|
+
case 7:
|
|
132
|
+
return "commodities";
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
exports.getAssetClassFromGroupIndex = getAssetClassFromGroupIndex;
|
|
116
136
|
exports.tickerChanges = {
|
|
117
137
|
FB: { newTicker: "META", date: "06/09/2022" },
|
|
118
138
|
};
|