Feat: add GET /auth/pools/:pool/balance-history endpoint#8
Closed
mukama wants to merge 5 commits intotetherto:developfrom
Closed
Feat: add GET /auth/pools/:pool/balance-history endpoint#8mukama wants to merge 5 commits intotetherto:developfrom
mukama wants to merge 5 commits intotetherto:developfrom
Conversation
Add pool balance history API endpoint that fetches pool balance snapshots via tailLog RPC, groups them into time buckets (1D/1W/1M), and returns time-series data with balance and revenue per bucket.
…entries Align pool balance-history endpoint with API v2 spec which requires balance, hashrate, and revenue time-series data.
tail-log returns empty for type=minerpool. Switch to ext-data with transactions key which provides daily revenue (changed_balance) and hashrate (mining_extra.hash_rate). Also treat 'all' pool param as no filter.
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.
Pool name filter should be handled by the RPC worker, not filtered client-side. The tx username is the account id.
Contributor
Author
|
Moved to #11 |
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/pools/:pool/balance-historyendpoint with balance, hashrate, and revenue time-seriesrangeparam for bucket size (1D/1W/1M)Example Queries
All pools, daily buckets (default):
Specific pool, daily:
Weekly buckets:
Monthly buckets: