feat: enhance precision synchronization in trading strategies and improve order quantity normalization logic

This commit is contained in:
discountry
2025-10-27 18:42:44 +08:00
parent 295c6a47b7
commit 5bba8169b5
8 changed files with 325 additions and 14 deletions
+9
View File
@@ -27,6 +27,14 @@ export interface KlineListener {
(klines: AsterKline[]): void;
}
export interface ExchangePrecision {
priceTick: number;
qtyStep: number;
priceDecimals?: number;
sizeDecimals?: number;
marketId?: number;
}
export interface ExchangeAdapter {
readonly id: string;
supportsTrailingStops(): boolean;
@@ -39,4 +47,5 @@ export interface ExchangeAdapter {
cancelOrder(params: { symbol: string; orderId: number | string }): Promise<void>;
cancelOrders(params: { symbol: string; orderIdList: Array<number | string> }): Promise<void>;
cancelAllOrders(params: { symbol: string }): Promise<void>;
getPrecision?(): Promise<ExchangePrecision | null>;
}