v3.2.1: add another UM response type.

This commit is contained in:
tiagosiebler
2022-11-15 16:19:32 +00:00
parent c46645713e
commit 226952d5d2
5 changed files with 95 additions and 7 deletions

View File

@@ -26,7 +26,9 @@ import {
InternalTransferRequest,
UMExchangeCoinsRequest,
UMBorrowHistoryRequest,
UMInstrumentInfoResult,
UMPaginatedResult,
UMHistoricOrder,
UMInstrumentInfo,
} from './types';
import { REST_CLIENT_TYPE_ENUM } from './util';
import BaseRestClient from './util/BaseRestClient';
@@ -79,7 +81,7 @@ export class UnifiedMarginClient extends BaseRestClient {
/** Get trading rules per symbol/contract, incl price/amount/value/leverage filters */
getInstrumentInfo(
params: UMInstrumentInfoRequest
): Promise<APIResponseV3<UMInstrumentInfoResult>> {
): Promise<APIResponseV3<UMPaginatedResult<UMInstrumentInfo>>> {
return this.get('/derivatives/v3/public/instruments-info', params);
}
@@ -168,7 +170,7 @@ export class UnifiedMarginClient extends BaseRestClient {
/** Query order history. As order creation/cancellation is asynchronous, the data returned from the interface may be delayed. To access order information in real-time, call getActiveOrders() */
getHistoricOrders(
params: UMHistoricOrdersRequest
): Promise<APIResponseV3<any>> {
): Promise<APIResponseV3<UMPaginatedResult<UMHistoricOrder>>> {
return this.getPrivate('/unified/v3/private/order/list', params);
}