ores.trading.core
Table of Contents
2. Summary
ores.trading.core is the primary component for trade booking and lifecycle
management in ORE Studio. It implements the domain model for financial trades
and instruments (rates, FX, equity, credit, scripted), the trade status FSM
(see trade lifecycle for its states and transitions) enforced via ores.dq
infrastructure, and a
full persistence layer with temporal versioning and amendment history. Business
logic is exposed as NATS message handlers in the 0x5000–0x5FFF range. The
component also ships synthetic-data generators for test and development use.
3. Inputs
- NATS request messages from peer services and UI clients (create/amend/cancel/ query operations on trades and instruments).
- PostgreSQL connections to
ores_trading_*tables via theores.dqORM infrastructure. - Reference-data lookups via
ores.refdata.core(trade types, activity types, party roles).
4. Outputs
- Trade and instrument records persisted to the
ores_tradingschema with full temporal history. - NATS response messages returned to callers.
- Lifecycle events and activity records for P&L attribution.
5. Entry points
include/ores.trading.core/ores.trading.core.hpp— aggregate include for all public API headers.include/ores.trading.core/messaging/registrar.hpp— registers all NATS handlers with the service host.include/ores.trading.core/service/trade_service.hpp— top-level trade business-logic entry point.
6. Dependencies
ores.trading.api— shared domain types and NATS protocol schemas.ores.dq— FSM infrastructure, ORM base classes, and data-quality checks.ores.iam.core— identity and authorisation context.ores.refdata.core— enumeration reference data (trade types, activity types).rfl— JSON serialisation via reflection.fort— formatted table output.soci— SQL ORM for PostgreSQL persistence.nats.c— NATS messaging client.
7. See also
- ores.trading — component group overview.
- ores.trading.api — protocol types and domain entities.
- ores.trading.service — NATS service entrypoint.
- Trade Status FSM Implementation — how the lifecycle is held in the database.
- Trade Lifecycle — the states, transitions and activity types themselves.
- ores.trading Messaging Reference — full NATS subject and message catalogue.
