Expand description
This module provides structures for defining data sources and routing operations that transform source data before it is processed. It enables the flexible combination and transformation of data from various sources.
The module provides:
- The
Operationenum which defines basic arithmetic operations - The
OperationRoutestruct which pairs operations with dependent signals - The
SourceQuerystruct which specifies where to obtain input data
§Source Routing
Sources can be configured with routes that apply transformations using values from other signals. This enables complex relationships between signals, such as:
- Converting between different units (e.g., USDT to USD)
- Adjusting values using scaling factors
- Applying corrections based on other market data
Routing operations are applied sequentially, with each operation using the result of the previous operation as its first operand.
Structs§
- Operation
Route - A transformation that applies an operation using a value from another signal.
- Source
Query - A specification for retrieving and transforming data from a source.
Enums§
- Operation
- Arithmetic operations that can be applied in routing transformations.