diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index f6ccab7..57e2e2e 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -812,7 +812,7 @@ export class RestClientV5 extends BaseRestClient { category: 'option' | 'linear', orders: BatchOrderParamsV5[], ): Promise< - APIResponseV3< + APIResponseV3WithTime< { list: BatchCreateOrderResultV5[]; }, @@ -837,7 +837,7 @@ export class RestClientV5 extends BaseRestClient { category: 'option' | 'linear', orders: BatchAmendOrderParamsV5[], ): Promise< - APIResponseV3< + APIResponseV3WithTime< { list: BatchAmendOrderResultV5[]; }, @@ -862,7 +862,7 @@ export class RestClientV5 extends BaseRestClient { category: 'option' | 'linear', orders: BatchCancelOrderParamsV5[], ): Promise< - APIResponseV3< + APIResponseV3WithTime< { list: BatchCancelOrderResultV5[]; }, diff --git a/src/types/shared.ts b/src/types/shared.ts index 2c50c99..8ac9445 100644 --- a/src/types/shared.ts +++ b/src/types/shared.ts @@ -49,7 +49,7 @@ export interface APIRateLimit { resetAtTimestamp: number; } -export interface APIResponseV3 { +export interface APIResponseV3 { retCode: number; retMsg: 'OK' | string; result: TResult; @@ -64,7 +64,10 @@ export interface APIResponseV3 { rateLimitApi?: APIRateLimit; } -export type APIResponseV3WithTime = APIResponseV3 & { time: number }; +export type APIResponseV3WithTime = APIResponseV3< + TResult, + TExtInfo +> & { time: number }; /** * Request Parameter Types */