Module source

Module source 

Source
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 Operation enum which defines basic arithmetic operations
  • The OperationRoute struct which pairs operations with dependent signals
  • The SourceQuery struct 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§

OperationRoute
A transformation that applies an operation using a value from another signal.
SourceQuery
A specification for retrieving and transforming data from a source.

Enums§

Operation
Arithmetic operations that can be applied in routing transformations.