feat(): update return type for batch endpoints
This commit is contained in:
@@ -812,7 +812,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
category: 'option' | 'linear',
|
category: 'option' | 'linear',
|
||||||
orders: BatchOrderParamsV5[],
|
orders: BatchOrderParamsV5[],
|
||||||
): Promise<
|
): Promise<
|
||||||
APIResponseV3<
|
APIResponseV3WithTime<
|
||||||
{
|
{
|
||||||
list: BatchCreateOrderResultV5[];
|
list: BatchCreateOrderResultV5[];
|
||||||
},
|
},
|
||||||
@@ -837,7 +837,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
category: 'option' | 'linear',
|
category: 'option' | 'linear',
|
||||||
orders: BatchAmendOrderParamsV5[],
|
orders: BatchAmendOrderParamsV5[],
|
||||||
): Promise<
|
): Promise<
|
||||||
APIResponseV3<
|
APIResponseV3WithTime<
|
||||||
{
|
{
|
||||||
list: BatchAmendOrderResultV5[];
|
list: BatchAmendOrderResultV5[];
|
||||||
},
|
},
|
||||||
@@ -862,7 +862,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
category: 'option' | 'linear',
|
category: 'option' | 'linear',
|
||||||
orders: BatchCancelOrderParamsV5[],
|
orders: BatchCancelOrderParamsV5[],
|
||||||
): Promise<
|
): Promise<
|
||||||
APIResponseV3<
|
APIResponseV3WithTime<
|
||||||
{
|
{
|
||||||
list: BatchCancelOrderResultV5[];
|
list: BatchCancelOrderResultV5[];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export interface APIRateLimit {
|
|||||||
resetAtTimestamp: number;
|
resetAtTimestamp: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface APIResponseV3<TResult, TExtInfo = object> {
|
export interface APIResponseV3<TResult, TExtInfo = {}> {
|
||||||
retCode: number;
|
retCode: number;
|
||||||
retMsg: 'OK' | string;
|
retMsg: 'OK' | string;
|
||||||
result: TResult;
|
result: TResult;
|
||||||
@@ -64,7 +64,10 @@ export interface APIResponseV3<TResult, TExtInfo = object> {
|
|||||||
rateLimitApi?: APIRateLimit;
|
rateLimitApi?: APIRateLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type APIResponseV3WithTime<T> = APIResponseV3<T> & { time: number };
|
export type APIResponseV3WithTime<TResult, TExtInfo = {}> = APIResponseV3<
|
||||||
|
TResult,
|
||||||
|
TExtInfo
|
||||||
|
> & { time: number };
|
||||||
/**
|
/**
|
||||||
* Request Parameter Types
|
* Request Parameter Types
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user