@galacticcouncil/sdk-next 0.15.0 → 0.16.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.
|
@@ -16,11 +16,11 @@ export declare class TradeScheduler {
|
|
|
16
16
|
* @param assetIn - storage key of assetIn
|
|
17
17
|
* @param assetOut - storage key of assetOut
|
|
18
18
|
* @param amountInTotal - order budget
|
|
19
|
-
* @param duration - order duration in ms
|
|
20
19
|
* @param frequency - order frequency in ms (opts)
|
|
20
|
+
* @param noOfTrades - number of orders
|
|
21
21
|
* @returns - dca trade order
|
|
22
22
|
*/
|
|
23
|
-
getDcaOrder(assetIn: number, assetOut: number, amountInTotal: string,
|
|
23
|
+
getDcaOrder(assetIn: number, assetOut: number, amountInTotal: string, frequency: number, noOfTrades?: number): Promise<TradeDcaOrder>;
|
|
24
24
|
/**
|
|
25
25
|
* Calculate minimum order budget (amountIn) required for order
|
|
26
26
|
* execution.
|
|
@@ -30,16 +30,16 @@ export declare class TradeScheduler {
|
|
|
30
30
|
*/
|
|
31
31
|
getMinimumOrderBudget(asset: number): Promise<bigint>;
|
|
32
32
|
/**
|
|
33
|
-
* Calculate
|
|
33
|
+
* Calculate maximum number of trades for dca order execution.
|
|
34
34
|
*
|
|
35
35
|
* Single trade execution amount must be at least 20% of
|
|
36
36
|
* minimum order budget.
|
|
37
37
|
*
|
|
38
38
|
* @param amountIn - entering / given budget
|
|
39
39
|
* @param amountInMin - minimal budget to schedule an order
|
|
40
|
-
* @returns
|
|
40
|
+
* @returns maximum number of trades to execute the order
|
|
41
41
|
*/
|
|
42
|
-
private
|
|
42
|
+
private getMaximumTradeCount;
|
|
43
43
|
/**
|
|
44
44
|
* Calculate optimal number of trades for order execution.
|
|
45
45
|
*
|
|
@@ -64,7 +64,6 @@ export declare enum TradeOrderError {
|
|
|
64
64
|
OrderImpactTooBig = "OrderImpactTooBig"
|
|
65
65
|
}
|
|
66
66
|
export interface TradeDcaOrder extends TradeOrder {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
frequencyOpt: number;
|
|
67
|
+
maxTradeCount: number;
|
|
68
|
+
optTradeCount: number;
|
|
70
69
|
}
|