@gbozee/ultimate 0.0.2-next.65 → 0.0.2-next.66

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.cjs CHANGED
@@ -74993,7 +74993,8 @@ function build_reduce_config(payload) {
74993
74993
  not_reduce = false,
74994
74994
  _positions,
74995
74995
  long_config,
74996
- short_config
74996
+ short_config,
74997
+ kind
74997
74998
  } = payload;
74998
74999
  const long_position = _positions.find((x) => x.kind === "long");
74999
75000
  const short_position = _positions.find((x) => x.kind === "short");
@@ -75008,8 +75009,8 @@ function build_reduce_config(payload) {
75008
75009
  short_target_pnl = Math.abs(short_position.entry - buy_price) * short_position.quantity;
75009
75010
  }
75010
75011
  return {
75011
- trigger_short: true,
75012
- trigger_long: true,
75012
+ trigger_short: kind ? kind === "short" : true,
75013
+ trigger_long: kind ? kind === "long" : true,
75013
75014
  symbol,
75014
75015
  short_minimum_pnl,
75015
75016
  long_minimum_pnl,
@@ -77808,7 +77809,8 @@ class ExchangeAccount {
77808
77809
  short_position.getInstance()
77809
77810
  ],
77810
77811
  long_config,
77811
- short_config
77812
+ short_config,
77813
+ kind: payload.kind
77812
77814
  });
77813
77815
  console.log("config", config2);
77814
77816
  if (!long_config || !short_config) {
package/dist/index.js CHANGED
@@ -74905,7 +74905,8 @@ function build_reduce_config(payload) {
74905
74905
  not_reduce = false,
74906
74906
  _positions,
74907
74907
  long_config,
74908
- short_config
74908
+ short_config,
74909
+ kind
74909
74910
  } = payload;
74910
74911
  const long_position = _positions.find((x) => x.kind === "long");
74911
74912
  const short_position = _positions.find((x) => x.kind === "short");
@@ -74920,8 +74921,8 @@ function build_reduce_config(payload) {
74920
74921
  short_target_pnl = Math.abs(short_position.entry - buy_price) * short_position.quantity;
74921
74922
  }
74922
74923
  return {
74923
- trigger_short: true,
74924
- trigger_long: true,
74924
+ trigger_short: kind ? kind === "short" : true,
74925
+ trigger_long: kind ? kind === "long" : true,
74925
74926
  symbol,
74926
74927
  short_minimum_pnl,
74927
74928
  long_minimum_pnl,
@@ -77720,7 +77721,8 @@ class ExchangeAccount {
77720
77721
  short_position.getInstance()
77721
77722
  ],
77722
77723
  long_config,
77723
- short_config
77724
+ short_config,
77725
+ kind: payload.kind
77724
77726
  });
77725
77727
  console.log("config", config2);
77726
77728
  if (!long_config || !short_config) {
@@ -78715,7 +78715,8 @@ function build_reduce_config(payload) {
78715
78715
  not_reduce = false,
78716
78716
  _positions,
78717
78717
  long_config,
78718
- short_config
78718
+ short_config,
78719
+ kind
78719
78720
  } = payload;
78720
78721
  const long_position = _positions.find((x) => x.kind === "long");
78721
78722
  const short_position = _positions.find((x) => x.kind === "short");
@@ -78730,8 +78731,8 @@ function build_reduce_config(payload) {
78730
78731
  short_target_pnl = Math.abs(short_position.entry - buy_price) * short_position.quantity;
78731
78732
  }
78732
78733
  return {
78733
- trigger_short: true,
78734
- trigger_long: true,
78734
+ trigger_short: kind ? kind === "short" : true,
78735
+ trigger_long: kind ? kind === "long" : true,
78735
78736
  symbol,
78736
78737
  short_minimum_pnl,
78737
78738
  long_minimum_pnl,
@@ -81530,7 +81531,8 @@ class ExchangeAccount {
81530
81531
  short_position.getInstance()
81531
81532
  ],
81532
81533
  long_config,
81533
- short_config
81534
+ short_config,
81535
+ kind: payload.kind
81534
81536
  });
81535
81537
  console.log("config", config2);
81536
81538
  if (!long_config || !short_config) {
@@ -78688,7 +78688,8 @@ function build_reduce_config(payload) {
78688
78688
  not_reduce = false,
78689
78689
  _positions,
78690
78690
  long_config,
78691
- short_config
78691
+ short_config,
78692
+ kind
78692
78693
  } = payload;
78693
78694
  const long_position = _positions.find((x) => x.kind === "long");
78694
78695
  const short_position = _positions.find((x) => x.kind === "short");
@@ -78703,8 +78704,8 @@ function build_reduce_config(payload) {
78703
78704
  short_target_pnl = Math.abs(short_position.entry - buy_price) * short_position.quantity;
78704
78705
  }
78705
78706
  return {
78706
- trigger_short: true,
78707
- trigger_long: true,
78707
+ trigger_short: kind ? kind === "short" : true,
78708
+ trigger_long: kind ? kind === "long" : true,
78708
78709
  symbol,
78709
78710
  short_minimum_pnl,
78710
78711
  long_minimum_pnl,
@@ -81503,7 +81504,8 @@ class ExchangeAccount {
81503
81504
  short_position.getInstance()
81504
81505
  ],
81505
81506
  long_config,
81506
- short_config
81507
+ short_config,
81508
+ kind: payload.kind
81507
81509
  });
81508
81510
  console.log("config", config2);
81509
81511
  if (!long_config || !short_config) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gbozee/ultimate",
3
3
  "type": "module",
4
- "version": "0.0.2-next.65",
4
+ "version": "0.0.2-next.66",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",