What to say
Name the token, the rule and how much. These all work as requests.- “Buy $10 of cbBTC whenever its RSI drops below 30. Use $40 from my wallet, at most once a week.”
- “Every Monday at 09:00 UTC, swap 1,000 USDC for WETH, 10 times.”
- “Put a stop loss on my WETH at $2,800.”
- “Buy cbBTC when funding turns cheap, but only while I hold none.”
- “Take 10 USDC from my wallet and buy cbBTC now.”
- The money. Is the budget the amount you meant, and does it come from the right place?
- The rule. Does the condition say what you meant?
- The limits. Is there a cap on how often it acts and how much each run may move?
The lines of a card
A card with no
WHEN, EVERY or HOLD runs once, when you press Start.
Examples
Buy on an oversold signal
rsi measure is a small script the agent writes for you. If the RSI is below 30, it swaps 4 USDC for cbBTC. It buys at most once a week, at most 10 times, and never more than $4 in one run. A firing that the budget cannot cover is skipped, never traded in part. Fees and gas count against the budget.
Buy, then sell on the opposite signal
this strategy holds cbBTC reads what this card holds, never the rest of your wallet. A card tests a level and a position, not a crossing.
A set day of the week
A fixed schedule
EVERY week means the calendar week, which starts Monday 00:00 UTC. EVERY 7 days rolls from the moment you start the card, and its first run comes one period later. Write EVERY 7 days, starting now for a first run at the start. A run missed while the service was down fires once on recovery, never twice.
Do something once, now
A stop that rests as an order
IMMEDIATELY WHEN places a resting order that acts between bars. A card that says WHEN looks only at closed bars.
A card on data
A card reads any data feed through a measure. This measure reads the daily median funding rate across four venues.Rules of thumb the checker enforces
- Name one token one way. cbBTC on Base, WBTC on Ethereum and Arbitrum, WETH for ether, USDC for dollars.
- Put every cap on the one
LIMITSline, joined by·. A line that starts withstopis refused. - Guard a rule that could be true on every bar. Use
this strategy holds no cbBTCor a frequency, or the card is refused. - Money you set aside is the
BUDGET. “Use $40” isBUDGET 40 USDC. The size of each trade is the amount inDO. - A swap accepts at most 1.5% below market. The same bound holds for an order’s band. A wider one is refused when you save, approve, start or place the card. The 1.5% leaves room for the router’s fee and price drift inside a 2% band. A token outside our list for the card’s network is refused too.
- Units must match. A health factor is a plain number, a price is dollars and a probability is a percentage.
- The clock cannot be coarser than the measure. A weekly rule is checked daily, with a once-a-week limit.
What it cannot write yet
- A window under an hour, such as “if it falls 3% in five minutes”. Measures run on 1-hour, 4-hour, daily or weekly bars. The nearest card is an hourly one, or a resting order.
- A card that only sells cannot be backtested, because every backtest starts in USDC. Write the entry rule too.
- Waiting inside a card, with
THEN WAIT UNTIL. The checker reads it, but a card that uses it is refused today.
Under the hood
This part is for readers who want the mechanism. The measure language is a subset of Pine v6. A measure starts with//@version=6, declares one indicator, states one unit and ends in plot. The units are probability, fraction, percent, price, usd, flag and count. The subset has no request.security, no strategy.entry, no future lookback and no drawing. The data checks prove that a bar uses only that bar and earlier ones, and that the same bars give the same numbers.
The agent reuses a measure you already have instead of writing a new one, because the same measure over the same data is stored once.