The strategy builder is a visual canvas for creating automated prediction market strategies. You arrange conditions and actions into a graph, then Miramarket converts that graph into strategy JSON.Documentation Index
Fetch the complete documentation index at: https://docs.miramarket.org/llms.txt
Use this file to discover all available pages before exploring further.
Strategy graph
A strategy graph has two node types:| Node type | Purpose |
|---|---|
CONDITION | Watches a signal and decides which action or actions can run. |
ACTION | Moves capital, places a trade, holds a position, or exits to a wallet or vault. |
Root node
Every strategy has exactly one root node. The root may be a condition or an action. If the root is a condition, the strategy waits for that condition and then selects actions in its decision group. If the root is an action, the strategy immediately allocates capital to that action. The action may then lead to child conditions.Levels
Levels describe graph depth.- The root node is at
level: 0. - A condition and the actions it selects stay on the same level.
- Level only increases when an action leads to a child condition.
Decision groups
A decision group contains one condition and one or more actions at the same level. Use a decision group when a condition should select capital movement.| Mode | Meaning |
|---|---|
SINGLE | The condition selects one action. |
SPLIT_100 | The condition selects multiple actions, and their allocation_pct values must sum to 100. |
Canvas workflow
You typically build in this order:- Add a market, wallet, vault, or hold action.
- Add a condition when you need decision logic.
- Connect the condition to one or more actions.
- Set allocations for split groups.
- Add child conditions after actions when the strategy should continue.
- Validate the strategy.
- Export strategy JSON.
Agent guidance
When generating strategy JSON, preserve these rules:- Use
CONDITIONonly for decision logic. - Use
ACTIONonly for capital movement or trade execution. - Put every condition in exactly one decision group.
- Use edges only for action-to-condition continuation.
- Encode condition-to-action selection through
decision_groups, notedges.