spin docs
Strategies

Limits

Every limit a strategy has, with its range and its default.

Limits apply over the whole strategy. Most of them are in the Limits block, at the top of the workflow. A few are in the blocks they belong to. A limit you leave out takes its default.

These limits are the strategy's own. The live trading limits (the most ETH a trade and a day) are a separate thing: you set them on chain, on the Wallet tab. Read live trading.

The Limits block

FieldJSONRangeDefaultWhat it does
Open positions at mostlimits.max_open1 to 1005The most positions the bot has at the same time.
New entries an hour at mostlimits.max_entries_per_hour1 to 1000No limitThe most entries the bot starts in an hour. Empty: no limit.
Exit slippagelimits.exit_slippage_pct1 to 9025A sell reverts if it would get this much less ETH (in percent) than the market state suggests.
AI runs an hour at mostlimits.max_ai_runs_per_hour1 to 100020The most AI chains the bot runs in an hour, for entries and exits together.
Once per tokenlimits.once_per_tokenon or offonThe bot never buys the same token twice.
Launches a day at mostlimits.max_launches_per_day1 to 101A launching strategy launches at most this many tokens in a day.
(JSON only)limits.add_to_positiontrue or falsefalseA buy of a token the bot holds adds to its open position there, instead of opening another.

A launching strategy shows only Launches a day at most and AI runs an hour at most in the Limits block.

How the bot counts

  • Open positions at most counts open positions, and also entries that are still waiting, asking the AI, or buying.
  • New entries an hour at most and AI runs an hour at most count over the last hour.
  • Launches a day at most counts over the last 24 hours.
  • An entry starts when its check passes Buy only if and the limits.
  • When a limit stops an entry, the bot skips it, with a reason such as "max_open reached".

Once per token

With Once per token on, the bot enters each token at most once. This is the default, and it suits launch and trade strategies. A token counts as entered once its check passes Buy only if and the limits, even if a later check stops the buy.

When the strategy buys a chosen token, every buy buys the same token. Once per token must then be off, and the editor turns it off. When the token comes from an AI step's answer, Once per token stays on by default, so each token the AI names is bought once.

Add to position

With add_to_position on, a buy of a token that the bot already holds adds to that position. The position's entry price becomes the average of its buys. The DCA presets use this, with max_open at 1, so all their buys build one position.

Limits in other blocks

FieldBlockJSONRangeDefault
SlippageBuyentry.max_slippage_pct0.1 to 5010
BuyBuyentry.buy_ethmore than 0, at most 100 ETHnone: you set it
WaitWaitentry.wait_s0 to 3600 seconds0 (no wait)
Answer withinan AI stepentry.ai.timeout_s5 to 120 seconds60
Ask at most everyan AI sell checkexits[n].ai.every_s60 to 86400 seconds900
Answer withinan AI sell checkexits[n].ai.timeout_s5 to 120 seconds60
Dev buyLaunchentry.launch.dev_buy_eth0 to 10 ETH0

Answer within is for all the steps of a chain together. An answer that comes later gives no signal, so the bot does not buy or sell on it.

Limits of the strategy's shape

  • A strategy has up to 3 AI steps in its entry, and up to 3 in each AI sell check.
  • A strategy has up to 10 exits.
  • A copy wallets trigger follows up to 1,000 wallets.
  • A timer runs every 60 seconds at the shortest, and every 7 days at the longest.
  • A strategy's name is 1 to 80 characters. An exit's name is 1 to 40 characters.
  • A rule's window is at most 3600 seconds.

On this page