@exodus/market-history 10.7.1 → 10.8.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.8.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/market-history@10.7.1...@exodus/market-history@10.8.0) (2026-06-08)
7
+
8
+ ### Features
9
+
10
+ - **market-history:** add fetchAssets for non-enabled assets ([#17075](https://github.com/ExodusMovement/exodus-hydra/issues/17075)) ([faf4427](https://github.com/ExodusMovement/exodus-hydra/commit/faf44275bcb96ec92ce58b97f0a2f5fec0b11d3e))
11
+
6
12
  ## [10.7.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/market-history@10.7.0...@exodus/market-history@10.7.1) (2026-05-04)
7
13
 
8
14
  **Note:** Version bump only for package @exodus/market-history
@@ -8,6 +8,7 @@ declare const marketHistoryApiDefinition: {
8
8
  marketHistory: {
9
9
  update: (granularity: import("../types.js").Granularity) => Promise<void>;
10
10
  updateAll: () => Promise<void>;
11
+ fetchAssets: (assetNames: string[], granularities?: import("../types.js").Granularity[]) => Promise<void>;
11
12
  fetchAssetPricesFromDate: (params: {
12
13
  assetName: string;
13
14
  granularity: import("../types.js").Granularity;
package/lib/api/index.js CHANGED
@@ -3,6 +3,7 @@ const createMarketHistoryApi = ({ marketHistoryMonitor, }) => {
3
3
  marketHistory: {
4
4
  update: marketHistoryMonitor.update,
5
5
  updateAll: marketHistoryMonitor.updateAll,
6
+ fetchAssets: marketHistoryMonitor.fetchAssets,
6
7
  fetchAssetPricesFromDate: marketHistoryMonitor.fetchAssetPricesFromDate,
7
8
  },
8
9
  };
package/lib/index.d.ts CHANGED
@@ -143,6 +143,7 @@ declare const marketHistory: ({ clearHistoryCacheDefaultValue, remoteConfigClear
143
143
  marketHistory: {
144
144
  update: (granularity: import("./types.js").Granularity) => Promise<void>;
145
145
  updateAll: () => Promise<void>;
146
+ fetchAssets: (assetNames: string[], granularities?: import("./types.js").Granularity[]) => Promise<void>;
146
147
  fetchAssetPricesFromDate: (params: {
147
148
  assetName: string;
148
149
  granularity: import("./types.js").Granularity;
@@ -290,6 +290,34 @@ class MarketHistoryMonitorImpl {
290
290
  this.#logger.error('Market history update all failed', error);
291
291
  }
292
292
  };
293
+ fetchAssets = async (assetNames, granularities = ['day', 'hour', 'minute']) => {
294
+ if (!this.#isActive) {
295
+ const e = new Error('market-history fetchAssets cannot be called before module started');
296
+ this.#errorTracking.track({
297
+ error: e,
298
+ context: { method: 'fetchAssets' },
299
+ });
300
+ throw e;
301
+ }
302
+ if (!this.#currency) {
303
+ const e = new Error('market-history fetchAssets cannot be called before currency is loaded');
304
+ this.#errorTracking.track({
305
+ error: e,
306
+ context: { method: 'fetchAssets' },
307
+ });
308
+ throw e;
309
+ }
310
+ try {
311
+ await this.#updateAssets(assetNames, granularities);
312
+ }
313
+ catch (error) {
314
+ this.#errorTracking.track({
315
+ error,
316
+ context: { method: 'fetchAssets' },
317
+ });
318
+ this.#logger.error('market-history fetchAssets failed', error);
319
+ }
320
+ };
293
321
  #fetchPricesByGranularity = async ({ granularity, assetNames, currency, }) => {
294
322
  const parsedGranularity = parseGranularity(granularity);
295
323
  try {
package/lib/types.d.ts CHANGED
@@ -93,6 +93,7 @@ export type MarketHistoryMonitor = {
93
93
  hydrate: () => Promise<void>;
94
94
  update: (granularity: Granularity) => Promise<void>;
95
95
  updateAll: () => Promise<void>;
96
+ fetchAssets: (assetNames: string[], granularities?: Granularity[]) => Promise<void>;
96
97
  fetchAssetPricesFromDate: (params: {
97
98
  assetName: string;
98
99
  granularity: Granularity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/market-history",
3
- "version": "10.7.1",
3
+ "version": "10.8.0",
4
4
  "description": "Fetches historical prices for assets",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "license": "MIT",
@@ -42,14 +42,14 @@
42
42
  "devDependencies": {
43
43
  "@exodus/assets": "^11.0.0",
44
44
  "@exodus/assets-base": "^12.0.0",
45
- "@exodus/assets-feature": "^9.2.2",
45
+ "@exodus/assets-feature": "^9.2.3",
46
46
  "@exodus/bitcoin-meta": "^2.0.0",
47
47
  "@exodus/dependency-types": "^2.1.1",
48
48
  "@exodus/ethereum-meta": "^2.4.1",
49
49
  "@exodus/locale": "^2.7.0",
50
50
  "@exodus/logger": "^1.2.3",
51
- "@exodus/rates-monitor": "^4.14.8",
52
- "@exodus/redux-dependency-injection": "^4.5.0",
51
+ "@exodus/rates-monitor": "^4.15.0",
52
+ "@exodus/redux-dependency-injection": "^5.0.0",
53
53
  "@exodus/storage-memory": "^2.4.0",
54
54
  "events": "^3.3.0",
55
55
  "redux": "^4.0.0"
@@ -66,5 +66,5 @@
66
66
  "access": "public",
67
67
  "provenance": false
68
68
  },
69
- "gitHead": "ef035f3c387767ab37076ad2d2dfb8be62f19ea6"
69
+ "gitHead": "c75365960676b56be5a919b421c0ea801f694908"
70
70
  }