-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
backendBackend / Rust core workBackend / Rust core work
Description
Overview
Add a GET /api/fees/account/:address endpoint that queries Horizon for all transactions belonging to a Stellar account address, aggregates the fee data, and returns a summary plus a timeline of fees paid.
Horizon Source
Horizon endpoint: GET https://horizon-testnet.stellar.org/accounts/:address/transactions
Supports pagination via cursor, limit, and order query params.
Key field per transaction: fee_charged
Response Shape
{
"address": "GABC...",
"summary": {
"total_fees_paid": 4200,
"transaction_count": 38,
"avg_fee": 110,
"max_fee": 500,
"min_fee": 100
},
"transactions": [
{
"hash": "abc123...",
"fee_charged": 150,
"ledger": 1234567,
"created_at": "2026-03-21T10:00:00Z"
}
]
}Acceptance Criteria
-
GET /api/fees/account/:addressreturns the above response shape - Fetches up to the last 50 transactions from Horizon (configurable via
?limitquery param, max 200) - Aggregates summary stats: total fees, count, avg, max, min
- Returns
404with a clear error message if the account address is not found on Horizon - Returns
400if the address format is clearly invalid - Transactions returned in reverse chronological order (newest first)
- Unit tests for the aggregation logic
- CORS headers consistent with existing endpoints
Notes
- Related frontend issue:
[Phase 2] feat(ui): dashboard — account fee history page - Pagination beyond 50 can be a future enhancement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendBackend / Rust core workBackend / Rust core work