@gbozee/ultimate 0.0.2-47 → 0.0.2-48
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.js +12 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -56487,16 +56487,16 @@ class ExchangeAccount {
|
|
|
56487
56487
|
}
|
|
56488
56488
|
});
|
|
56489
56489
|
if (!kind) {
|
|
56490
|
-
await this.
|
|
56490
|
+
await this.updateConfigPnl({
|
|
56491
56491
|
symbol,
|
|
56492
56492
|
kind: "long"
|
|
56493
56493
|
});
|
|
56494
|
-
await this.
|
|
56494
|
+
await this.updateConfigPnl({
|
|
56495
56495
|
symbol,
|
|
56496
56496
|
kind: "short"
|
|
56497
56497
|
});
|
|
56498
56498
|
} else {
|
|
56499
|
-
await this.
|
|
56499
|
+
await this.updateConfigPnl({
|
|
56500
56500
|
symbol,
|
|
56501
56501
|
kind
|
|
56502
56502
|
});
|
|
@@ -56696,7 +56696,14 @@ class ExchangeAccount {
|
|
|
56696
56696
|
if (!focus_position.follow) {
|
|
56697
56697
|
return "No follow set";
|
|
56698
56698
|
}
|
|
56699
|
-
|
|
56699
|
+
let should_place_order = false;
|
|
56700
|
+
if (focus_position.threshold_qty === 0) {
|
|
56701
|
+
should_place_order = true;
|
|
56702
|
+
}
|
|
56703
|
+
if (focus_position.threshold_qty > 0 && track_position.quantity >= focus_position.threshold_qty) {
|
|
56704
|
+
should_place_order = true;
|
|
56705
|
+
}
|
|
56706
|
+
if (track_position.quantity !== focus_position.quantity && focus_position.quantity < track_position.quantity && should_place_order) {
|
|
56700
56707
|
const remaining_quantity = Math.abs(track_position.quantity - focus_position.quantity);
|
|
56701
56708
|
await this.placeMarketOrder({
|
|
56702
56709
|
symbol,
|
|
@@ -57477,7 +57484,7 @@ class ExchangeAccount {
|
|
|
57477
57484
|
live_refresh: true,
|
|
57478
57485
|
update: true
|
|
57479
57486
|
});
|
|
57480
|
-
await this.
|
|
57487
|
+
await this.updateConfigPnl({
|
|
57481
57488
|
symbol,
|
|
57482
57489
|
kind
|
|
57483
57490
|
});
|