Perpetual futuresAI agentsBeginnersRisk controls

Your first automated perpetual futures trade with an AI agent

Learn how to automate perpetual futures trading with an AI agent, from market basics to non-custodial execution and safety controls, without writing complex infrastructure.

By the Felix team11 min read
Key takeaways
  • 01Perpetual futures trading with an AI agent starts with paper trading and strict safety controls, not with live capital and optimism.
  • 02Non-custodial infrastructure means the agent can trade on your behalf but can never withdraw your funds or exceed the hard limits you configure.
  • 03Dollar-sized orders remove contract math confusion, but leverage still amplifies both gains and losses, including the risk of total loss.
  • 04A scoped key, budget cap, position limit, and tested kill switch are mandatory infrastructure, not optional features, for every beginner.
  • 05Moving from paper to live trading requires explicit owner authorization, a small initial budget, and active monitoring until the agent proves reliable.

Automating perpetual futures with an AI agent means delegating order execution to software that trades directly from a wallet you control, while hard limits prevent it from spending beyond a budget you set. You do not need to build your own exchange connections, manage custody infrastructure, or learn the specific contract math of each venue. Felix provides one API and one key that normalizes position sizing into plain US dollars, so the agent can open and close leveraged positions on your behalf without ever being able to withdraw your funds or send capital to an unapproved address. If you have never automated a trade, the path is to start with paper trading, configure layered safety controls, and authorize a scoped key only after you have observed the agent behave correctly under simulated market conditions.

What are perpetual futures and why do traders automate them?

Perpetual futures are derivative contracts that track the price of an underlying asset without an expiration date. Unlike dated futures, you do not need to roll a position into a new contract as a settlement date approaches. Instead, the contract stays open indefinitely, and traders exchange periodic funding payments based on the difference between the contract price and the spot price of the underlying asset. If the contract trades above spot, longs pay shorts. If it trades below, shorts pay longs. This mechanism keeps the perpetual price anchored to the underlying market over time.

This structure makes perpetuals popular for speculating on price direction, hedging spot exposure, or gaining leveraged exposure to volatile assets. Because there is no expiry, you can hold a position as long as you have sufficient margin and are willing to pay or receive funding. Automation appeals to perpetual futures traders because these markets often operate continuously and move quickly. Price gaps can happen at any hour, and manual traders may miss entries or exits while they are away from their screens.

An AI agent can monitor conditions, enter orders, and close positions according to rules you define, without the delays of manual clicking. The agent follows the prompt logic you provide, whether that means entering on a technical signal, rebalancing a hedge, or cutting a loss at a predefined level. The goal is consistency, not fortune telling. The agent does not predict the future. It executes your plan faster and more reliably than you can by hand, and it does so without emotional deviation.

That speed comes with amplified risk. Perpetual futures are typically leveraged, which means a small price move in your favor produces a larger percentage return on your margin, but a small move against you can produce a loss that exceeds your initial capital. You can lose your entire position, and in volatile markets you can lose it within minutes. This is why automation infrastructure must include safety guardrails before any order is sent, and why beginners should never automate leveraged trading without hard limits in place.

How does an AI agent trade perps without taking custody of your funds?

In traditional algorithmic trading, you might deposit funds onto a platform and give an API key full withdrawal rights. That is custodial risk. Felix is non-custodial by construction. Your funds sit in a wallet that you control, and the agent receives a scoped key that can only place trades within limits you define. The agent can spend from the budget you allocate, but it cannot withdraw funds to itself or any address you have not explicitly approved. How AI agents execute orders without taking custody of your funds

When the agent decides to open a perp position, it sends an order through the Felix API. The API translates your plain dollar amount into the venue-specific contract math, handles margin checks, and routes the order. You do not need to calculate contract sizes, tick sizes, notional values, or margin fractions yourself. The abstraction layer means you can tell the agent to open a fifty dollar long or a two hundred dollar hedge, and the infrastructure normalizes that instruction across whatever perps venue you connect. The wallet remains yours, and the key can be revoked at any time from your owner dashboard.

