ores.refdata.client

Table of Contents

1. Diagram

ores.refdata.client component diagram

Figure 1: ores.refdata.client

2. Summary

ores.refdata.client is a header-only library of consumer-side helpers for reference data. It hosts the convention-aware FX rate formatter used by every rate-display surface, and the currency_pair_convention_cache: an in-process, per-tenant cache of currency-pair conventions loaded over NATS and reloaded on changed events. Its registrar wires the warm-up and the changed-event subscription at service startup. Consumers are the market-data client and the removed market-data plugins. A load carries a Bearer token when the producer checks authorisation; pass an ores.iam.client-style token provider in that case.

3. Inputs

  • Domain types from ores.refdata.api: currency_pair_convention.
  • NATS protocol messages from ores.refdata.api: the read_currency_pair_conventions_for_cache request/response pair and the currency_pair_convention_changed_event.

4. Outputs

  • C++ headers with the rate formatter, the tenant cache, and the cache registrar.

5. Entry points

  • service/cache/currency_pair_convention_cache.hpp — load() and lookup() per tenant.
  • service/cache/currency_pair_convention_cache_registrar.hpp — warm_and_subscribe_currency_pair_convention_cache().
  • presentation/currency_pair_rate_formatter.hpp — format_rate().

6. Dependencies

  • ores.refdata.api — the domain and protocol types.
  • ores.eventing — the changed-event types and the partitioned_cache primitive.
  • ores.nats — the service client and subscription type.
  • ores.logging — logger setup.
  • Optionally, an ores.iam.client token provider for authenticated loads.

7. See also

Emacs 29.3 (Org mode 9.6.15)