v0.4.0-beta · exchange infrastructure to build on

Configuration

Every knob you'll realistically touch, per component, with its default. Everything ships with working local defaults; you only set what you change.

How configuration works

Java components read an environment variable first, then fall back to a system property (OMS_HTTP_PORT beats -Doms.http.port). Secrets additionally accept a *_FILE variant that reads the value from a file, so nothing sensitive has to sit in the environment. The full exhaustive reference (including constants you'll rarely touch) lives in the match repo: docs/CONFIGURATION.md.

OMS (the API your apps call)

SettingDefaultWhat it does
OMS_HTTP_PORT8080REST API and Prometheus /metrics
OMS_GRPC_PORT9090gRPC API
OMS_AUTH_MODEapi-keyapi-key (secure default: no keys configured means every request is rejected), jwt, or dev (accepts everything; local only)
OMS_API_KEYS / _FILEemptyAPI keys for api-key mode
OMS_JWT_SECRET / _FILEemptyHS256 secret for jwt mode
OMS_POSTGRES_URLjdbc:postgresql://localhost:5432/omsThe ledger database
OMS_POSTGRES_PASSWORD / _FILEnoneNo default. Without valid credentials the OMS runs in-memory only, on purpose (see quick start for schema setup)
OMS_REDIS_HOST / _PORTlocalhost / 6379Balance cache; falls back to in-memory if unreachable
OMS_CORS_ORIGINSemptyCORS allowlist for browsers calling the REST API
OMS_AUDIT_LOGoms-audit.logAudit log path (off disables)
OMS_CLUSTER_INGRESSlocalhost:9000Where the matching cluster listens

Cluster node (match)

SettingDefaultWhat it does
CLUSTER_NODE0This member's node id (0, 1, 2)
CLUSTER_ADDRESSESlocalhostComma-separated member addresses
CLUSTER_PORT_BASE9000Base port; node N uses base + 100 × N upward
BASE_DIR<cwd>/node<N>Cluster data directory (log, archive, mark files)
METRICS_PORT9500 + node idPrometheus metrics for that node
MATCH_ENGINE_IMPLarrayMatching engine: array (default) or direct (older fallback)
-Dmatch.engine.book.capacity131072Resting orders per side; hitting it is a loud BOOK_FULL reject, never silent loss

Transport / media driver

Aeron moves the bytes. Two profiles matter: dev (shared threads, polite on a laptop) and prod (busy-spin, burns cores, lowest latency).

SettingDefaultWhat it does
TRANSPORT_DRIVER_MODEembeddedembedded (driver inside the JVM, simplest) or external (standalone driver process; the production mode)
TRANSPORT_IDLE_MODEbusy_spinbusy_spin for lowest latency, backoff for dev machines and CI
TRANSPORT_TERM_LENGTH16mAeron term buffer; smaller (1m) for constrained boxes
ENGINE_DRIVER_PROFILEdev(Read by the admin gateway) dev or prod driver tuning for the nodes it launches

Admin gateway

SettingDefaultWhat it does
MATCH_PROJECT_DIRauto (sibling layout)Where the match checkout lives. Set explicitly if your layout differs from the quick start's
OMS_PROJECT_DIRsibling order-management/Where the oms checkout lives
ADMIN_PORT8082Operations API port
ADMIN_BIND127.0.0.1Bind address. Refuses to bind beyond loopback unless a token is set
ADMIN_AUTH_TOKEN / _FILEemptyBearer token for the ops API; empty means loopback-only dev mode
ADMIN_LOG_FORMATjsonStructured json or human text logs

Trading UI

These are baked in at build time (npm run build), not read at runtime:

SettingDefaultWhat it does
VITE_ORDER_API_URLsame originOMS REST base URL
VITE_MARKET_WS_URLsame originMarket-data WebSocket base URL
VITE_ADMIN_API_URLsame originAdmin API base URL
VITE_AUTH_TOKENdev:1Bearer token; the default only works against OMS_AUTH_MODE=dev

Cross-repo gotchas

  • Two egress ports by design: the market gateway consumes cluster egress on 9091, the OMS on 9093. Two consumers can't share one port.
  • Set CLUSTER_ADDRESSES explicitly in any real deployment; the defaults differ slightly between components and only line up on localhost.
  • Socket buffers are not optional: net.core.rmem_max/wmem_max = 16 MB (see the quick start), or replay channels stall and elections hang.
  • Engine tunables are the exception to env-first: match.engine.impl and match.engine.book.capacity prefer the system property.
When in doubt
The defaults are the configuration we run in development every day. Change one thing at a time, and check /api/admin/status after each change.
Open Exchange

The open-source core to launch your own exchange. Fast, fault-tolerant, built in public.

v0.4.0-beta

Apache 2.0 · Beta software: the public API is frozen, but it has not had an external security audit yet and should not hold production money until it does. Open Exchange is the infrastructure you build an exchange on; KYC/AML, custody, fiat, identity, and compliance are the integrator’s responsibility.