feat(): add samples for account endpoints. Breaking change: getFeeRate takes an object

This commit is contained in:
tiagosiebler
2023-06-09 10:33:00 +01:00
parent 1577764392
commit 6dbbecb9a5
15 changed files with 208 additions and 8 deletions

View File

@@ -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);
}
/**