This non-custodial model changes the trust assumption. You are not trusting the agent with your stack. You are trusting it with a limited operational budget inside a sandbox. If the agent malfunctions, the worst case is that it spends the capped budget or hits the position limit. It cannot drain your wallet, move funds to a cold wallet, or change withdrawal addresses. The owner approval step for withdrawals means that even a compromised agent cannot steal.

For beginners, this is critical peace of mind. You can experiment with automated logic and learn how perpetual futures behave without exposing your full capital base to software risk. You start by authorizing a small scope, observe the agent’s behavior, and expand only when you are confident. The infrastructure is designed so that the default state is restrictive, and you must consciously choose to increase exposure.

What safety controls should a beginner configure before the first trade?

Before your agent sends its first order, you should set up a layered control system. Think of it as giving the agent a very specific job description with hard boundaries it cannot cross. The most important controls are budget caps, position limits, an exit plan, and a panic switch. Together these form a perimeter that keeps the agent inside safe territory even if your trading logic is flawed or the market moves unexpectedly. How Felix keeps crypto agent trading safe

  • ·A budget cap is the total dollar amount the agent is allowed to deploy across all trades. Once that cap is reached, the agent cannot open new positions, even if your prompt logic says otherwise. This prevents runaway strategies from accumulating infinite exposure.
  • ·A position limit restricts the size of any single trade, preventing one oversized order from consuming your entire budget in a single market entry.
  • ·An exit plan defines how the agent should close or reduce exposure when a condition is met, such as a percentage drawdown, a funding rate spike, or a time-based rule.
  • ·The panic switch, or kill switch, immediately flattens all positions and revokes the agent’s trading access.

You should also configure scoped keys that limit what the agent can do. For example, you might authorize one key only for perps trading on a specific venue, with a maximum position size of one hundred dollars and a daily budget of five hundred dollars. The agent operates inside that box. It cannot pivot to options or stocks with the same key unless you explicitly allow it. It cannot increase the scope or remove limits. The key is bound by the parameters you set at creation. How to build guardrails for a trading agent

These controls are not optional extras. They are the foundation of automated trading. Beginners often focus on the entry strategy and forget that the exit strategy and the safety net matter more over time. A profitable entry with no exit plan becomes a losing trade quickly in leveraged markets. A correct strategy with no budget cap can be destroyed by a single loop bug that repeats orders. Build the guardrails first, test them in paper trading, and only then add the strategy logic.

How do you size orders and place your first automated perp trade?

Felix sizes every order in plain US dollars. You do not need to think in terms of contracts, lots, or margin fractions. You tell the agent, in dollars, how much exposure you want, and the API handles the conversion. This abstraction removes a common source of beginner errors, where a miscalculation of contract size leads to accidental leverage that wipes out an account. How to size orders in dollars with MCP trading tools

For your first trade, start in paper trading mode. Paper trading simulates order execution against live market data without risking real capital. You can test whether your prompt logic, budget caps, and exit rules behave as expected. Suppose you allocate a paper budget of one thousand dollars and instruct the agent to enter a long position when a certain condition is met. You can watch the agent create the order, manage the position, and eventually close it, all without real money on the line. If the agent misinterprets your prompt and tries to oversize the trade, the position limit will block it. If it tries to open a second position after hitting the budget cap, the system will reject it. This is exactly what you want to see in testing.

When you are ready to trade with real funds, you authorize a live key. The transition is deliberate, not automatic. You must explicitly approve the key for live trading, which means you cannot accidentally deploy real capital while you are still experimenting. The order sizing remains the same. A fifty dollar order is still a fifty dollar order, whether the key is in paper or live mode. The difference is that live execution uses real margin and faces real slippage, funding costs, and liquidation risk.

During your first live sessions, place only one order at a time and watch the full lifecycle. Verify that the entry size matches your intent, that the margin requirement is what you expected, and that the exit behavior follows your plan. Do not increase complexity until the simple case works perfectly.

What mistakes do beginners make when taking an AI agent live?

The most common mistake is moving to live trading too quickly, without enough paper testing. An agent that behaves well for three paper trades may still misinterpret edge cases, hallucinate parameters, or hit a rate limit under load. You need to see it handle errors, rejections, and drawdowns in simulation before you risk real money. Markets have gaps, funding spikes, and rejected orders. Your agent must encounter these in paper mode so you can adjust the logic safely.

