Skip to content
Snippets Groups Projects
Commit ee45eeee authored by Dima Rifai's avatar Dima Rifai
Browse files

Issue #479 - Add geAccountAggregatedtBalanceHistory function

parent 0b7dac81
No related branches found
No related tags found
1 merge request!587Delrifai/#479 use aggregated balance api
......@@ -447,6 +447,26 @@ class FetchingService {
"to-block": toBlock,
});
}
async geAccountAggregatedtBalanceHistory(
accountName: string,
coinType: string,
granularity : "daily"|"monthly"|"yearly",
direction: "asc" | "desc",
fromBlock?: Date | number | undefined,
toBlock?: Date | number | undefined
): Promise<Hive.AccountAggregatedBalanceHistoryResponse> {
return await this.extendedHiveChain!.restApi["balance-api"].aggregatedHistory({
accountName,
"coin-type": coinType,
"granularity":granularity,
direction: direction,
"from-block": fromBlock,
"to-block": toBlock,
});
}
}
const fetchingService = new FetchingService();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment