Message: StrategyNodeDefinition

File: WebAPI/strategy_definition_2.proto

Description

Child node definition within the parent strategy tree. Can be either a resolved contract (leg) or a nested strategy.

Used in

StrategyDefinition

Fields

node_operation

Type: uint32

Description: Specified node operation, one of NodeOperation enums, the default is SUM.

leg

Type: LegDefinition

Description: Leg definition, if the node is a resolved contract.

nested_strategy

Type: NestedStrategy

Description: Nested strategy, mutually exclusive with ‘leg’ attribute.

Enum NodeOperation

Description: Operation on a node of the synthetic strategy. Associating an operation with a node allows using different operations, e.g., multiplication and subtraction, without introducing intermediate StrategyDefinition entities. MUL and DIV cannot be mixed with SUM within the same StrategyDefinition.node_definition array. i.e. node1 / node2 * node3 is allowed, but node1 / node2 + node3 is not.

Values

      NODE_OPERATION_SUM = 1

     Add the quantity and the price.

      NODE_OPERATION_MUL = 2

     Add the quantity but multiply the price.

      NODE_OPERATION_DIV = 3

     Subtract the quantity but divide the price.