Another frequent error is underestimating leverage. Because perpetual futures are leveraged by default, a small dollar order can represent a much larger notional exposure. Beginners sometimes set a position limit in dollars but forget that the underlying leverage multiplies the risk. If the venue offers twenty times leverage, a one hundred dollar position controls two thousand dollars of notional value. A five percent move in the underlying becomes a one hundred percent move on your margin. You must account for this when you set your budget caps and stop rules. A stop that looks conservative on a spot chart may be far too tight for a leveraged perp.

A third mistake is neglecting the kill switch. Some beginners set it up but never test it, or they place it behind a slow manual process. In fast markets, you need the ability to flatten and revoke access immediately. If you have to log into three different systems to find the switch, it is not a safety control. It is a wish. Test the kill switch during paper trading. Know the exact command or button. Make sure it works when you are stressed, because that is when you will need it.

Finally, beginners often overcomplicate the strategy. The first automated trade should be simple. A single entry condition, a single exit condition, and a fixed position size. Complexity is the enemy of safety when you are learning. You can add layers later, after the basics are proven.

How do you move from paper trading to live trading safely?

The transition should be gradual and intentional. First, run the agent in paper trading for a period long enough to cover multiple market conditions, including both trending and volatile periods. Watch how it behaves when funding rates spike, when liquidity thins, or when orders are rejected. Review the logs to confirm that every action matches your prompt logic and that the safety controls triggered correctly. If the agent ever tried to exceed a limit, understand why and tighten the prompt.

Next, authorize a live key with a small budget. Choose a budget you are willing to lose entirely, because that is a real possibility in leveraged markets. Keep the position limits tight and the kill switch within reach. Do not increase the budget until the agent has demonstrated consistent, safe behavior over time. Scaling up is easy if the logic is sound. Recovering from a large loss is not.

Finally, monitor the agent actively during its first live sessions. Automated does not mean unattended. You should understand why it entered each trade and whether the outcome matched your expectations. Keep a journal of the agent’s decisions and your own observations. Over time, you can relax your oversight as you gain confidence in the system, but never relax the hard limits. The budget cap, position limit, and kill switch should remain in place regardless of how well the agent has performed. They exist to protect you from the trades you do not see coming.

Frequently asked questions

Do I need to know how to code to automate perp trading?

No. You can connect an AI agent through MCP tools in Claude, Cursor, or other compatible clients. You describe the trading logic in plain language, and the agent translates that into API calls. If you prefer, you can also interact directly with the REST API.

Can the AI agent withdraw my funds to its own wallet?

No. The architecture is non-custodial. The agent can trade within the budget and limits you set, but it cannot withdraw funds or send them to an address you have not explicitly approved. Withdrawal addresses are owner-controlled and cannot be changed by the agent.

What happens if the agent hits my budget cap?

The agent cannot open any new positions once the budget cap is reached. It may still close existing positions or reduce exposure depending on your exit plan, but it cannot deploy additional capital until you adjust the cap or reset the cycle.

How does leverage work with dollar-sized orders?

The dollar amount you specify is the order size you want to control, but the notional exposure depends on the venue’s leverage settings. A one hundred dollar order at ten times leverage represents one thousand dollars of notional exposure. A five percent move in the underlying becomes a fifty percent move on your margin. You should set position limits with this multiplier in mind.

Is paper trading identical to live execution?

Paper trading simulates execution against live market data, but it does not guarantee that a live order will fill at the same price or that slippage will be identical. It is an excellent tool for testing logic and safety controls, but real markets involve execution risk that simulation cannot fully replicate.

Can I stop the agent instantly if the market moves against me?

Yes. The panic switch flattens all open positions and revokes the agent’s key immediately. You should test this during paper trading so you know exactly how to trigger it without hesitation when real capital is at risk.

Give your agent a key.

One key to trade stocks, crypto, perps, options, and prediction markets. Live after owner authorization.

Keep reading

Not a brokerage, exchange, or investment adviser. Not investment advice. Trading involves risk, including total loss.