@gbozee/ultimate 0.0.2-172 → 0.0.2-174

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
@@ -62422,8 +62422,8 @@ class ExchangeAccount {
62422
62422
  const focus_position = kind === "long" ? long_position : short_position;
62423
62423
  const target_position = kind === "long" ? short_position : long_position;
62424
62424
  let _quantity = payload.quantity;
62425
- if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity === 0) {
62426
- _quantity = target_position.getInstance().quantity;
62425
+ if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity < target_position.getInstance().quantity) {
62426
+ _quantity = Math.abs(target_position.getInstance().quantity - focus_position.getInstance().quantity);
62427
62427
  }
62428
62428
  await focus_position.placeMarketOrder({
62429
62429
  quantity: _quantity,
package/dist/index.js CHANGED
@@ -62362,8 +62362,8 @@ class ExchangeAccount {
62362
62362
  const focus_position = kind === "long" ? long_position : short_position;
62363
62363
  const target_position = kind === "long" ? short_position : long_position;
62364
62364
  let _quantity = payload.quantity;
62365
- if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity === 0) {
62366
- _quantity = target_position.getInstance().quantity;
62365
+ if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity < target_position.getInstance().quantity) {
62366
+ _quantity = Math.abs(target_position.getInstance().quantity - focus_position.getInstance().quantity);
62367
62367
  }
62368
62368
  await focus_position.placeMarketOrder({
62369
62369
  quantity: _quantity,
@@ -69092,8 +69092,8 @@ class ExchangeAccount {
69092
69092
  const focus_position = kind === "long" ? long_position : short_position;
69093
69093
  const target_position = kind === "long" ? short_position : long_position;
69094
69094
  let _quantity = payload.quantity;
69095
- if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity === 0) {
69096
- _quantity = target_position.getInstance().quantity;
69095
+ if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity < target_position.getInstance().quantity) {
69096
+ _quantity = Math.abs(target_position.getInstance().quantity - focus_position.getInstance().quantity);
69097
69097
  }
69098
69098
  await focus_position.placeMarketOrder({
69099
69099
  quantity: _quantity,
@@ -69065,8 +69065,8 @@ class ExchangeAccount {
69065
69065
  const focus_position = kind === "long" ? long_position : short_position;
69066
69066
  const target_position = kind === "long" ? short_position : long_position;
69067
69067
  let _quantity = payload.quantity;
69068
- if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity === 0) {
69069
- _quantity = target_position.getInstance().quantity;
69068
+ if (!payload.close && !payload.quantity && target_position.getInstance().quantity > 0 && focus_position.getInstance().quantity < target_position.getInstance().quantity) {
69069
+ _quantity = Math.abs(target_position.getInstance().quantity - focus_position.getInstance().quantity);
69070
69070
  }
69071
69071
  await focus_position.placeMarketOrder({
69072
69072
  quantity: _quantity,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gbozee/ultimate",
3
3
  "type": "module",
4
- "version": "0.0.2-172",
4
+ "version": "0.0.2-174",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",