Updated types with params type FuturesHistoricPositions
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
|||||||
FuturesMarketTrade,
|
FuturesMarketTrade,
|
||||||
FuturesPlanType,
|
FuturesPlanType,
|
||||||
FuturesKlineInterval,
|
FuturesKlineInterval,
|
||||||
|
FuturesHistoricPositions,
|
||||||
} from './types';
|
} from './types';
|
||||||
import { REST_CLIENT_TYPE_ENUM } from './util';
|
import { REST_CLIENT_TYPE_ENUM } from './util';
|
||||||
import BaseRestClient from './util/BaseRestClient';
|
import BaseRestClient from './util/BaseRestClient';
|
||||||
@@ -316,23 +317,11 @@ export class FuturesClient extends BaseRestClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get All historic positions, only supports Query within 3 monthso */
|
/** Get All historic positions, only supports Query within 3 months */
|
||||||
getHistoryPositions(
|
getHistoryPositions(
|
||||||
startTime: string,
|
params: FuturesHistoricPositions,
|
||||||
endTime: string,
|
|
||||||
productType?: FuturesProductType,
|
|
||||||
symbol?: string,
|
|
||||||
pageSize?: number,
|
|
||||||
lastEndId?: string,
|
|
||||||
): Promise<APIResponse<FuturesPosition[]>> {
|
): Promise<APIResponse<FuturesPosition[]>> {
|
||||||
return this.getPrivate('/api/mix/v1/position/history-position', {
|
return this.getPrivate('/api/mix/v1/position/history-position', params);
|
||||||
startTime,
|
|
||||||
endTime,
|
|
||||||
productType,
|
|
||||||
symbol,
|
|
||||||
pageSize,
|
|
||||||
lastEndId,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get Account Bill */
|
/** Get Account Bill */
|
||||||
|
|||||||
@@ -88,6 +88,15 @@ export interface NewBatchFuturesOrder {
|
|||||||
clientOid?: string;
|
clientOid?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface FuturesHistoricPositions {
|
||||||
|
startTime: string;
|
||||||
|
endTime: string;
|
||||||
|
productType?: FuturesProductType;
|
||||||
|
symbol?: string;
|
||||||
|
pageSize?: number;
|
||||||
|
lastEndId?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface FuturesPagination {
|
export interface FuturesPagination {
|
||||||
startTime?: string;
|
startTime?: string;
|
||||||
endTime?: string;
|
endTime?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user