Add /api/v1/mining/blocks/fee-rates/{interval} API

This commit is contained in:
nymkappa
2022-04-14 15:37:03 +09:00
parent 056b1db8b3
commit 0ba34594a2
4 changed files with 63 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ class Mining {
}
/**
* Get historical block reward and total fee
* Get historical block total fee
*/
public async $getHistoricalBlockFees(interval: string | null = null): Promise<any> {
return await BlocksRepository.$getHistoricalBlockFees(
@@ -34,6 +34,16 @@ class Mining {
);
}
/**
* Get historical block fee rates percentiles
*/
public async $getHistoricalBlockFeeRates(interval: string | null = null): Promise<any> {
return await BlocksRepository.$getHistoricalBlockFeeRates(
this.getTimeRange(interval),
Common.getSqlInterval(interval)
);
}
/**
* Generate high level overview of the pool ranks and general stats
*/