How algorithmic traders can start with self-custody and hard limits
Algorithmic traders can keep full custody of funds while letting AI agents trade by enforcing hard limits that the agent cannot override or remove.
- 01Self-custody means your funds remain in a wallet you control, while the agent trades through scoped keys that cannot withdraw or remove limits.
- 02Hard limits are enforced by the infrastructure, not by the agent, so budget caps, position limits, and kill switches remain effective even if the agent behaves unexpectedly.
- 03You should configure budget caps, position limits, exit plans, and a panic switch before authorizing any live trading key.
- 04Paper trading lets you test strategy logic and limit enforcement without risking capital, and live trading requires explicit owner authorization.
- 05Trading can lose money, including the full amount you authorize, so start with a small budget and treat the agent as a tool that operates within bounds, not a guarantee of protection against market losses.
Algorithmic traders can deploy automated strategies across multiple asset classes while keeping full custody of their funds by using infrastructure that enforces hard limits the agent cannot override. The owner controls the underlying wallet, approves every withdrawal address, and sets budget caps, position limits, and kill switches that the agent is technically incapable of removing. This model lets the agent trade stocks, crypto, perps, options, and prediction markets through a single API without ever taking custody of the capital.
What is self-custody when an algorithmic agent trades?
In traditional algorithmic setups, granting an API key often means giving broad control over an account. The non-custodial model reverses this. Your funds sit in a wallet that you control, and the agent receives a scoped key that can only place orders within boundaries you define. The agent can spend money on trades, but it can never withdraw funds to itself or to any address you have not pre-approved. This is not a policy promise enforced by a venue or broker. It is a structural constraint baked into the key permissions and the wallet architecture.
One key and one API connect the agent to five market types: stocks, crypto, perpetual futures, options, and prediction markets. The normalization layer converts your instructions into venue-specific contract math, but the authorization layer remains uniform. Whether the agent is buying shares through a stock broker or opening a perp position, the same custody rules apply. The wallet owner is the only party who can move funds out, and that movement requires an explicit, owner-approved destination.
This distinction matters because it removes a major class of counterparty risk. The agent does not hold your assets, and the infrastructure provider does not hold your assets. You do. If the agent malfunctions, the worst-case scenario is bounded by the trading limits you set, not by the total balance of your account.
Algorithmic traders in particular need this structure because their systems run continuously. You cannot manually approve every order at three in the morning, so you need automated controls that are stronger than a prompt. The scoped key is the automated control. It enforces your intent while you sleep.
How do hard limits work in practice?
Hard limits are constraints enforced by the infrastructure, not by the agent's willingness to obey. A budget cap is a hard limit on the total US dollars the agent can deploy. A position limit is a hard cap on the size of any individual trade or open position. A kill switch is a hard circuit breaker that flattens positions and revokes the key. These limits live below the agent layer, so even if the agent generates a flawed instruction, the order is rejected before it reaches the market.
This is different from soft limits written into a prompt. Prompt-based instructions are useful for steering behavior, but they can be misinterpreted, bypassed, or simply ignored if the model drifts. Hard limits are closer to firewall rules. They do not depend on the agent understanding your intent. They depend on the API refusing to execute anything that violates the numeric bounds you configured.
Budget caps can be set per day, per week, or per total exposure. Position limits can be expressed in absolute US dollars or as a percentage of the remaining budget. Kill switches can be manual or triggered by automated monitors. The exact configuration depends on your strategy and risk tolerance, but the principle is always the same: the agent proposes, the API disposes.
Complementary safety layers work best. You should design prompts that keep the agent inside soft boundaries, and you should configure hard limits that catch errors the prompt cannot prevent. Good prompt design hard limits reduce the frequency of rejected orders, while hard limits ensure a rejected order does not blow through your capital. Similarly, guardrails for a trading agent describe how to think about both layers together.
What controls should you configure before authorizing live trading?
Before you authorize a key for live trading, you should configure a complete control stack. The exact order of setup matters less than confirming that every layer is active before capital is at risk.
- ·Budget cap: the maximum US dollars the agent is allowed to have deployed at any time. This is the total exposure ceiling.
- ·Position limit: the maximum notional size of a single order or position. This prevents one oversized trade from consuming the entire budget.
- ·Exit plan: automated take-profit and stop-loss levels that execute independently of the agent's next decision. This closes trades even if the agent hangs or loops.
- ·Approved withdrawal addresses: a whitelist of destinations for your funds. The agent cannot add addresses to this list.
- ·Panic switch: a manual or conditional trigger that flattens all positions and revokes the agent's key immediately.
You should also set a drawdown limit if your system supports it. This acts as a secondary budget cap triggered by realized losses rather than by open exposure. Once the cumulative loss hits the threshold, trading halts. These controls are not suggestions. They are parameters that the API enforces, and the agent cannot negotiate around them.
Think of this stack as the base layer of your strategy. The agent handles the interesting work of signal generation and timing, but it cannot operate without passing through these gates. Every order is checked against the stack in milliseconds. If any layer says no, the order dies before it touches the market.
How does the agent place orders without controlling your funds?
The agent connects through MCP tools or the REST API. Both paths use the same underlying authorization model. When the agent sends an order, it specifies the market, the side, and the desired US dollar amount. The API normalizes this into the contract size, lot rules, and margin math required by the specific venue, but the authorization check happens first.
The exact request schema is in the docs; the shape looks like this:
{
"api_key": "YOUR_KEY",
"market": "crypto",
"side": "buy",
"usd_amount": 100,
"symbol": "BTC"
}The key in this example is scoped. It can place orders, query balances, and read positions, but it cannot withdraw, it cannot lift the budget cap, and it cannot modify the approved address list. If the usd_amount in the request would push the agent over its remaining budget cap, the API returns an error before the order reaches the market. The normalization layer handles the conversion from plain USD to the venue's native units, so the agent does not need to manage contract multipliers, decimal places, or margin ratios.
This separation of concerns is what keeps the model simple. The agent thinks in dollars and strategy. The API thinks in permissions and limits. The wallet owner thinks in risk and capital preservation. MCP trading safety first principles explain why this separation is the foundation of safe agentic trading.
Why should you start with paper trading and a small budget?
Paper trading exists so you can test the full loop without risking capital. The agent receives the same API responses, the same limit checks, and the same order rejection logic, but the trades do not settle with real money. This is useful for verifying that your hard limits actually trigger when you expect them to, and that your exit plans fire correctly. It is also useful for catching logic errors in the agent's strategy before those errors cost anything.
Moving from paper to live trading requires explicit owner authorization of a key. This is a deliberate gate, not an automatic graduation. When you do authorize live trading, you should start with a small budget that you can afford to lose entirely. Hard limits protect against runaway spending, but they do not protect against market risk. A correct order that follows every limit can still lose money because the market moves against the position.
You should also run the agent in live mode with reduced position sizes for a period of time. The behavior of an agent can change when real slippage and latency enter the picture. A strategy that looks perfect in paper trading may reveal hidden assumptions about fill prices or execution speed. Treat the first live weeks as a safety validation phase. Confirm that the budget cap halts trading when expected, that the exit plan triggers at the right levels, and that the panic switch works instantly. Only after this validation should you consider scaling the budget upward.
You can read more about sizing in How to start an AI agent with a small budget. The core idea is to treat the initial live phase as a production test of your safety stack, not as a launch to maximum returns.
What happens when the agent reaches a hard limit?
When a hard limit is breached, the API rejects the offending order and logs the event. If the limit is a drawdown cap or a kill switch, the system may also flatten existing positions and revoke the key. The agent does not get a vote. It cannot appeal the rejection or generate a new key. The owner must review the logs, adjust the parameters if appropriate, and issue a new authorization.
Hitting a limit is not a failure of the system. It is the system working as intended. Limits exist because algorithmic strategies can behave in ways that are hard to predict, especially when connected to language models that interpret market data through prompts. A budget cap that stops the agent after a string of losses is doing exactly what it was designed to do.
After a limit event, you should inspect the sequence of decisions that led up to it. Check whether the agent misread a signal, whether a prompt was ambiguous, or whether the market simply moved in a way that invalidated the strategy. Then adjust the strategy, the prompts, or the limits, and re-authorize carefully. The capital you preserved by having the limit in place is what gives you the room to iterate.
Frequently asked questions
No. The agent operates within a non-custodial wallet structure that you control. Withdrawal addresses are owner-approved only, and the agent cannot add or modify them. It can trade within the limits you set, but it can never move capital out of your wallet.
The infrastructure rejects the order before it reaches the market. The cap is enforced at the API level, so the agent cannot override it through prompting or logic errors. The rejection is logged, and the agent must either reduce the order size or wait for you to adjust the cap.
Paper trading mirrors the API behavior and market logic, but slippage, liquidity, and latency may differ in live markets. It is a safe way to test strategy logic and limit behavior before authorizing real capital. You should still expect differences in execution quality when you switch to live trading.
Yes, but increases to budget caps or position limits require explicit owner re-authorization. Decreases or kill switch triggers can typically take effect immediately to protect capital. The agent cannot raise its own limits because the approval step requires an owner-controlled signature.
No. Self-custody prevents theft and unauthorized withdrawals, but market risk remains. The agent can still lose the entire budget you have authorized it to trade, and you should size that budget accordingly. Hard limits bound the loss, but they do not eliminate it.
Give your agent a key.
One key to trade stocks, crypto, perps, options, and prediction markets. Live after owner authorization.
If you have never automated a trade, position sizing with an AI agent feels unfamiliar because the agent thinks in bounded budgets, not discretionary amounts.
A small budget used to make algorithmic trading impractical. Now an AI agent can trade within hard limits while you keep control of the funds.