@orderly.network/hooks 2.12.1-alpha.0 → 2.12.2-alpha.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/dist/index.mjs CHANGED
@@ -49,9 +49,9 @@ function useMarketCategoriesConfig() {
49
49
  // src/version.ts
50
50
  if (typeof window !== "undefined") {
51
51
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
52
- window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.12.1-alpha.0";
52
+ window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.12.2-alpha.0";
53
53
  }
54
- var version_default = "2.12.1-alpha.0";
54
+ var version_default = "2.12.2-alpha.0";
55
55
  var fetcher = (url, init2 = {}, queryOptions) => get(url, init2, queryOptions?.formatter);
56
56
  var noCacheConfig = {
57
57
  dedupingInterval: 0,
@@ -3128,7 +3128,9 @@ var DEFAULT_SYMBOL_DEPTHS = {
3128
3128
  };
3129
3129
  var DEFAULT_SYMBOL_DISPLAY_NAMES = {
3130
3130
  PERP_XAU_USDC: "XAU (Gold) ",
3131
- PERP_XAG_USDC: "XAG (Silver)"
3131
+ PERP_XAG_USDC: "XAG (Silver)",
3132
+ PERP_CL_USDC: "CL (WTI Crude Oil)",
3133
+ PERP_BZ_USDC: "BZ (Brent Crude Oil)"
3132
3134
  };
3133
3135
  var ProxyConfigStore = class {
3134
3136
  constructor(_originConfigStore) {
@@ -19680,6 +19682,7 @@ var useTpslPriceChecker = (params) => {
19680
19682
  slPrice,
19681
19683
  liqPrice,
19682
19684
  side,
19685
+ markPrice,
19683
19686
  currentPosition,
19684
19687
  orderQuantity
19685
19688
  } = params;
@@ -19735,6 +19738,14 @@ var useTpslPriceChecker = (params) => {
19735
19738
  if (slPrice === void 0 || liqPrice === void 0 || side === void 0 || liqPrice === null) {
19736
19739
  return null;
19737
19740
  }
19741
+ if (markPrice != null && Number.isFinite(markPrice) && markPrice > 0) {
19742
+ if (side === OrderSide.BUY && liqPrice > markPrice) {
19743
+ return null;
19744
+ }
19745
+ if (side === OrderSide.SELL && liqPrice < markPrice) {
19746
+ return null;
19747
+ }
19748
+ }
19738
19749
  let slPriceDecimal;
19739
19750
  let liqPriceDecimal;
19740
19751
  try {
@@ -19761,6 +19772,7 @@ var useTpslPriceChecker = (params) => {
19761
19772
  slPrice,
19762
19773
  liqPrice,
19763
19774
  side,
19775
+ markPrice,
19764
19776
  warning_threshold,
19765
19777
  currentPosition,
19766
19778
  orderQuantity