Automated rules

Automated rules trade for you while you're away. You build a rule from blocks, in the form "When something happens, if conditions hold, then do something", for example "When BTC drops 3% within 15 minutes, if I hold a BTC long, cut it by 30%". Whenly's Rules engine runs on Whenly's servers and checks your rules around the clock, also when this tab is closed.

What a rule can do

  • When: price levels and moves, position PnL, daily PnL, liquidation distance, funding, market sessions, a time of day, or a wallet you watch opening or closing a position.
  • If: whether you hold a position, an asset allow or deny list, a limit on how many positions the rule keeps open.
  • Then: open, reduce or close positions, place or cancel orders, set stop-loss and take-profit, add or remove margin, or notify you in the app and on Telegram.

Simulate and Live

A rule in Simulate runs exactly like a live one, but only records what it would have done in Activity. It places no orders. Live places real orders. New rules and templates start in Live; switch a rule to Simulate before saving to try it first. Check now shows what a rule would do with the data at that moment. Neither Simulate nor Check now guarantees what a live rule will do later.

The Rules agent

Live rules trade through their own API wallet, separate from the one Enable trading keeps in your browser. When you click Enable Rules, the Rules engine generates the key, your wallet signs an approval for it, and Hyperliquid lists it as whenlyrules. The key is stored on Whenly's servers, encrypted so that only the Rules engine can use it. It can place and cancel orders and manage margin and leverage. It can't withdraw, or send funds to another address.

Settings in Rules has safety limits the engine applies across all your rules: the size of one position, the total open across all rules, and actions per hour.

Fees

Orders placed by rules carry a builder fee of 0.05% of the filled notional, the maximum you approve once. Orders you place by hand stay at 0.025%. Hyperliquid's own trading fees apply on top. See Fees.

Risks

Rules run unattended, on data that can be late or wrong. A rule can act at a time, size or price you didn't expect, act more than once, or not act at all, including failing to close or protect a position. A rule that follows a wallet copies a trader you don't know. The engine, Whenly's servers, Hyperliquid or Telegram can stop at any time, and you may not be told. Alerts can be late or missing. You are responsible for every order your rules place, and Whenly doesn't compensate losses. Start in Simulate, use small sizes and keep watching your account. Read the Risk Disclosure and section 3A of the Terms.

Turn it off

  • One rule: switch it off in the rule list.
  • All rules: click Pause all.
  • Everything: in Settings, next to Rules agent, click Revoke. This turns every rule off and deletes the agent's key from Whenly's servers.

To remove the agent from Hyperliquid too, open app.hyperliquid.xyz/API and remove whenlyrules. Orders a rule already placed, including stop-loss and take-profit orders, stay on Hyperliquid until they fill or you cancel them.