@gbozee/ultimate 0.0.2-183 → 0.0.2-185

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.
@@ -436,6 +436,7 @@ export interface PositionsView {
436
436
  support?: SupportTable;
437
437
  symbol_config: SymbolConfig;
438
438
  resistance?: SupportTable;
439
+ anchor?: Omit<PositionsView, "expand">;
439
440
  };
440
441
  pnl?: number;
441
442
  support_price?: number;
package/dist/index.cjs CHANGED
@@ -54702,7 +54702,18 @@ class AppDatabase {
54702
54702
  return result;
54703
54703
  }
54704
54704
  get positionExpand() {
54705
- return "b_config, account_strategy, p_account, proxy, compound_instance.ref,support,resistance,symbol_config";
54705
+ const fields = [
54706
+ "b_config",
54707
+ "account_strategy",
54708
+ "p_account",
54709
+ "proxy",
54710
+ "compound_instance.ref",
54711
+ "support",
54712
+ "resistance",
54713
+ "symbol_config",
54714
+ "anchor"
54715
+ ];
54716
+ return fields.join(", ");
54706
54717
  }
54707
54718
  async fetchCentralPositions(payload) {
54708
54719
  const { asset: assetName, symbol, customFilter = "" } = payload;
@@ -58897,6 +58908,7 @@ class BaseExchange {
58897
58908
  increase = false,
58898
58909
  price_places,
58899
58910
  decimal_places,
58911
+ increase_ratio = 1,
58900
58912
  place = true
58901
58913
  } = payload;
58902
58914
  const spread = 1.00005;
@@ -58913,12 +58925,12 @@ class BaseExchange {
58913
58925
  is_market: false
58914
58926
  }
58915
58927
  ];
58916
- if (increase) {
58928
+ if (increase && increase_ratio > 0) {
58917
58929
  order.push({
58918
58930
  kind,
58919
58931
  price: purchase_stop,
58920
58932
  side: kind === "long" ? "buy" : "sell",
58921
- quantity,
58933
+ quantity: quantity * increase_ratio,
58922
58934
  is_market: false
58923
58935
  });
58924
58936
  }
@@ -61764,7 +61776,8 @@ class ExchangePosition {
61764
61776
  place = false,
61765
61777
  increase = true,
61766
61778
  ratio_to_loose = 0,
61767
- reverse_position
61779
+ reverse_position,
61780
+ increase_ratio
61768
61781
  } = payload;
61769
61782
  const position2 = this.instance;
61770
61783
  console.log(position2);
@@ -61805,6 +61818,7 @@ class ExchangePosition {
61805
61818
  price_places,
61806
61819
  decimal_places,
61807
61820
  increase,
61821
+ increase_ratio,
61808
61822
  place
61809
61823
  });
61810
61824
  }
package/dist/index.d.ts CHANGED
@@ -162,6 +162,7 @@ export interface PositionsView {
162
162
  support?: SupportTable;
163
163
  symbol_config: SymbolConfig;
164
164
  resistance?: SupportTable;
165
+ anchor?: Omit<PositionsView, "expand">;
165
166
  };
166
167
  pnl?: number;
167
168
  support_price?: number;
@@ -566,6 +567,7 @@ declare abstract class BaseExchange {
566
567
  quantity: number;
567
568
  increase?: boolean;
568
569
  place?: boolean;
570
+ increase_ratio?: number;
569
571
  }): Promise<any>;
