spin docs
Strategies

The workflow editor

Edit a strategy as connected blocks or as JSON, add and remove blocks, and fix the problems the engine finds.

The strategy editor is on the Strategy tab of your Spinner. It has two tabs:

  • Workflow shows the strategy as connected blocks, in the order the bot runs them.
  • JSON shows the same strategy as text, in the Strategy box.

Both tabs edit the same strategy. A change in one tab shows in the other. The engine checks the strategy as you type, with the same checks that Spin's servers run when you save.

The blocks

The blocks come from the strategy itself. You do not drag or connect them by hand. The main column shows the entry, from top to bottom:

BlockWhat it is
WhenThe trigger. Read triggers.
Buy only ifThe first condition, checked at once. A strategy that launches tokens shows Launch only if.
WaitShown only when the strategy waits before its next check.
AI: <step name>One block for each AI step, up to 3. Read AI steps.
Then buy ifThe condition on the AI's answers. With a wait and no AI steps, it is After the wait, buy if. A launching strategy shows Then launch if or After the wait, launch if.
BuyHow much ETH the bot buys, and of which token. A launching strategy shows Launch instead. Read buying.

Beside the main column, you see:

  • Limits, at the top. Read limits.
  • One Sell: <exit name> block for each sell rule, connected to the Buy block. Read exits.
  • Never sells, when the strategy has no sell rules. The bot then only buys and holds.

Each block shows its settings in one or two lines, for example "token.buyers(60) at least 30 and token.creator_sold is no".

A strategy that launches tokens has no sell blocks. A launch is not a position: the bot does not sell the tokens it launches.

Open a block

Select the block

Click or tap the block. A dialog opens with the block's settings.

Change the settings

Change the fields. The workflow and the JSON change as you type.

Close the dialog

Select Done.

Some blocks have a Remove button in their dialog: Wait, each Sell rule, and each AI step. The other blocks always stay, because every strategy has them. A launching strategy always keeps at least one AI step, because an AI step writes each launch.

When you remove the wait, the check after it goes too, unless the strategy has AI steps. When you remove the last AI step, its check goes too, unless the strategy has a wait.

Add a block with "+"

A "+" button shows wherever a block can go. Select it to see what it can add. When you choose an item, the editor adds the block and opens it.

Where the "+" isWhat it offers
On the link after Buy only if, when there is no waitWait: "Then check again, e.g. to see if a launch draws a crowd."
On the link after the wait, or after Buy only if when there is no waitAI step: "Ask your AI model (with data tools). Later blocks can use its answer."
On the link after each AI stepAI step, to add the next step there
Under the sell rules (Add an exit)Sell rule: "Sell when a rule holds: a profit, a loss, a time." AI sell check: "Ask your AI model whether to sell each position."

The AI step item shows only while the strategy has fewer than 3 AI steps. A new wait starts at 60 seconds. A new sell rule starts as "position.multiple at least 2".

AI steps and AI sell checks need an Epic Spinner, except for the AI step that writes a token launch. Read the tier a strategy needs.

Problems on blocks

When the engine finds a problem, the block it is about gets a red border and a note, for example "2 to fix". Open the block to read the problems at the top of its dialog.

The editor also lists every problem under the strategy. A problem that is about the strategy as a whole shows only there. You cannot save the strategy until it has no problems.

The editor also warns you when an AI step cannot run for you today: when you have no AI key, no key for the step's provider, or not the MCP server that the step reads. These are warnings, not problems. You can still save.

Conditions that only JSON can show

The condition fields in the workflow show rows that must all hold. A condition that uses more than that (or, a not around more than one value, or arithmetic) shows this note: "This condition uses more than the form shows (or, not, arithmetic). It is kept as it is: edit it in the JSON tab." The block shows "A rule only the JSON tab shows". Read conditions.

When the JSON does not parse

If the text in the JSON tab is not valid JSON, or not a strategy object, the Workflow tab cannot show it. It says: "The JSON is not a strategy the workflow can show yet (it does not parse). Fix it in the JSON tab."

Narrow screens

The workflow uses its full width. On a screen narrower than two columns of blocks, it uses one column: Limits at the top, then the entry, then the sell rules under Buy, set in a little. The canvas does not pan or zoom. The page scrolls over it, as over any part of the page.

Start from a preset

Use Start from a preset above the tabs to replace the strategy in the editor with a preset. Nothing is saved until you select Save as new version. Read presets.

You can also describe a strategy in words and let your own AI model write it. Read build with AI.

Save

Give the strategy a name in Strategy name, then select Save as new version. Read versions.

On this page