Skip to content

Edges

Edges are the connections between nodes that define how data flows through your trading strategy. They represent the pathways along which information travels from one component to another.

An edge connects:

  • A source node’s output handle (where data comes from)
  • A target node’s input handle (where data goes to)

When data is produced by the source node, it flows along the edge to the target node’s input.

The node and output handle where data originates:

{
  "node": "ticker_btc",
  "handle": "price"
}

The node and input handle where data is delivered:

{
  "node": "rsi_indicator",
  "handle": "value"
}

The type of data flowing through the edge (must match source output and target input types).

The current state of the edge:

  • Idle: No data flowing
  • Active: Data is flowing
  • Paused: Temporarily stopped
  • Failed: Error in data transmission
  1. Click on a source node’s output handle
  2. Drag to the target node’s input handle
  3. Release to create the edge

GrailHub validates that:

  • Source output type matches target input type
  • No circular dependencies are created
  • Target input isn’t already connected (unless it accepts multiple connections)

When a source node produces output:

  1. Data is sent along all connected edges
  2. Target nodes receive the data on their inputs
  3. Target nodes process the data
  4. The cycle continues

Edges can buffer data if the target node is busy:

  • Default buffer size: 100 items
  • Configurable per edge
  • Prevents data loss during processing

If a target node can’t keep up:

  • The buffer fills up
  • Source node may slow down or pause
  • Prevents memory overflow

Standard edges that carry data between nodes:

[Price Feed] --price--> [RSI Indicator]

Edges that control flow execution:

[Condition] --true--> [Execute Trade]
[Condition] --false--> [Log Event]

Edges that carry event notifications:

[Timer] --tick--> [Fetch Data]

Edges display visual cues:

  • Solid line: Active connection
  • Dashed line: Inactive connection
  • Animated dots: Data flowing
  • Red color: Error state
  • Gray color: Idle state

Edges can display labels showing:

  • Data type
  • Current value
  • Flow rate

Click on an edge to select it and view its properties.

Select an edge and press Delete or click the delete icon.

  1. Click on the edge’s target end
  2. Drag to a new target handle
  3. Release to reconnect

One source connected to multiple targets:

              /--> [Strategy A]
[Price Feed] ---> [Strategy B]
              \--> [Strategy C]

All strategies receive the same price data.

Multiple sources connected to one target:

[Source A] --\
[Source B] ----> [Aggregator]
[Source C] --/

The aggregator combines data from multiple sources.

Sequential processing:

[A] --> [B] --> [C] --> [D]

Data flows through each node in sequence.

Branching based on conditions:

              /-true--> [Action A]
[Condition] --
              \-false-> [Action B]

Different actions based on condition result.

Some edges automatically convert data types:

[Number Output] --auto-convert--> [String Input]

Map complex data structures:

[Object Output] --extract field--> [Specific Input]

Monitor how much data flows through an edge:

  • Messages per second
  • Bytes per second
  • Average message size

Track how long data takes to traverse an edge:

  • Average latency
  • Maximum latency
  • Latency distribution

Monitor edge errors:

  • Type mismatches
  • Buffer overflows
  • Connection failures

Avoid creating overly complex edge patterns. Break into smaller flows if needed.

Label edges to clarify what data they carry.

Watch for buffer overflows indicating performance issues.

Always connect error outputs to error handling nodes.

Circular edges can cause infinite loops and deadlocks.

Test what happens when:

  • No data flows
  • Too much data flows
  • Invalid data is sent

Edges that only activate under certain conditions.

Edges that filter data based on criteria.

Edges that transform data as it flows.

Edges with different priorities for data delivery.

Click on an edge to see:

  • Current data value
  • Data history
  • Flow statistics

Set breakpoints on edges to pause when data flows.

Enable edge logging to track all data flowing through.