ores.trading.trade_type

Table of Contents

Reference data table defining valid trade type classifications used to categorise trades in the system.

1. Flags

2. Columns

2.1. code

Unique trade type code.

Examples: 'Swap', 'FxForward', 'CapFloor', 'Swaption'.

std::string(faker::word::noun()) + "_trade"

2.2. description

Detailed description of the trade type.

std::string(faker::lorem::sentence())

2.3. product_type

Product type family this trade type belongs to (swap, fx, bond, credit, equity, commodity, composite, scripted).

Drives instrument tab routing in the UI and the structural extension table the instrument is stored in.

ores::trading::domain::product_type::swap

2.4. has_options

True when this trade type requires the family's options sub-form.

Used by FX and Equity families to reveal an additional options panel.

false

2.5. has_extension

True when this trade type requires the family's extension sub-form.

Used by Swap, Bond, Credit, Equity, and Commodity families to reveal additional extension fields.

false

3. SQL

3.1. Flags

3.2. Extra drops

drop function if exists ores_trading_validate_trade_type_fn;

4. Validation function

5. C++

5.1. Flags

5.2. Repository

5.3. Domain includes

#include "ores.trading.api/domain/product_type.hpp"
#include <chrono>
#include <string>

5.4. Entity includes

#include "ores.trading.api/domain/product_type.hpp"
#include <string>

5.5. Table display

column header
code Code
description Description
product_type Product
has_options Has Options
has_extension Has Extension
modified_by Modified By
version Version

5.6. Presentation

5.6.1. Detail fields

field label widget type is_key is_required placeholder
code Code codeEdit line_edit true true Enter trade type code
description Description descriptionEdit text_edit     Enter a description
has_options Has Options hasOptionsCheckBox check_box      
has_extension Has Extension hasExtensionCheckBox check_box      

5.6.2. Columns

enum_name field header type width
Code code Code string 120
Description description Description string 300
HasOptions has_options Has Options boolean 100
HasExtension has_extension Has Extension boolean 120
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

5.7. Conventions

5.8. Custom repository methods

6. See also

Emacs 29.3 (Org mode 9.6.15)