570
572
  abstract getOpenOrders(payload: {
571
573
  symbol: string;
@@ -2152,6 +2154,7 @@ export declare class ExchangePosition {
2152
2154
  increase?: boolean;
2153
2155
  ratio_to_loose?: number;
2154
2156
  reverse_position?: ExchangePosition;
2157
+ increase_ratio?: number;
2155
2158
  }): Promise<any>;
2156
2159
  lockReduction({ pnl, place, pause_tp, }: {
2157
2160
  pnl: number;
package/dist/index.js CHANGED
@@ -54640,7 +54640,18 @@ class AppDatabase {
54640
54640
  return result;
54641
54641
  }
54642
54642
  get positionExpand() {
54643
- return "b_config, account_strategy, p_account, proxy, compound_instance.ref,support,resistance,symbol_config";
54643
+ const fields = [
54644
+ "b_config",
54645
+ "account_strategy",
54646
+ "p_account",
54647
+ "proxy",
54648
+ "compound_instance.ref",
54649
+ "support",
54650
+ "resistance",
54651
+ "symbol_config",
54652
+ "anchor"
54653
+ ];
54654
+ return fields.join(", ");
54644
54655
  }
54645
54656
  async fetchCentralPositions(payload) {
54646
54657
  const { asset: assetName, symbol, customFilter = "" } = payload;
@@ -58835,6 +58846,7 @@ class BaseExchange {
58835
58846
  increase = false,
58836
58847
  price_places,
58837
58848
  decimal_places,
58849
+ increase_ratio = 1,
58838
58850
  place = true
58839
58851
  } = payload;
58840
58852
  const spread = 1.00005;
@@ -58851,12 +58863,12 @@ class BaseExchange {
58851
58863
  is_market: false
58852
58864
  }
58853
58865
  ];
58854
- if (increase) {
58866
+ if (increase && increase_ratio > 0) {
58855
58867
  order.push({
58856
58868
  kind,
58857
58869
  price: purchase_stop,
58858
58870
  side: kind === "long" ? "buy" : "sell",
58859
- quantity,
58871
+ quantity: quantity * increase_ratio,
58860
58872
  is_market: false
58861
58873
  });
58862
58874
  }
@@ -61702,7 +61714,8 @@ class ExchangePosition {
61702
61714
  place = false,
61703
61715
  increase = true,
61704
61716
  ratio_to_loose = 0,
61705
- reverse_position
61717
+ reverse_position,
61718
+ increase_ratio
61706
61719
  } = payload;
61707
61720
  const position2 = this.instance;
61708
61721
  console.log(position2);
@@ -61743,6 +61756,7 @@ class ExchangePosition {
61743
61756
  price_places,
61744
61757
  decimal_places,
61745
61758
  increase,
61759
+ increase_ratio,
61746
61760
  place
61747
61761
  });
61748
61762
  }
@@ -61396,7 +61396,18 @@ class AppDatabase {
61396
61396
  return result;
61397
61397
  }
61398
61398
  get positionExpand() {
61399
- return "b_config, account_strategy, p_account, proxy, compound_instance.ref,support,resistance,symbol_config";
61399
+ const fields = [
61400
+ "b_config",
61401
+ "account_strategy",
61402
+ "p_account",
61403
+ "proxy",
61404
+ "compound_instance.ref",
61405
+ "support",
61406
+ "resistance",
61407
+ "symbol_config",
61408
+ "anchor"
61409
+ ];
61410
+ return fields.join(", ");
61400
61411
  }
61401
61412
  async fetchCentralPositions(payload) {
61402
61413
  const { asset: assetName, symbol, customFilter = "" } = payload;
@@ -65473,6 +65484,7 @@ class BaseExchange {
65473
65484
  increase = false,
65474
65485
  price_places,
65475
65486
  decimal_places,
65487
+ increase_ratio = 1,
65476
65488
  place = true
65477
65489
  } = payload;
65478
65490
  const spread = 1.00005;
@@ -65489,12 +65501,12 @@ class BaseExchange {
65489
65501
  is_market: false
65490
65502
  }
65491
65503
  ];
65492
- if (increase) {
65504
+ if (increase && increase_ratio > 0) {
65493
65505
  order.push({
65494
65506
  kind,
65495
65507
  price: purchase_stop,
65496
65508
  side: kind === "long" ? "buy" : "sell",
65497
- quantity,
65509
+ quantity: quantity * increase_ratio,
65498
65510
  is_market: false
65499
65511
  });
65500
65512
  }
@@ -68340,7 +68352,8 @@ class ExchangePosition {
68340
68352
  place = false,
68341
68353
  increase = true,
68342
68354
  ratio_to_loose = 0,
68343
- reverse_position
68355
+ reverse_position,
68356
+ increase_ratio
68344
68357
  } = payload;
68345
68358
  const position2 = this.instance;
68346
68359
  console.log(position2);
@@ -68381,6 +68394,7 @@ class ExchangePosition {
68381
68394
  price_places,
68382
68395
  decimal_places,
68383
68396
  increase,
68397
+ increase_ratio,
68384
68398
  place
68385
68399
  });
68386
68400
  }
@@ -61369,7 +61369,18 @@ class AppDatabase {
61369
61369
  return result;
61370
61370
  }
61371
61371
  get positionExpand() {
61372
- return "b_config, account_strategy, p_account, proxy, compound_instance.ref,support,resistance,symbol_config";
61372
+ const fields = [
61373
+ "b_config",
61374
+ "account_strategy",
61375
+ "p_account",
61376
+ "proxy",
61377
+ "compound_instance.ref",
61378
+ "support",
61379
+ "resistance",
61380
+ "symbol_config",
61381
+ "anchor"
61382
+ ];
61383
+ return fields.join(", ");
61373
61384
  }
61374
61385
  async fetchCentralPositions(payload) {
61375
61386
  const { asset: assetName, symbol, customFilter = "" } = payload;
@@ -65446,6 +65457,7 @@ class BaseExchange {
65446
65457
  increase = false,
65447
65458
  price_places,
65448
65459
  decimal_places,
65460
+ increase_ratio = 1,
65449
65461
  place = true
65450
65462
  } = payload;
65451
65463
  const spread = 1.00005;
@@ -65462,12 +65474,12 @@ class BaseExchange {
65462
65474
  is_market: false
65463
65475
  }
65464
65476
  ];
65465
- if (increase) {
65477
+ if (increase && increase_ratio > 0) {
65466
65478
  order.push({
65467
65479
  kind,
65468
65480
  price: purchase_stop,
65469
65481
  side: kind === "long" ? "buy" : "sell",
65470
- quantity,
65482
+ quantity: quantity * increase_ratio,
65471
65483
  is_market: false
65472
65484
  });
65473
65485
  }
@@ -68313,7 +68325,8 @@ class ExchangePosition {
68313
68325
  place = false,
68314
68326
  increase = true,
68315
68327
  ratio_to_loose = 0,
68316
- reverse_position
68328
+ reverse_position,
68329
+ increase_ratio
68317
68330
  } = payload;
68318
68331
  const position2 = this.instance;
68319
68332
  console.log(position2);
@@ -68354,6 +68367,7 @@ class ExchangePosition {
68354
68367
  price_places,
68355
68368
  decimal_places,
68356
68369
  increase,
68370
+ increase_ratio,
68357
68371
  place
68358
68372
  });
68359
68373
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gbozee/ultimate",
3
3
  "type": "module",
4
- "version": "0.0.2-183",
4
+ "version": "0.0.2-185",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",