Summary
getBalances currently returns raw per-asset balances from Horizon; the dashboard and balance command both benefit from an aggregated view with USD-equivalent values.
Description
Build a pricing service that fetches/caches USD reference prices for held assets (e.g. via a Stellar DEX-based reference or an external price feed — pick one deliberately and document the tradeoff, since price-feed reliability affects displayed balances, not fund safety).
Cache prices with a short TTL in Redis to avoid hammering the price source on every balance command.
Extend the balance command reply and the future dashboard balances endpoint to show USD-equivalent totals alongside per-asset amounts.
Handle price-unavailable gracefully (show the asset balance without a USD figure rather than failing the whole response).
Deliverables
- Pricing service with caching
balance command and balances endpoint showing USD-equivalent values
- Graceful degradation when pricing is unavailable
Dependencies
Summary
getBalancescurrently returns raw per-asset balances from Horizon; the dashboard andbalancecommand both benefit from an aggregated view with USD-equivalent values.Description
Build a pricing service that fetches/caches USD reference prices for held assets (e.g. via a Stellar DEX-based reference or an external price feed — pick one deliberately and document the tradeoff, since price-feed reliability affects displayed balances, not fund safety).
Cache prices with a short TTL in Redis to avoid hammering the price source on every
balancecommand.Extend the
balancecommand reply and the future dashboard balances endpoint to show USD-equivalent totals alongside per-asset amounts.Handle price-unavailable gracefully (show the asset balance without a USD figure rather than failing the whole response).
Deliverables
balancecommand and balances endpoint showing USD-equivalent valuesDependencies