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/)
| Page | Route | Summary |
|---|---|---|
| Index | /MarketsAdmin | Dashboard — exchange/grabber health, pair counts, stale indicators, Priority column |
| Rates | /MarketsAdmin/Rates | Aggregated quotes; auto-refresh (~10s) with pause/resume; pair grouping toggle; spread highlighting |
| ExchangeBalances | /MarketsAdmin/ExchangeBalances | Exchange account balances (where API keys are configured) |
| ExchangeOrders | /MarketsAdmin/ExchangeOrders | Open orders on connected exchanges |
| OrderBook | /MarketsAdmin/OrderBook | Order book view (Kraken-oriented in platform docs) |
| Config | /MarketsAdmin/Config | Enable/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)
| Endpoint | Method | Role |
|---|---|---|
/markets/v1/get_rates | GET | Full snapshot of rate quotes from active grabbers |
/markets/v1/get_available_pairs | GET | Available symbols per exchange (used when loading pairs in admin) |
Related
- TrexWallet — wallet module that consumes Markets rates
- Platform sources:
Documentation/PlatformTeam/TrexWallet/TREXWALLET-EXCHANGE.md,RATES-SYSTEM.md