# Conditional branch node

<div data-with-frame="true"><figure><img src="/files/4SBlgRutga9Ez8xz341D" alt="" width="257"><figcaption><p>Condition branch node </p></figcaption></figure></div>

The conditional branch node routes your strategy flow based on a boolean condition, allowing you to create different paths for different scenarios.

### How It Works

A conditional branch node takes a boolean input (true or false) and routes your tokens or data flow along one of two paths:

* **True Path** - When the condition is true, tokens flow along this path
* **False Path** - When the condition is false, tokens flow along this path

***

### Using Conditional Branches

Connect a boolean value (from a compare node, logical gate, or signal) to the branch node's input. Then connect your desired actions to the true and false output paths. For example:

* If APY is above 10%, deposit to Protocol A (true path)
* Otherwise, deposit to Protocol B (false path)

Conditional branches are essential for creating adaptive strategies. You can chain multiple branches together to create complex decision trees, routing your capital to the most optimal opportunities.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stazys.gitbook.io/stazys-docs/yield-studio/drag-and-drop-nodes/conditional-branch-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
