@orderly.network/hooks 2.8.11-alpha.0 → 2.8.11
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -37,7 +37,7 @@ declare global {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
declare const _default: "2.8.11
|
|
40
|
+
declare const _default: "2.8.11";
|
|
41
41
|
|
|
42
42
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
43
43
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -783,6 +783,7 @@ type TabSort = Record<string, {
|
|
|
783
783
|
}>;
|
|
784
784
|
type MarketsItem = {
|
|
785
785
|
symbol: string;
|
|
786
|
+
displayName?: string;
|
|
786
787
|
index_price: number;
|
|
787
788
|
mark_price: number;
|
|
788
789
|
sum_unitary_funding: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ declare global {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
declare const _default: "2.8.11
|
|
40
|
+
declare const _default: "2.8.11";
|
|
41
41
|
|
|
42
42
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
43
43
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -783,6 +783,7 @@ type TabSort = Record<string, {
|
|
|
783
783
|
}>;
|
|
784
784
|
type MarketsItem = {
|
|
785
785
|
symbol: string;
|
|
786
|
+
displayName?: string;
|
|
786
787
|
index_price: number;
|
|
787
788
|
mark_price: number;
|
|
788
789
|
sum_unitary_funding: number;
|
package/dist/index.js
CHANGED
|
@@ -64,9 +64,9 @@ var __export = (target, all) => {
|
|
|
64
64
|
// src/version.ts
|
|
65
65
|
if (typeof window !== "undefined") {
|
|
66
66
|
window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
|
|
67
|
-
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.8.11
|
|
67
|
+
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.8.11";
|
|
68
68
|
}
|
|
69
|
-
var version_default = "2.8.11
|
|
69
|
+
var version_default = "2.8.11";
|
|
70
70
|
var fetcher = (url, init2 = {}, queryOptions) => net.get(url, init2, queryOptions?.formatter);
|
|
71
71
|
var noCacheConfig = {
|
|
72
72
|
dedupingInterval: 0,
|
|
@@ -3204,6 +3204,10 @@ var DEFAULT_TICK_SIZES = {
|
|
|
3204
3204
|
var DEFAULT_SYMBOL_DEPTHS = {
|
|
3205
3205
|
PERP_ETH_USDC: [0.01, 0.1, 0.5, 1, 10]
|
|
3206
3206
|
};
|
|
3207
|
+
var DEFAULT_SYMBOL_DISPLAY_NAMES = {
|
|
3208
|
+
PERP_XAU_USDC: "XAU (Gold) ",
|
|
3209
|
+
PERP_XAG_USDC: "XAG (Silver)"
|
|
3210
|
+
};
|
|
3207
3211
|
var ProxyConfigStore = class {
|
|
3208
3212
|
constructor(_originConfigStore) {
|
|
3209
3213
|
this._originConfigStore = _originConfigStore;
|
|
@@ -3669,6 +3673,7 @@ var addFieldToMarkets = (futures, symbolsInfo, rwaSymbolsInfo) => {
|
|
|
3669
3673
|
...item,
|
|
3670
3674
|
quote_dp: info("quote_dp"),
|
|
3671
3675
|
created_time: info("created_time"),
|
|
3676
|
+
displayName: info("displayName"),
|
|
3672
3677
|
leverage: getLeverage(info("base_imr")),
|
|
3673
3678
|
openInterest: getOpenInterest(item.open_interest, item.index_price),
|
|
3674
3679
|
"8h_funding": get8hFunding(item.est_funding_rate, info("funding_period")),
|
|
@@ -11311,14 +11316,16 @@ var usePublicDataObserver = () => {
|
|
|
11311
11316
|
const arr = item.symbol.split("_");
|
|
11312
11317
|
const base_dp = utils.getPrecisionByNumber(item.base_tick);
|
|
11313
11318
|
const quote_dp = utils.getPrecisionByNumber(item.quote_tick);
|
|
11314
|
-
|
|
11319
|
+
const symbol = item.symbol;
|
|
11320
|
+
obj[symbol] = {
|
|
11315
11321
|
...item,
|
|
11316
11322
|
base_dp,
|
|
11317
11323
|
quote_dp,
|
|
11318
11324
|
base: arr[1],
|
|
11319
11325
|
quote: arr[2],
|
|
11320
11326
|
type: arr[0],
|
|
11321
|
-
name: `${arr[1]}-${arr[0]}
|
|
11327
|
+
name: `${arr[1]}-${arr[0]}`,
|
|
11328
|
+
displayName: DEFAULT_SYMBOL_DISPLAY_NAMES[symbol]
|
|
11322
11329
|
};
|
|
11323
11330
|
}
|
|
11324
11331
|
setSymbolsInfo(obj);
|