Save block predictions results in db and show results in a chart

This commit is contained in:
nymkappa
2022-07-06 22:27:45 +02:00
parent ec2d079da4
commit d2ab72390f
21 changed files with 576 additions and 224 deletions

View File

@@ -221,6 +221,13 @@ export class ApiService {
);
}
getHistoricalBlockPrediction$(interval: string | undefined) : Observable<any> {
return this.httpClient.get<any[]>(
this.apiBaseUrl + this.apiBasePath + `/api/v1/mining/blocks/predictions` +
(interval !== undefined ? `/${interval}` : ''), { observe: 'response' }
);
}
getRewardStats$(blockCount: number = 144): Observable<RewardStats> {
return this.httpClient.get<RewardStats>(this.apiBaseUrl + this.apiBasePath + `/api/v1/mining/reward-stats/${blockCount}`);
}