How to Set a Maximum Order Size for Your AI Trading Agent
Learn practical steps to choose a safe maximum order size for an AI trading agent, balancing risk, capital allocation, and operational limits.
Produced with automation, then checked by deterministic quality rules and an independent source-grounded review before publication.
- 01The owner defines a hard ceiling on each order to prevent oversized exposure.
- 02Order‑size limits should reflect both capital allocation and realistic market depth.
- 03Agent keys can enforce size caps without giving withdrawal authority.
- 04Regular reconciliation helps confirm that size limits were respected.
- 05Unexpected execution outcomes require a fallback process, not just a limit.
An owner should set a maximum order size that reflects the amount of capital they are willing to risk on any single trade and the liquidity available in the target market. The limit is enforced through an owner‑signed policy attached to the agent key, and it applies before the agent can sign a trade‑scoped transaction. This approach keeps the agent’s exposure bounded while preserving the owner’s ultimate control over withdrawals.
What factors should influence the maximum order size?
Capital allocation, market depth, and the agent’s strategy volatility are the three primary inputs. Capital allocation determines how much of the total portfolio the owner is comfortable exposing to the agent. Market depth indicates how large a trade can be executed without causing excessive slippage. Strategy volatility reflects how often the agent may generate large signals that could exceed a modest size limit.
- The proportion of total equity you are willing to allocate to the agent (e.g., 10‑20%).
- The average daily volume of the instruments the agent trades, to gauge realistic fill sizes.
- The historical variance of the agent’s signal size, which helps anticipate occasional spikes.
How can an owner technically enforce a size cap?
Owner‑signed limits are attached to the agent key at creation. These limits can include maximum order notional, daily notional caps, and expiry timestamps. Because the agent key cannot withdraw funds, the cap only affects order creation, not fund movement. The enforcement is performed by the runtime that validates each signed order against the stored policy before broadcasting it to the market.
- 01Generate an agent key with a scoped policy that includes a maximum order size field.
- 02Sign the policy with the owner key; the runtime will reject any order that exceeds the field.
- 03Test the policy in a read‑only backtest environment to confirm the cap behaves as expected.
- 04Deploy the agent key to live trading only after the owner reviews the backtest results.
What are the downsides of relying solely on a maximum order size?
A size cap does not eliminate all risk. Large market moves can still wipe out the allocated capital even with small orders, and the cap does not protect against execution errors, latency, or data quality issues. Moreover, if the cap is set too low, the agent may be unable to act on genuine opportunities, reducing its effectiveness.
- The cap cannot prevent cumulative loss across many small trades.
- Execution failures may leave orders pending, requiring manual reconciliation.
- Overly restrictive caps can cause the agent to miss profitable signals.
How should an owner monitor and adjust the limit over time?
Continuous monitoring of realized trade sizes, slippage, and daily loss metrics is essential. If the agent consistently trades well below the cap, the owner may consider raising it to improve performance. Conversely, if the agent approaches the cap frequently or generates unexpected large losses, the owner should lower the limit and review the strategy.
- 01Review daily trade logs and compare actual order sizes to the configured maximum.
- 02Track daily notional and loss metrics against any additional owner‑signed limits.
- 03Update the agent key policy through a new signed transaction when adjustments are needed.
Where can I learn more about safe AI agent controls?
The following resources provide deeper guidance on related safety mechanisms and operational best practices:
- Owner Authority vs Agent Authority: Understanding the Core Differences
- How to run an AI trading agent with real‑money controls
- Why Positions Must Be Reconciled After Every Agent Order
Frequently asked questions
Yes. The policy language allows separate fields for order size and daily loss, so you can enforce each independently.
The runtime rejects the order before it is signed or sent to the market, and an explicit error state is returned to the agent.
No. Limits only bound the notional of a single order; extreme price moves can still cause loss on any filled trade.
Regularly-at least after each significant change in capital allocation, market liquidity, or observed agent behavior.
The limit applies uniformly to any order the agent attempts to place, regardless of asset class, as long as the policy is attached to the agent key.
Sources and verification
Product claims in this article were checked against these first-party references. Runtime status remains authoritative for current availability.
- Felix documentationfirst party
- Felix machine referencefirst party
Build with Felix now.
Felix infrastructure is live through MCP and the API. The full trading app launches September 17.
Repeated execution errors can signal deeper problems. This guide explains when to pause an AI trading agent, how to use owner‑authorized limits, and what operational safeguards to apply.
The bid‑ask spread is a key market signal that tells a trading agent about liquidity, price efficiency, and execution risk. This article explains its meaning, practical uses, and the uncertainties involved.