@orderly.network/ui-tpsl 2.8.12 → 2.8.13-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.d.mts CHANGED
@@ -235,6 +235,7 @@ declare const useTPSLAdvanced: (props: Props$3) => {
235
235
  symbolInfo: _orderly_network_types.API.SymbolExt;
236
236
  slPriceError: OrderValidationResult | null;
237
237
  estLiqPrice: number | null;
238
+ estLiqPriceDistance: number | null;
238
239
  setValue: (key: "symbol" | "type" | "order_type" | "order_type_ext" | "order_price" | "order_quantity" | "order_amount" | "visible_quantity" | "side" | "reduce_only" | "slippage" | "order_tag" | "level" | "post_only_adjust" | "client_order_id" | "total" | "start_price" | "end_price" | "total_orders" | "distribution_type" | "skew" | "activated_price" | "callback_value" | "callback_rate" | "quantity" | "price" | "algo_type" | "trigger_price_type" | "trigger_price" | "child_orders" | "position_type" | "tp_pnl" | "tp_offset" | "tp_offset_percentage" | "tp_ROI" | "tp_trigger_price" | "tp_order_price" | "tp_order_type" | "sl_pnl" | "sl_offset" | "sl_offset_percentage" | "sl_ROI" | "sl_trigger_price" | "sl_order_price" | "sl_order_type", value: any, options?: {
239
240
  shouldUpdateLastChangedField?: boolean;
240
241
  }) => void;
package/dist/index.d.ts CHANGED
@@ -235,6 +235,7 @@ declare const useTPSLAdvanced: (props: Props$3) => {
235
235
  symbolInfo: _orderly_network_types.API.SymbolExt;
236
236
  slPriceError: OrderValidationResult | null;
237
237
  estLiqPrice: number | null;
238
+ estLiqPriceDistance: number | null;
238
239
  setValue: (key: "symbol" | "type" | "order_type" | "order_type_ext" | "order_price" | "order_quantity" | "order_amount" | "visible_quantity" | "side" | "reduce_only" | "slippage" | "order_tag" | "level" | "post_only_adjust" | "client_order_id" | "total" | "start_price" | "end_price" | "total_orders" | "distribution_type" | "skew" | "activated_price" | "callback_value" | "callback_rate" | "quantity" | "price" | "algo_type" | "trigger_price_type" | "trigger_price" | "child_orders" | "position_type" | "tp_pnl" | "tp_offset" | "tp_offset_percentage" | "tp_ROI" | "tp_trigger_price" | "tp_order_price" | "tp_order_type" | "sl_pnl" | "sl_offset" | "sl_offset_percentage" | "sl_ROI" | "sl_trigger_price" | "sl_order_price" | "sl_order_type", value: any, options?: {
239
240
  shouldUpdateLastChangedField?: boolean;
240
241
  }) => void;
package/dist/index.js CHANGED
@@ -1624,6 +1624,11 @@ var TPSLAdvancedUI = (props) => {
1624
1624
  const { getErrorMsg } = reactApp.useOrderEntryFormErrorMsg(props.slPriceError);
1625
1625
  const isSlPriceWarning = props.slPriceError?.sl_trigger_price?.type === hooks.ERROR_MSG_CODES.SL_PRICE_WARNING;
1626
1626
  const isSlPriceError = props.slPriceError?.sl_trigger_price?.type === hooks.ERROR_MSG_CODES.SL_PRICE_ERROR;
1627
+ const displayEstLiqPrice = hooks.useGetEstLiqPrice({
1628
+ estLiqPrice: props.estLiqPrice,
1629
+ symbol: props.symbolInfo.symbol,
1630
+ side: props.formattedOrder.side
1631
+ });
1627
1632
  const {
1628
1633
  formattedOrder,
1629
1634
  setValue: setOrderValue,
@@ -1698,7 +1703,7 @@ var TPSLAdvancedUI = (props) => {
1698
1703
  order: formattedOrder,
1699
1704
  baseDP: symbolInfo.base_dp,
1700
1705
  quoteDP: symbolInfo.quote_dp,
1701
- estLiqPrice: props.estLiqPrice ?? void 0,
1706
+ estLiqPrice: displayEstLiqPrice ?? void 0,
1702
1707
  symbolLeverage: props.symbolLeverage
1703
1708
  }
1704
1709
  ) }),
@@ -1926,6 +1931,7 @@ var useTPSLAdvanced = (props) => {
1926
1931
  symbolInfo,
1927
1932
  slPriceError,
1928
1933
  estLiqPrice: state.estLiqPrice,
1934
+ estLiqPriceDistance: state.estLiqPriceDistance,
1929
1935
  setValue,
1930
1936
  setValues,
1931
1937
  onSubmit,