ores.risk Protocol Reference
Table of Contents
- Messages Overview
- Message Details
Protocol messages for the Risk subsystem (0x1000-0x1FFF).
See Protocol Reference for the complete protocol documentation.
Messages Overview
| ID | Name | Description |
|---|---|---|
| 0x1001 | get_currencies_request | Request to retrieve currencies with pagination sup… |
| 0x1002 | get_currencies_response | Response containing currencies with pagination met… |
| 0x1003 | save_currency_request | Request to save a currency (create or update). Du… |
| 0x1004 | save_currency_response | Response confirming currency save operation. |
| 0x1005 | delete_currency_request | Request to delete one or more currencies. Support… |
| 0x1006 | delete_currency_response | Response confirming currency deletion(s). Contain… |
| 0x1007 | get_currency_history_request | Request to retrieve version history for a currency… |
| 0x1008 | get_currency_history_response | Response containing currency version history. |
Message Details
get_currencies_request (0x1001)
Request to retrieve currencies with pagination support. Supports pagination through offset and limit parameters.
Fields
| Field | Type | Description |
|---|---|---|
| offset | std::uint32_t |
Number of records to skip (0-based) |
| limit | std::uint32_t |
Maximum number of records to return |
Wire Format
- 4 bytes: offset (uint32_t)
- 4 bytes: limit (uint32_t)
get_currencies_response (0x1002)
Response containing currencies with pagination metadata.
Fields
| Field | Type | Description |
|---|---|---|
| currencies | std::vector<domain::currency> |
|
| total_available_count | std::uint32_t |
Total number of currencies available (not just in this page) |
Wire Format
- 4 bytes: total_available_count (uint32_t)
- 4 bytes: count (number of currencies in this response)
- For each currency:
- 2 bytes: iso_code length
- N bytes: iso_code (UTF-8)
- 2 bytes: name length
- N bytes: name (UTF-8)
- 2 bytes: numeric_code length
- N bytes: numeric_code (UTF-8)
- 2 bytes: symbol length
- N bytes: symbol (UTF-8)
- 2 bytes: fraction_symbol length
- N bytes: fraction_symbol (UTF-8)
- 4 bytes: fractions_per_unit (int)
- 2 bytes: rounding_type length
- N bytes: rounding_type (UTF-8)
- 4 bytes: rounding_precision (int)
- 2 bytes: format length
- N bytes: format (UTF-8)
- 2 bytes: currency_type length
- N bytes: currency_type (UTF-8)
- 2 bytes: modified_by length
- N bytes: modified_by (UTF-8)
- 2 bytes: valid_from length
- N bytes: valid_from (UTF-8)
- 2 bytes: valid_to length
- N bytes: valid_to (UTF-8)
save_currency_request (0x1003)
Request to save a currency (create or update). Due to bitemporal storage, both create and update operations result in writing a new record. Database triggers handle temporal versioning automatically.
Fields
| Field | Type | Description |
|---|---|---|
| currency | domain::currency |
save_currency_response (0x1004)
Response confirming currency save operation.
Fields
| Field | Type | Description |
|---|---|---|
| success | bool |
|
| message | std::string |
delete_currency_request (0x1005)
Request to delete one or more currencies. Supports batch deletion by accepting a vector of ISO codes. Each currency is processed independently - partial success is possible.
Fields
| Field | Type | Description |
|---|---|---|
| iso_codes | std::vector<std::string> |
Wire Format
- 4 bytes: count (number of ISO codes)
- For each ISO code:
- 2 bytes: length
- N bytes: iso_code (UTF-8)
delete_currency_response (0x1006)
Response confirming currency deletion(s). Contains one result per requested currency, indicating individual success or failure. Supports partial success in batch operations.
Fields
| Field | Type | Description |
|---|---|---|
| results | std::vector<delete_currency_result> |
Wire Format
- 4 bytes: count (number of results)
- For each result:
- 2 bytes: iso_code length
- N bytes: iso_code (UTF-8)
- 1 byte: success (0 or 1)
- 2 bytes: message length
- N bytes: message (UTF-8)
get_currency_history_request (0x1007)
Request to retrieve version history for a currency.
Fields
| Field | Type | Description |
|---|---|---|
| iso_code | std::string |
get_currency_history_response (0x1008)
Response containing currency version history.
Fields
| Field | Type | Description |
|---|---|---|
| success | bool |
|
| message | std::string |
|
| history | domain::currency_version_history |