@galacticcouncil/sdk-next 0.26.0 → 0.27.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.
@@ -26,6 +26,7 @@ export declare class TradeScheduler {
26
26
  * execution.
27
27
  *
28
28
  * @param asset - assetIn id
29
+ * @param decimals - assetIn decimals
29
30
  * @returns minimum order budget
30
31
  */
31
32
  getMinimumOrderBudget(asset: number, decimals: number): Promise<bigint>;
@@ -37,9 +38,11 @@ export declare class TradeScheduler {
37
38
  *
38
39
  * @param amountIn - entering / given budget
39
40
  * @param amountInMin - minimal budget to schedule an order
41
+ * @param duration - order duration in ms
42
+ *
40
43
  * @returns maximum number of trades to execute the order
41
44
  */
42
- private getMaximumTradeCount;
45
+ protected getMaximumTradeCount(amountIn: bigint, amountInMin: bigint, duration: number): number;
43
46
  /**
44
47
  * Calculate optimal number of trades for order execution.
45
48
  *
@@ -49,7 +52,7 @@ export declare class TradeScheduler {
49
52
  * @param priceImpact - price impact of swap execution (single trade)
50
53
  * @returns optimal number of trades to execute the order
51
54
  */
52
- private getOptimalTradeCount;
55
+ protected getOptimalTradeCount(priceImpact: number): number;
53
56
  /**
54
57
  * Build a TWAP (Time-Weighted Average Price) sell order
55
58
  *
@@ -1,7 +1,8 @@
1
1
  export declare const DEFAULT_BLOCK_TIME = 6000;
2
2
  export declare const DEFAULT_MIN_BUDGET = 1000000000000000n;
3
- export declare const TWAP_BLOCK_PERIOD = 6;
3
+ export declare const TWAP_EXECUTION_INTERVAL = 6;
4
4
  export declare const TWAP_MAX_PRICE_IMPACT = -5;
5
5
  export declare const TWAP_MAX_DURATION: number;
6
6
  export declare const TWAP_TX_MULTIPLIER = 3;
7
+ export declare const DCA_TIME_RESERVE = 0.1;
7
8
  export declare const ORDER_MIN_BLOCK_PERIOD = 6;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacticcouncil/sdk-next",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Galactic next gen sdk (papi)",
5
5
  "author": "GalacticCouncil",
6
6
  "repository": {