feat(): add samples for account endpoints. Breaking change: getFeeRate takes an object
This commit is contained in:
@@ -57,6 +57,7 @@ import {
|
||||
GetDeliveryRecordParamsV5,
|
||||
GetDepositRecordParamsV5,
|
||||
GetExecutionListParamsV5,
|
||||
GetFeeRateParamsV5,
|
||||
GetFundingRateHistoryParamsV5,
|
||||
GetHistoricalVolatilityParamsV5,
|
||||
GetIndexPriceKlineParamsV5,
|
||||
@@ -767,16 +768,13 @@ export class RestClientV5 extends BaseRestClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the trading fee rate of derivatives.
|
||||
* Covers: USDT perpetual / Inverse perpetual / Inverse futures
|
||||
* Get the trading fee rate.
|
||||
* Covers: Spot / USDT perpetual / Inverse perpetual / Inverse futures / Options
|
||||
*/
|
||||
getFeeRate(
|
||||
symbol?: string,
|
||||
): Promise<APIResponseV3WithTime<{ list: FeeRateV5[] }>> {
|
||||
return this.getPrivate(
|
||||
'/v5/account/fee-rate',
|
||||
symbol ? { symbol } : undefined,
|
||||
);
|
||||
params: GetFeeRateParamsV5,
|
||||
): Promise<APIResponseV3WithTime<CategoryCursorListV5<FeeRateV5[]>>> {
|
||||
return this.getPrivate('/v5/account/fee-rate', params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,12 @@ export interface GetBorrowHistoryParamsV5 {
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface GetFeeRateParamsV5 {
|
||||
category: CategoryV5;
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
}
|
||||
|
||||
export interface GetTransactionLogParamsV5 {
|
||||
accountType?: AccountTypeV5;
|
||||
category?: CategoryV5;
|
||||
|
||||
@@ -78,6 +78,7 @@ export interface CoinGreeksV5 {
|
||||
|
||||
export interface FeeRateV5 {
|
||||
symbol: string;
|
||||
baseCoin: string;
|
||||
takerFeeRate: string;
|
||||
makerFeeRate: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user