Skip to main content

TrexWallet.Markets

TrexWallet.Markets is a separate service that aggregates spot quotes from configured external exchanges and exposes them over HTTP (for example GET /markets/v1/get_rates). TrexWallet consumes that API using MarketsBaseUrl in its own configuration.

This page documents the MarketsAdmin Razor operator UI and high-level behavior described in platform sources (ADMIN-PAGES-ARCHITECTURE.md, TREXWALLET-EXCHANGE.md). It is not a substitute for the full internal architecture write-up.

Admin UI (/MarketsAdmin/)​

PageRouteSummary
Index/MarketsAdminDashboard — exchange/grabber health, pair counts, stale indicators, Priority column
Rates/MarketsAdmin/RatesAggregated quotes; auto-refresh (~10s) with pause/resume; pair grouping toggle; spread highlighting
ExchangeBalances/MarketsAdmin/ExchangeBalancesExchange account balances (where API keys are configured)
ExchangeOrders/MarketsAdmin/ExchangeOrdersOpen orders on connected exchanges
OrderBook/MarketsAdmin/OrderBookOrder book view (Kraken-oriented in platform docs)
Config/MarketsAdmin/ConfigEnable/disable exchanges and pairs, Priority editing, load pairs from exchange APIs, JSON config; mutating handlers require scope trex.market.config

Rate priority: MarketConfig.Priority (lower number = higher preference) controls ordering inside the aggregated get_rates payload so TrexWallet’s FirstOrDefault pair selection prefers the intended exchange. Operators adjust Priority in Config and see it on Index.

Dashboard (/MarketsAdmin)​

Use the dashboard when you need a quick operator view of:

  • configured exchanges and whether they are enabled;
  • grabber freshness / stale state;
  • pair counts and current Priority ordering.

This is the right landing page for “is the markets service alive and which exchange currently wins by priority?”.

Rates (/MarketsAdmin/Rates)​

Use Rates for the live quote table:

  • aggregated quotes from enabled grabbers;
  • operator filters by exchange and pair;
  • stale/fresh filtering;
  • auto-refresh and optional grouping by pair;
  • drill-down to OrderBook where the UI exposes a direct link.

This page is the closest operator-facing view to the GET /markets/v1/get_rates snapshot.

API (public to TrexWallet)​

EndpointMethodRole
/markets/v1/get_ratesGETFull snapshot of rate quotes from active grabbers
/markets/v1/get_available_pairsGETAvailable symbols per exchange (used when loading pairs in admin)
  • TrexWallet — wallet module that consumes Markets rates
  • Platform sources: Documentation/PlatformTeam/TrexWallet/TREXWALLET-EXCHANGE.md, RATES-SYSTEM.md