ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Attributes | List of all members
trade Struct Referencefinal

Trade capturing FpML Trade Header properties. More...

#include <trade.hpp>

Collaboration diagram for trade:
Collaboration graph

Public Attributes

int version = 0
 Version number for optimistic locking and change tracking.
 
utility::uuid::tenant_id tenant_id = utility::uuid::tenant_id::system()
 Tenant identifier for multi-tenancy isolation.
 
boost::uuids::uuid id
 UUID uniquely identifying this trade.
 
boost::uuids::uuid party_id
 Party that owns this trade.
 
std::string external_id
 Optional external trade identifier.
 
boost::uuids::uuid book_id
 Book that owns this trade.
 
boost::uuids::uuid portfolio_id
 Portfolio this trade belongs to.
 
std::optional< boost::uuids::uuid > successor_trade_id
 UUID of the trade that replaced this one (e.g., after novation).
 
std::optional< boost::uuids::uuid > counterparty_id
 Counterparty for this trade.
 
std::string trade_type
 ORE instrument type code (e.g. Swap, FxForward, CapFloor).
 
std::string netting_set_id
 Netting set identifier for ORE aggregation.
 
std::string activity_type_code
 Activity type code classifying this trade event.
 
boost::uuids::uuid status_id
 Current FSM state for this trade (e.g. new, live, expired, cancelled).
 
std::string trade_date
 Date the trade was agreed.
 
std::string execution_timestamp
 Timestamp when the trade was executed (with timezone).
 
std::string effective_date
 Date from which the trade is effective.
 
std::string termination_date
 Date on which the trade matures or terminates.
 
std::string modified_by
 Username of the person who last modified this trade.
 
std::string performed_by
 Username of the account that performed this action.
 
std::string change_reason_code
 Code identifying the reason for the change.
 
std::string change_commentary
 Free-text commentary explaining the change.
 
std::chrono::system_clock::time_point recorded_at
 Timestamp when this version of the record was recorded.
 

Detailed Description

Trade capturing FpML Trade Header properties.

Temporal trade record. Each lifecycle event (New, Amendment, Novation, etc.) creates a new temporal row for the same trade id. The internal party is derived from book_id via books.party_id.

Member Data Documentation

◆ id

boost::uuids::uuid id

UUID uniquely identifying this trade.

Surrogate key for the trade record.

◆ party_id

boost::uuids::uuid party_id

Party that owns this trade.

Denormalised from book_id by the DB trigger. Enforced by RLS.

◆ external_id

std::string external_id

Optional external trade identifier.

e.g., UTI prefix or legacy system ID.

◆ book_id

boost::uuids::uuid book_id

Book that owns this trade.

Soft FK to ores_refdata_books_tbl.

◆ portfolio_id

boost::uuids::uuid portfolio_id

Portfolio this trade belongs to.

Soft FK to ores_refdata_portfolios_tbl.

◆ successor_trade_id

std::optional<boost::uuids::uuid> successor_trade_id

UUID of the trade that replaced this one (e.g., after novation).

Self-referencing soft FK. Absent for active trades.

◆ counterparty_id

std::optional<boost::uuids::uuid> counterparty_id

Counterparty for this trade.

Soft FK to ores_refdata_counterparties_tbl. Optional: some trades may not have a counterparty (e.g., internal transfers).

◆ trade_type

std::string trade_type

ORE instrument type code (e.g. Swap, FxForward, CapFloor).

Soft FK to ores_trading_trade_types_tbl.

◆ netting_set_id

std::string netting_set_id

Netting set identifier for ORE aggregation.

Groups trades under the same netting agreement.

◆ activity_type_code

std::string activity_type_code

Activity type code classifying this trade event.

Soft FK to ores_trading_activity_types_tbl.

◆ status_id

boost::uuids::uuid status_id

Current FSM state for this trade (e.g. new, live, expired, cancelled).

Soft FK to ores_dq_fsm_states_tbl.

◆ trade_date

std::string trade_date

Date the trade was agreed.

ISO 8601 date: YYYY-MM-DD.

◆ execution_timestamp

std::string execution_timestamp

Timestamp when the trade was executed (with timezone).

ISO 8601 timestamp: YYYY-MM-DD HH:MM:SS+TZ.

◆ effective_date

std::string effective_date

Date from which the trade is effective.

ISO 8601 date: YYYY-MM-DD.

◆ termination_date

std::string termination_date

Date on which the trade matures or terminates.

ISO 8601 date: YYYY-MM-DD.

◆ change_reason_code

std::string change_reason_code

Code identifying the reason for the change.

References change_reasons table (soft FK).