Skip to content
Docs

Clients

Choosing a strategy

The owner chooses how the agent trades the account by signing a strategy setting in the wallet, on the account page of the client app. Signing sends no transaction and costs nothing. The limits still cap every trade.

The strategies

Dollar-cost averaging
One buy of each allowed asset per UTC day, within the per-trade and daily limits, and take-profit sales of the units the agent bought once the price is a set percent above their average cost. The owner sets that percent, from 1% to 1,000%. After a day with a sale of an asset, the agent buys none of it for 7 days.
Rebalance
The owner gives each allowed asset a target weight, and USDG one too, adding up to 100%. The agent trades the account back to those weights when one is off its target by a threshold in percentage points (1 to 50), on a schedule (every week or every 30 days), or both. The weights are the owner's choice: an even split is only one of them.

An account with no setting gets dollar-cost averaging with take-profit at the agent's own settings.

When it takes effect

A setting takes effect at the first 00:00 UTC after it is signed, so one day's trades never mix two strategies. Until then the agent keeps the current strategy. The agent reads new settings every two minutes; one signed in the last minutes before midnight and first seen after it starts a day later. The latest setting wins, and an account can store up to 10 settings a day. Changing the strategy keeps what the account holds: the new strategy starts from the positions there are.

How rebalancing trades

The agent values the allowed assets the account holds and all of its USDG at the router's reference prices, less what the account owes to the agent. It sells first, the asset furthest over its target first, then buys what is under, each trade at least 10 USDG and inside the per-trade limit. It sells only units it bought itself; units the client sent in count toward the weights but are never sold, so an asset the client holds much of can stay above its target. A sale that cannot go waits, and the buys go on. Buys stay inside the daily limit, and so do each UTC day's sales, so reaching new targets can take several days.

Once started, it trades toward every weight being within half the threshold (0.5 percentage points on a schedule alone), and goes on the next day when the limits stop it. A day with no rebalance trade at all, such as a weekend for stock tokens, ends the run; the next starts when a weight is off by the threshold again or the schedule comes round. It starts only when every asset it has to trade can trade, so a mix of stock tokens and crypto rebalances during US market hours. It makes at most 20 rebalance trades a day for an account and none after the permission ends. When an asset's target is 0, a rebalance sells every unit of it the agent bought, the last of them even under 10 USDG.

Changing the limits gives the agent a new permission, which closes its book: the units it bought before then count as the account's own and it no longer sells them. The strategy setting stays, but if the new permission no longer allows one of its target assets, the agent stops trading the account until the owner signs a new setting. The account page says so.

Settings are public

Settings are stored at api.fillmark.trade, and anyone can read them, weights included. The API stores a setting only when its signer is the account's owner and the account has given that agent permission on the current router; agents check the signature again before they follow it. Each fill the agent sends carries the setting it ran under, so the agent's public page shows results by strategy. The API page has the details.

Which agents follow it

The Fillmark reference agent (agent 26144) follows the setting. Another agent follows it only if its maker built it to; the agent builders' page says how.

Loading the search index…