@exodus/market-history 9.1.2 → 9.2.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 +6 -0
- package/README.md +3 -3
- package/api/index.d.ts +22 -0
- package/index.d.ts +8 -0
- package/package.json +7 -7
- package/redux/selectors/create-asset-daily-prices-loading.js +1 -1
- package/redux/selectors/create-asset-hourly-prices-loading.js +1 -1
- package/redux/selectors/get-asset-daily-price.js +1 -1
- package/redux/selectors/get-asset-hourly-price.js +1 -2
- package/redux/selectors/get-price-with-fallback.js +1 -1
- package/redux/selectors/helpers/memoize-get-asset-price.js +1 -1
- package/redux/selectors/helpers/memoize-get-price.js +1 -1
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
|
+
## [9.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/market-history@9.1.2...@exodus/market-history@9.2.0) (2025-01-24)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- feat(market-history): add ts types (#11216)
|
|
11
|
+
|
|
6
12
|
## [9.1.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/market-history@9.1.1...@exodus/market-history@9.1.2) (2024-12-06)
|
|
7
13
|
|
|
8
14
|
### License
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ yarn add @exodus/market-history
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/
|
|
13
|
+
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/development/using-the-sdk.md).
|
|
14
14
|
|
|
15
15
|
### Play with it
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ This feature is designed to be used together with `@exodus/headless`. See [using
|
|
|
20
20
|
|
|
21
21
|
### API Side
|
|
22
22
|
|
|
23
|
-
See [using the sdk](../../docs/
|
|
23
|
+
See [using the sdk](../../docs/development/using-the-sdk.md#setup-the-api-side) for more details on how features plug into the SDK.
|
|
24
24
|
|
|
25
25
|
If you're building a feature that requires historical asset prices, add a dependency on the `marketHistoryAtom`, which stores data in the following shape:
|
|
26
26
|
|
|
@@ -69,7 +69,7 @@ await exodus.marketHistory.fetchAssetPricesFromDate({
|
|
|
69
69
|
|
|
70
70
|
### UI Side
|
|
71
71
|
|
|
72
|
-
See [using the sdk](../../docs/
|
|
72
|
+
See [using the sdk](../../docs/development/using-the-sdk.md#events) for more details on basic UI-side setup.
|
|
73
73
|
|
|
74
74
|
```js
|
|
75
75
|
import selectors from '~/ui/flux/selectors'
|
package/api/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type Granularity = 'day' | 'hour'
|
|
2
|
+
|
|
3
|
+
declare const marketHistoryApiDefinition: {
|
|
4
|
+
id: 'marketHistoryApi'
|
|
5
|
+
type: 'api'
|
|
6
|
+
factory(): {
|
|
7
|
+
marketHistory: {
|
|
8
|
+
update: (granularity: Granularity) => Promise<void>
|
|
9
|
+
fetchAssetPricesFromDate: ({
|
|
10
|
+
assetName,
|
|
11
|
+
granularity,
|
|
12
|
+
startTimestamp,
|
|
13
|
+
}: {
|
|
14
|
+
assetName: string
|
|
15
|
+
granularity: Granularity
|
|
16
|
+
startTimestamp: number
|
|
17
|
+
}) => Promise<void>
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default marketHistoryApiDefinition
|
package/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/market-history",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "Fetches historical prices for assets",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
"main": "index.js",
|
|
13
13
|
"files": [
|
|
14
14
|
"api",
|
|
15
|
-
"module",
|
|
16
15
|
"atoms",
|
|
16
|
+
"module",
|
|
17
17
|
"plugin",
|
|
18
18
|
"redux",
|
|
19
|
-
"
|
|
19
|
+
"index.d.ts",
|
|
20
20
|
"CHANGELOG.md",
|
|
21
21
|
"README.md",
|
|
22
|
+
"utils.js",
|
|
22
23
|
"!**/__tests__/**"
|
|
23
24
|
],
|
|
24
25
|
"dependencies": {
|
|
@@ -27,7 +28,6 @@
|
|
|
27
28
|
"@exodus/dayjs": "^1.0.2",
|
|
28
29
|
"@exodus/price-api": "^3.3.4",
|
|
29
30
|
"@exodus/remote-config-atoms": "^1.1.0",
|
|
30
|
-
"lodash": "^4.17.21",
|
|
31
31
|
"make-concurrent": "^5.4.0",
|
|
32
32
|
"ms": "^0.7.1",
|
|
33
33
|
"reselect": "^3.0.1"
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@exodus/assets": "^8.0.94",
|
|
37
37
|
"@exodus/assets-base": "^8.1.6",
|
|
38
|
-
"@exodus/assets-feature": "^
|
|
38
|
+
"@exodus/assets-feature": "^6.0.4",
|
|
39
39
|
"@exodus/bitcoin-meta": "^1.0.1",
|
|
40
40
|
"@exodus/ethereum-meta": "^1.0.30",
|
|
41
41
|
"@exodus/locale": "^2.3.0",
|
|
42
42
|
"@exodus/logger": "^1.2.3",
|
|
43
|
-
"@exodus/rates-monitor": "^4.
|
|
43
|
+
"@exodus/rates-monitor": "^4.7.0",
|
|
44
44
|
"@exodus/redux-dependency-injection": "^4.1.1",
|
|
45
45
|
"@exodus/storage-memory": "^2.2.2",
|
|
46
46
|
"events": "^3.3.0",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "c716740241021a3e38d52776f8592de3fd190af8"
|
|
61
61
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { memoize } from 'lodash' // eslint-disable-line @exodus/restricted-imports/prefer-basic-utils -- TODO: fix next time we touch this file
|
|
2
1
|
import { createSelector } from 'reselect'
|
|
3
2
|
import assetLoadingResultFunc from './helpers/asset-loading-result-func'
|
|
3
|
+
import { memoize } from '@exodus/basic-utils'
|
|
4
4
|
|
|
5
5
|
const selectorFactory = (getAssetDailyPricesSelector) =>
|
|
6
6
|
memoize((assetName) =>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { memoize } from 'lodash' // eslint-disable-line @exodus/restricted-imports/prefer-basic-utils -- TODO: fix next time we touch this file
|
|
2
1
|
import { createSelector } from 'reselect'
|
|
3
2
|
import assetLoadingResultFunc from './helpers/asset-loading-result-func'
|
|
3
|
+
import { memoize } from '@exodus/basic-utils'
|
|
4
4
|
|
|
5
5
|
const selectorFactory = (getAssetHourlyPricesSelector) =>
|
|
6
6
|
memoize((assetName) =>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { memoize } from 'lodash' // eslint-disable-line @exodus/restricted-imports/prefer-basic-utils -- TODO: fix next time we touch this file
|
|
2
1
|
import { createSelector } from 'reselect'
|
|
3
2
|
import memoizeGetAssetPrice from './helpers/memoize-get-asset-price'
|
|
3
|
+
import { memoize } from '@exodus/basic-utils'
|
|
4
4
|
|
|
5
5
|
const createGetAssetDailyPriceSelector = {
|
|
6
6
|
id: 'getAssetDailyPrice',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { memoize } from 'lodash' // eslint-disable-line @exodus/restricted-imports/prefer-basic-utils -- TODO: fix next time we touch this file
|
|
2
|
-
|
|
3
1
|
import { createSelector } from 'reselect'
|
|
4
2
|
import memoizeGetAssetPrices from './helpers/memoize-get-asset-price'
|
|
3
|
+
import { memoize } from '@exodus/basic-utils'
|
|
5
4
|
|
|
6
5
|
const createGetAssetHourlyPriceSelector = {
|
|
7
6
|
id: 'getAssetHourlyPrice',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { memoize } from '@exodus/basic-utils'
|
|
1
2
|
import appendPricesWithRate from './append-prices-with-rate'
|
|
2
|
-
import { memoize } from 'lodash' // eslint-disable-line @exodus/restricted-imports/prefer-basic-utils -- TODO: fix next time we touch this file
|
|
3
3
|
import { prepareTime } from './date-utils'
|
|
4
4
|
|
|
5
5
|
const memoizeGetAssetPrices = (historicalPrices, rate, type, currentTime) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { memoize } from '@exodus/basic-utils'
|
|
1
2
|
import appendPricesWithRate from './append-prices-with-rate'
|
|
2
|
-
import { memoize } from 'lodash' // eslint-disable-line @exodus/restricted-imports/prefer-basic-utils -- TODO: fix next time we touch this file
|
|
3
3
|
import { prepareTime } from './date-utils'
|
|
4
4
|
|
|
5
5
|
const memoizeGetPrices = (getAssetPrices, rates, type, assets, currentTime) => {
|