lynx-client 0.0.34 → 0.0.35
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/dist/cjs/index.js +2 -0
- package/dist/cjs/lib/constants/feeIds.js +20 -0
- package/dist/cjs/lib/constants/groupIds.js +20 -0
- package/dist/cjs/lib/constants/pairIds.js +43 -1
- package/dist/cjs/lib/marketHours/marketHoursUtils.js +663 -0
- package/dist/cjs/lib/priceFeeds/flare/flareFeedConstants.js +22 -0
- package/dist/cjs/lib/priceFeeds/pyth/pythFeedConstants.js +44 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/lib/constants/feeIds.d.ts +5 -1
- package/dist/esm/lib/constants/feeIds.d.ts.map +1 -1
- package/dist/esm/lib/constants/feeIds.js +20 -0
- package/dist/esm/lib/constants/groupIds.d.ts +5 -1
- package/dist/esm/lib/constants/groupIds.d.ts.map +1 -1
- package/dist/esm/lib/constants/groupIds.js +20 -0
- package/dist/esm/lib/constants/pairIds.d.ts +19 -1
- package/dist/esm/lib/constants/pairIds.d.ts.map +1 -1
- package/dist/esm/lib/constants/pairIds.js +43 -1
- package/dist/esm/lib/marketHours/marketHoursUtils.d.ts +52 -0
- package/dist/esm/lib/marketHours/marketHoursUtils.d.ts.map +1 -0
- package/dist/esm/lib/marketHours/marketHoursUtils.js +663 -0
- package/dist/esm/lib/priceFeeds/flare/flareFeedConstants.d.ts.map +1 -1
- package/dist/esm/lib/priceFeeds/flare/flareFeedConstants.js +22 -0
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.js +44 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/constants/feeIds.d.ts +5 -1
- package/dist/types/lib/constants/feeIds.d.ts.map +1 -1
- package/dist/types/lib/constants/groupIds.d.ts +5 -1
- package/dist/types/lib/constants/groupIds.d.ts.map +1 -1
- package/dist/types/lib/constants/pairIds.d.ts +19 -1
- package/dist/types/lib/constants/pairIds.d.ts.map +1 -1
- package/dist/types/lib/marketHours/marketHoursUtils.d.ts +52 -0
- package/dist/types/lib/marketHours/marketHoursUtils.d.ts.map +1 -0
- package/dist/types/lib/priceFeeds/flare/flareFeedConstants.d.ts.map +1 -1
- package/dist/types/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -34,6 +34,8 @@ __exportStar(require("./lib/constants/scales"), exports);
|
|
|
34
34
|
__exportStar(require("./lib/constants/pairIds"), exports);
|
|
35
35
|
__exportStar(require("./lib/constants/groupIds"), exports);
|
|
36
36
|
__exportStar(require("./lib/constants/feeIds"), exports);
|
|
37
|
+
// Market hours utilities
|
|
38
|
+
__exportStar(require("./lib/marketHours/marketHoursUtils"), exports);
|
|
37
39
|
__exportStar(require("./lib/priceFeeds/pyth/pythFeedConstants"), exports);
|
|
38
40
|
__exportStar(require("./lib/priceFeeds/pyth/pythFeedFunctions"), exports);
|
|
39
41
|
__exportStar(require("./lib/priceFeeds/pyth/pythPriceData"), exports);
|
|
@@ -6,6 +6,10 @@ exports.FEE_CONFIGS_IDS = {
|
|
|
6
6
|
catCryptoPair: 2,
|
|
7
7
|
forexPair: 3,
|
|
8
8
|
catForexPair: 4,
|
|
9
|
+
stocksPair: 5,
|
|
10
|
+
catStocksPair: 6,
|
|
11
|
+
commoditiesPair: 7,
|
|
12
|
+
catCommoditiesPair: 8,
|
|
9
13
|
};
|
|
10
14
|
exports.FEE_CONFIGS_IDENTIFIERS = {
|
|
11
15
|
CRYPTO_COMMON: {
|
|
@@ -24,4 +28,20 @@ exports.FEE_CONFIGS_IDENTIFIERS = {
|
|
|
24
28
|
name: "forex_cat",
|
|
25
29
|
id: exports.FEE_CONFIGS_IDS.catForexPair,
|
|
26
30
|
},
|
|
31
|
+
STOCKS: {
|
|
32
|
+
name: "stocks",
|
|
33
|
+
id: exports.FEE_CONFIGS_IDS.stocksPair,
|
|
34
|
+
},
|
|
35
|
+
STOCKS_CAT: {
|
|
36
|
+
name: "stocks_cat",
|
|
37
|
+
id: exports.FEE_CONFIGS_IDS.catStocksPair,
|
|
38
|
+
},
|
|
39
|
+
COMMODITIES: {
|
|
40
|
+
name: "commodities",
|
|
41
|
+
id: exports.FEE_CONFIGS_IDS.commoditiesPair,
|
|
42
|
+
},
|
|
43
|
+
COMMODITIES_CAT: {
|
|
44
|
+
name: "commodities_cat",
|
|
45
|
+
id: exports.FEE_CONFIGS_IDS.catCommoditiesPair,
|
|
46
|
+
},
|
|
27
47
|
};
|
|
@@ -6,6 +6,10 @@ exports.GROUP_CONFIGS_IDS = {
|
|
|
6
6
|
catCryptoGroup: 2,
|
|
7
7
|
forexGroup: 3,
|
|
8
8
|
catForexGroup: 4,
|
|
9
|
+
stocksGroup: 5,
|
|
10
|
+
catStocksGroup: 6,
|
|
11
|
+
commoditiesGroup: 7,
|
|
12
|
+
catCommoditiesGroup: 8,
|
|
9
13
|
};
|
|
10
14
|
exports.GROUP_CONFIGS_IDENTIFIERS = {
|
|
11
15
|
crypto: {
|
|
@@ -24,4 +28,20 @@ exports.GROUP_CONFIGS_IDENTIFIERS = {
|
|
|
24
28
|
name: "forex_cat",
|
|
25
29
|
id: exports.GROUP_CONFIGS_IDS.catForexGroup,
|
|
26
30
|
},
|
|
31
|
+
stocks: {
|
|
32
|
+
name: "stocks",
|
|
33
|
+
id: exports.GROUP_CONFIGS_IDS.stocksGroup,
|
|
34
|
+
},
|
|
35
|
+
stocks_cat: {
|
|
36
|
+
name: "stocks_cat",
|
|
37
|
+
id: exports.GROUP_CONFIGS_IDS.catStocksGroup,
|
|
38
|
+
},
|
|
39
|
+
commodities: {
|
|
40
|
+
name: "commodities",
|
|
41
|
+
id: exports.GROUP_CONFIGS_IDS.commoditiesGroup,
|
|
42
|
+
},
|
|
43
|
+
commodities_cat: {
|
|
44
|
+
name: "commodities_cat",
|
|
45
|
+
id: exports.GROUP_CONFIGS_IDS.catCommoditiesGroup,
|
|
46
|
+
},
|
|
27
47
|
};
|
|
@@ -25,7 +25,16 @@ exports.PAIR_CONFIGS_IDS = {
|
|
|
25
25
|
USD_JPY: 8101,
|
|
26
26
|
USD_CHF: 8102,
|
|
27
27
|
// STOCKS
|
|
28
|
-
|
|
28
|
+
TSLA_USD: 9001,
|
|
29
|
+
AAPL_USD: 9002,
|
|
30
|
+
NVDA_USD: 9003,
|
|
31
|
+
AMZN_USD: 9004,
|
|
32
|
+
GOOGL_USD: 9005,
|
|
33
|
+
MSFT_USD: 9006,
|
|
34
|
+
META_USD: 9007,
|
|
35
|
+
// COMMODITIES
|
|
36
|
+
GOLD_USD: 7001,
|
|
37
|
+
SILVER_USD: 7002,
|
|
29
38
|
// CAT MODE -- CRYPTO
|
|
30
39
|
BTC_USD_CAT: 10001,
|
|
31
40
|
ETH_USD_CAT: 10002,
|
|
@@ -37,6 +46,17 @@ exports.PAIR_CONFIGS_IDS = {
|
|
|
37
46
|
// CAT MODE -- REVERSE FOREX
|
|
38
47
|
USD_JPY_CAT: 18101,
|
|
39
48
|
USD_CHF_CAT: 18102,
|
|
49
|
+
// CAT MODE -- STOCKS
|
|
50
|
+
TSLA_USD_CAT: 19001,
|
|
51
|
+
AAPL_USD_CAT: 19002,
|
|
52
|
+
NVDA_USD_CAT: 19003,
|
|
53
|
+
AMZN_USD_CAT: 19004,
|
|
54
|
+
GOOGL_USD_CAT: 19005,
|
|
55
|
+
MSFT_USD_CAT: 19006,
|
|
56
|
+
META_USD_CAT: 19007,
|
|
57
|
+
// CAT MODE -- COMMODITIES
|
|
58
|
+
GOLD_USD_CAT: 17001,
|
|
59
|
+
SILVER_USD_CAT: 17002,
|
|
40
60
|
};
|
|
41
61
|
exports.PAIR_CONFIGS_IDENTIFIERS = {
|
|
42
62
|
// CRYPTO
|
|
@@ -58,6 +78,17 @@ exports.PAIR_CONFIGS_IDENTIFIERS = {
|
|
|
58
78
|
// Reverse Forex
|
|
59
79
|
USD_JPY: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.USD_JPY, "USD", "JPY"),
|
|
60
80
|
USD_CHF: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.USD_CHF, "USD", "CHF"),
|
|
81
|
+
// STOCKS
|
|
82
|
+
TSLA_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.stocksGroup, exports.PAIR_CONFIGS_IDS.TSLA_USD, "TSLA", "USD"),
|
|
83
|
+
AAPL_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.stocksGroup, exports.PAIR_CONFIGS_IDS.AAPL_USD, "AAPL", "USD"),
|
|
84
|
+
NVDA_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.stocksGroup, exports.PAIR_CONFIGS_IDS.NVDA_USD, "NVDA", "USD"),
|
|
85
|
+
AMZN_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.stocksGroup, exports.PAIR_CONFIGS_IDS.AMZN_USD, "AMZN", "USD"),
|
|
86
|
+
GOOGL_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.stocksGroup, exports.PAIR_CONFIGS_IDS.GOOGL_USD, "GOOGL", "USD"),
|
|
87
|
+
MSFT_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.stocksGroup, exports.PAIR_CONFIGS_IDS.MSFT_USD, "MSFT", "USD"),
|
|
88
|
+
META_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.stocksGroup, exports.PAIR_CONFIGS_IDS.META_USD, "META", "USD"),
|
|
89
|
+
// COMMODITIES
|
|
90
|
+
GOLD_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.commoditiesGroup, exports.PAIR_CONFIGS_IDS.GOLD_USD, "GOLD", "USD"),
|
|
91
|
+
SILVER_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.commoditiesGroup, exports.PAIR_CONFIGS_IDS.SILVER_USD, "SILVER", "USD"),
|
|
61
92
|
// CRYPTO CAT MODE
|
|
62
93
|
BTC_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catCryptoGroup, exports.PAIR_CONFIGS_IDS.BTC_USD_CAT, "BTC", "USD"),
|
|
63
94
|
ETH_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catCryptoGroup, exports.PAIR_CONFIGS_IDS.ETH_USD_CAT, "ETH", "USD"),
|
|
@@ -70,6 +101,17 @@ exports.PAIR_CONFIGS_IDENTIFIERS = {
|
|
|
70
101
|
// Reverse Cat Forex
|
|
71
102
|
USD_JPY_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.USD_JPY_CAT, "USD", "JPY"),
|
|
72
103
|
USD_CHF_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.USD_CHF_CAT, "USD", "CHF"),
|
|
104
|
+
// STOCKS CAT MODE
|
|
105
|
+
TSLA_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catStocksGroup, exports.PAIR_CONFIGS_IDS.TSLA_USD_CAT, "TSLA", "USD"),
|
|
106
|
+
AAPL_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catStocksGroup, exports.PAIR_CONFIGS_IDS.AAPL_USD_CAT, "AAPL", "USD"),
|
|
107
|
+
NVDA_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catStocksGroup, exports.PAIR_CONFIGS_IDS.NVDA_USD_CAT, "NVDA", "USD"),
|
|
108
|
+
AMZN_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catStocksGroup, exports.PAIR_CONFIGS_IDS.AMZN_USD_CAT, "AMZN", "USD"),
|
|
109
|
+
GOOGL_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catStocksGroup, exports.PAIR_CONFIGS_IDS.GOOGL_USD_CAT, "GOOGL", "USD"),
|
|
110
|
+
MSFT_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catStocksGroup, exports.PAIR_CONFIGS_IDS.MSFT_USD_CAT, "MSFT", "USD"),
|
|
111
|
+
META_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catStocksGroup, exports.PAIR_CONFIGS_IDS.META_USD_CAT, "META", "USD"),
|
|
112
|
+
// COMMODITIES CAT MODE
|
|
113
|
+
GOLD_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catCommoditiesGroup, exports.PAIR_CONFIGS_IDS.GOLD_USD_CAT, "GOLD", "USD"),
|
|
114
|
+
SILVER_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catCommoditiesGroup, exports.PAIR_CONFIGS_IDS.SILVER_USD_CAT, "SILVER", "USD"),
|
|
73
115
|
};
|
|
74
116
|
const PAIR_ID_TO_NAME = Object.fromEntries(Object.entries(exports.PAIR_CONFIGS_IDENTIFIERS).map(([pairName, value]) => [
|
|
75
117
|
value.id,
|