How to start crypto trading with an AI agent as a developer
Developers can start crypto trading with AI agents using one API, scoped keys, and non-custodial wallets. Learn the basics of safe, automated execution.
- 01Developers can start crypto trading with an AI agent by connecting a scoped API key to a non-custodial wallet and defining strict spending limits before any order is placed.
- 02The agent automates order generation, but it does not guarantee profits and can lose the entire budget you allocate, so safety controls must be configured first.
- 03Non-custodial infrastructure keeps funds in a wallet the owner controls, while scoped keys prevent the agent from withdrawing or spending beyond set limits.
- 04Paper trading tests logic and formatting, yet it ignores slippage and liquidity, so live trading should begin with a small, explicitly authorized budget cap.
- 05A panic switch, per-trade limits, and an exit plan should be treated as production infrastructure, not optional features, because the agent can act faster than any human can intervene.
Developers can start crypto trading with an AI agent by connecting a scoped API key to a non-custodial wallet and defining strict spending limits before any order reaches the market. The agent reads prices, decides allocations, and sends orders through a single API that normalizes contract math across venues. You do not need to hand over custody of funds or build custom exchange connectors. You need a wallet you control, a key with bounded permissions, and a clear plan for what happens when the market moves against you.
What does an AI trading agent actually do?
An AI trading agent is software that observes market data, applies a strategy or prompt, and generates orders without requiring you to click a button for each trade. It can run on a schedule, react to signals, or manage a portfolio continuously. The agent does not guarantee profits. It can lose money, including the entire budget you allocate, because it acts faster than you can intervene on individual trades. Its value is automation and consistency, not certainty.
Developers often build these agents with LLM tools or deterministic scripts. The LLM interprets a strategy written in plain language, while the execution layer translates that intent into sized orders. For example, you might tell the agent to maintain a target allocation across two assets and rebalance when drift exceeds a threshold. The agent then checks balances, calculates the needed trade, and submits it. If the market drops sharply, the agent will still submit the order unless you have configured a kill switch or circuit breaker.
This is different from a simple alert bot. An alert bot tells you what it sees. A trading agent spends money. That distinction matters for how you scope permissions, test logic, and monitor behavior. Because the agent operates with real money, every prompt, every condition, and every data source is a potential source of risk. You should version your prompts, log every decision, and assume that edge cases you have not considered will occur within the first week of live trading.
How do you connect an agent to a crypto market?
Felix exposes one API and one key for multiple market types, including crypto spot and perpetual futures. You connect your agent through an MCP tool in an AI editor like Claude or Cursor, or you call the REST API directly from your own code. The exact request schema is in the docs; the shape looks like this:
{
"market": "crypto",
"side": "buy",
"amount_usd": 150,
"symbol": "BTC"
}The API accepts orders sized in plain US dollars. It handles the underlying contract size, lot step, and decimal normalization for you. This removes a common source of errors when agents interact with multiple venues that use different margin systems and precision rules. You set the risk in dollars you understand; the execution layer translates that into the native format.
When you start, you create a scoped key that can only trade, not withdraw. You assign it a budget cap and optional position limits. The agent uses this key to request quotes or submit orders. If the key tries to spend beyond its cap, the API rejects the request before it reaches the venue. This happens at the infrastructure level, not inside your agent code, which means a bug in your prompt cannot accidentally blow through your entire wallet.
Developers should treat the API key as a service credential with a narrow blast radius. Rotate it regularly, store it in a secrets manager, and never embed it in client-side code or public repositories. If you use an MCP tool, the connection is local and the key stays on your machine. If you use the REST API from a server, ensure that server is secured and that the key cannot be read by unrelated processes. The first steps are covered in our guide on start executing orders with an AI agent as a developer.
Why is non-custodial access safer for developers?
Non-custodial means your funds remain in a wallet that you control, and the agent receives only delegated authority to trade within boundaries you set. The agent can place orders, but it cannot withdraw funds to itself or to any address you have not pre-approved. If the agent is compromised, the attacker can only trade within the scoped limits of the key. They cannot sweep the wallet.
This model matters for developers because it separates code risk from custody risk. You can iterate on strategy logic, swap out LLM models, or restart your server without touching the seed phrase or private keys that control the funds. The wallet owner retains unilateral ability to revoke the agent's key, flatten positions, and disable access through a panic switch. Even if you push a flawed update at 2 AM, the guardrails remain in force.
For developers used to centralized exchange API keys that often allow withdrawals by default, this is a different architecture. You should treat the scoped trading key as a hot credential with a short lifespan and narrow permissions, while the wallet itself remains cold relative to the agent. The non-custodial design also means that if the service providing the API experiences an outage, your funds are still in your wallet. You can access them directly or move them to another venue without waiting for a support ticket or withdrawal approval. This architecture is explained further in our developer's guide to self-custody algorithmic trading.
What safety controls should you configure first?
Before the agent runs, define four things: a budget cap, a per-trade size limit, a daily or weekly loss threshold, and an exit plan. The budget cap is the hard ceiling on what the key can spend. The per-trade limit prevents a single oversized order from dominating your risk. The loss threshold triggers a pause or revocation when drawdown reaches a level you choose. The exit plan tells the agent how to close positions, either through take-profit and stop-loss rules or through a full flatten command.
You should also set a panic switch. This is a manual or automated kill function that cancels open orders and revokes the agent's key immediately. It exists outside the agent's logic so that a runaway loop or bad prompt cannot disable it. Think of it as an emergency brake that does not depend on the agent agreeing to stop.
Position sizing is especially important in crypto because volatility can move prices several percent in minutes. An agent that sizes by percentage of portfolio without a cap can increase risk rapidly during volatile periods. Fixing orders in dollar terms keeps the math transparent. If you tell the agent to buy $100 of an asset, it buys $100 worth. It does not accidentally buy 100 contracts or 100 units because it misunderstood the symbol. Read more about sizing logic in how position sizing keeps AI agents safe and about overall controls in how to build guardrails for a trading agent.
It is worth writing these limits down in a runbook before you start. Specify the maximum number of trades per hour, the maximum open positions, and the conditions under which you will manually intervene. This discipline prevents emotional overrides during market turbulence and gives you a baseline to evaluate whether the agent is behaving correctly.
How do you test without risking real money?
Felix offers paper trading so you can observe how your agent behaves when it sees real market data but executes against simulated balances. Use this to catch formatting errors, prompt hallucinations, and unexpected loop behavior. However, paper trading misleads in one critical way: it fills orders instantly at the last quoted price without slippage or liquidity constraints. In live markets, especially during volatility, your fill price may differ significantly.
Because of this, treat paper trading as a syntax and logic check, not as a performance forecast. A strategy that looks profitable in simulation may fail when real latency, spread, and partial fills enter the picture. Run paper tests for a few days to confirm the agent does not crash, leak errors, or send malformed orders. Then move to live with a small budget that you can afford to lose entirely.
During paper testing, deliberately introduce edge cases. What happens when the agent receives an empty price feed? What happens when a balance is insufficient? What happens when a prompt produces an order for an unsupported symbol? You want to see failures in paper mode, not live mode. Log every decision and compare the agent's intended action against the simulated result. If the agent submits orders you did not expect, fix the prompt or the guardrails before upgrading to live.
How do you move from paper to live trading safely?
Live trading requires explicit owner authorization of the key. You, as the wallet owner, must approve the upgrade from paper to live. Do not authorize large limits on day one. Start with a budget cap that represents a trivial fraction of your total funds, perhaps the minimum supported amount. Let the agent run for a short window while you monitor logs and position changes.
During this phase, verify that the exit plan works. Trigger a condition that should cause the agent to flatten or pause, and confirm it happens on time. Check that the panic switch revokes access and that you can manually flatten positions from the wallet if needed. Only after you have observed correct behavior under live conditions should you consider raising the budget cap. This process is slow by design. Speed in automation is an advantage only after safety is proven.
You should also consider market hours and settlement cycles. Crypto markets trade continuously, which means your agent can act while you sleep. This is both a feature and a risk. A bug that triggers repeated orders will accumulate losses around the clock. Set time-based limits or session windows if your strategy does not require 24-hour presence. Monitor the agent's activity through audit logs, and review them daily during the first two weeks of live trading.
Developers do not need to become quantitative analysts to start trading with an AI agent. They need to treat the agent as a piece of infrastructure that requires access controls, testing, and monitoring just like any production service. The tools to do this are one API, one scoped key, and a non-custodial wallet. The discipline is in the limits you set before the first order. If you respect that discipline, you can explore automated crypto trading while keeping custody and control.
Frequently asked questions
No. You need to understand basic order types, position sizing, and risk limits. The agent handles execution mechanics, but you must define the strategy and guardrails.
No. The agent operates with a scoped key that permits trading within limits you set. Withdrawal addresses are owner-approved only, and the agent cannot change them.
Budget caps and per-trade limits enforce hard ceilings at the API level. You can also set a panic switch that flattens positions and revokes the key immediately.
Paper trading uses real market data but simulates fills without slippage or liquidity constraints. It helps you test logic and formatting, but it does not predict real-world performance or profitability.
Yes. The same API and key structure supports multiple market types. You specify the market in your request, and the execution layer normalizes venue-specific rules.
Monitor order frequency, fill prices, open position sizes, and whether your exit plan triggers correctly. Confirm that the panic switch works and that the agent stays within its budget cap.
Give your agent a key.
One key to trade stocks, crypto, perps, options, and prediction markets. Live after owner authorization.
Newcomers often treat scoped API keys like strong passwords. In practice, they are programmable contracts that limit what an agent can do, regardless of whether the agent is buggy, compromised, or hallucinating.
Running a trading agent from Claude means connecting an LLM to real markets through MCP tools and scoped API keys. This guide walks through the architecture, safety setup, and first steps without assuming prior automation experience.