Feat: add GET /auth/pool-stats/aggregate endpoint#9
Open
mukama wants to merge 4 commits intotetherto:developfrom
Open
Feat: add GET /auth/pool-stats/aggregate endpoint#9mukama wants to merge 4 commits intotetherto:developfrom
mukama wants to merge 4 commits intotetherto:developfrom
Conversation
Add pool stats aggregate API endpoint that fetches pool stats history and transactions, processes daily stats and revenue, and aggregates by period (daily/weekly/monthly) with optional pool filtering.
Align pool stats aggregate endpoint with API v2 spec which does not include snapshotCount in the response.
…regate tail-log returns empty for type=minerpool. Switch to ext-data with transactions key which has daily revenue and hashrate data. Also fix changed_balance handling (values are BTC, not satoshis).
tekwani
reviewed
Feb 14, 2026
|
|
||
| for (const tx of txs) { | ||
| if (!tx) continue | ||
| if (poolFilter && tx.username !== poolFilter) continue |
Contributor
There was a problem hiding this comment.
pool name filter needs to be used in the rpc worker type, tx username is the account id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /auth/pool-stats/aggregateendpoint with aggregated pool stats (balance, hashrate, workerCount, revenueBTC)rangeparam for aggregation period (daily/weekly/monthly)poolparam for filtering to a specific poolExample Queries
Daily (default):
Weekly:
Monthly:
Filtered to a specific pool:
Combined — weekly, specific pool: