Skip to content

Implement multi-asset balance aggregation and USD pricing #55

Description

@chillwur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: architectureCore system architecturearea: backendapps/backend (Fastify, WhatsApp webhook, Stellar services)level: advancedCore architecture, senior/experienced-engineer scopetype: featureNew capability

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions