Skip to main content

Order Management and Matcher

Pricing + observability runtime extended with order management, matcher flow, and order-specific telemetry.

  • Generated from: system/architecture.model.json
  • Canonical flows: system/end-to-end-flows.md

Architecture Diagram​

Diagram source
flowchart LR
  developer["Developer"]
  app_runtime["TraderX App Runtime"]
  obs_runtime["Observability Runtime"]
  ingress["NGINX Ingress"]
  trade_ui["Angular Trade UI"]
  order_api["Order Management API"]
  order_matcher["Order Matcher"]
  nats["NATS Broker"]
  trade_processor["Trade Processor"]
  prometheus["Prometheus"]
  blackbox["Blackbox Exporter"]
  loki["Loki"]
  grafana["Grafana"]
  developer -->|"Uses app and admin UI"| ingress
  ingress -->|"Serves UI"| trade_ui
  trade_ui -->|"Calls order APIs"| order_api
  order_api -->|"Submits and updates orders"| order_matcher
  order_api -->|"Publishes lifecycle events"| nats
  order_matcher -->|"Publishes fills and status"| nats
  nats -->|"Delivers matcher-generated fills"| trade_processor
  prometheus -->|"Scrapes /metrics"| order_matcher
  prometheus -->|"Scrapes probe metrics"| blackbox
  blackbox -->|"HTTP probes"| order_api
  blackbox -->|"HTTP probes"| order_matcher
  order_matcher -->|"Structured logs via promtail"| loki
  developer -->|"Views order observability"| grafana
  grafana -->|"Queries metrics"| prometheus
  grafana -->|"Queries logs"| loki

Node Catalog​

NodeKindLabelNotes
developeractorDeveloperLocal developer using this state.
app_runtimeboundaryTraderX App RuntimeState 009 pricing/runtime baseline with order-management extensions.
obs_runtimeboundaryObservability RuntimeLGTM + OTel stack from state 007 carried forward with order telemetry coverage.
ingressserviceNGINX IngressRoutes UI, API, and order admin traffic.
trade_uiserviceAngular Trade UITrade ticket, blotters, and admin tab.
order_apiserviceOrder Management APIOrder create/query/edit/cancel/force-fill endpoints.
order_matcherserviceOrder MatcherMatches open orders and emits order lifecycle + fill events.
natsserviceNATS BrokerRealtime transport for pricing, trade, position, and order subjects.
trade_processorserviceTrade ProcessorConsumes fills and persists trades/positions.
prometheusservicePrometheusScrapes order metrics and blackbox probes.
blackboxserviceBlackbox ExporterProbes order endpoints and inherited runtime endpoints.
lokiserviceLokiAggregates order and runtime logs.
grafanaserviceGrafanaDashboards for queue depth, open orders, events, and matcher latency.