Agentic tradingPortfolio managementBeginnersRisk

Your First Automated Multi-Market Portfolio: A Step-by-Step Walkthrough

Step-by-step setup for a first automated portfolio: connect an AI agent to five market types on one API, with spending limits set before real money trades.

By the Felix team7 min read
Key takeaways
  • 01Automating a multi-market portfolio is a five-step process: define the portfolio, connect the agent, set hard limits, practice on paper, then authorize live trading.
  • 02One Felix key gives an agent access to stocks, crypto, perpetual futures, options, and prediction markets, with every order sized in plain US dollars.
  • 03Safety controls come before capital: scoped keys, budget caps, position limits, exit plans, and a kill switch should all be configured before any real money trades.
  • 04Felix is non-custodial by construction, so an agent can spend within its limits but can never withdraw funds to itself.
  • 05Trading can lose money, including everything you allocate, so start on paper, start small, and scale only what you can afford to lose.

Automating a multi-market portfolio means giving one AI agent controlled access to stocks, crypto, perpetual futures, options, and prediction markets through a single API, then letting it execute and rebalance within limits you define. You do not need prior automation experience, and you do not need to be a developer if you use an AI client that speaks MCP. The process has five steps: decide what the portfolio should hold, connect the agent, set hard spending controls, practice on paper, and only then authorize live trading. This walkthrough takes each step in order.

What is an automated multi-market portfolio?

A multi-market portfolio spreads capital across several kinds of markets instead of concentrating it in one place. The logic is that different markets move for different reasons, so holding several types makes the whole portfolio less dependent on any single outcome. With Felix, one key and one API give the agent access to five market types: stocks, crypto, perpetual futures, options, and prediction markets. If the underlying model is new to you, what agentic trading is explains how an agent holds credentials, receives instructions, and acts on your behalf.

In this setup the agent is not a stock picker with free rein. It is a program that maintains a target allocation you define, and its daily work is mechanical:

  • ·Read prices and positions across all connected markets through one connection.
  • ·Compare the current weight of each market against your target weights.
  • ·Place orders sized in plain US dollars when a weight moves beyond the threshold you set.
  • ·Stay inside your budget caps and position limits, and stop immediately if you trigger the kill switch.

The single API matters more than it might seem. Every venue has its own contract math: perpetual futures trade in contracts, options have strikes and multipliers, prediction markets price shares between zero and one dollar. Felix normalizes all of it. The agent asks for 500 dollars of exposure to a market, and the API converts that into the correct venue-specific size, so the agent never has to know how many contracts 500 dollars buys at current prices. The custody model is just as important: Felix is non-custodial by construction, meaning funds sit in a wallet you control and the agent receives spending power within limits, not possession of the money.

Step 1: What should the portfolio hold before you touch any tooling?

Before touching any tooling, write the portfolio down on one page. Suppose, purely as a hypothetical, that you have 10,000 dollars you can genuinely afford to lose. You might decide on 50 percent in stocks, 20 percent in crypto, 10 percent in perpetual futures, 10 percent in options, and 10 percent in prediction markets. That split is an illustration, not a recommendation. The right allocation depends on your own situation, and leveraged products such as perps and options can lose value quickly, sometimes faster than you can react manually.

Alongside the targets, write the rules the agent will follow. This matters because an agent follows rules literally. It will not sense that this is a strange week to rebalance unless you encode that judgment. A reasonable starter rule set looks like this:

  1. 01Total budget: the maximum the agent may ever spend across all markets combined.
  2. 02Target weights: the percentage of the portfolio each market type should hold.
  3. 03Rebalance threshold: how far a weight may move from target before the agent corrects it, for example 5 percentage points.
  4. 04Position limit: the largest single position allowed in any one market.
  5. 05Exit conditions: when a position should be closed, such as a thesis expiring or a loss limit being reached.

Keep the first version simple enough to explain in two sentences. A plain portfolio is easier to automate correctly, easier to supervise, and easier to fix when something goes wrong. Complexity can come later, once the simple version has run without surprises.

Step 2: How do you connect an agent to the markets?

There are two ways in. The first is MCP, the model context protocol, which lets an AI client such as Claude or Cursor call Felix trading tools directly. You add the Felix server to the client configuration, authorize a key, and the agent can then call tools to read the portfolio, check prices, and place orders. Trading over MCP from Claude, Cursor, and Codex walks through that configuration in detail. The second way is the REST API, which suits anyone who wants to write a program in any language that can make HTTP requests.

A first REST session looks like this: The exact request schema is in the docs; this example shows the shape.

# Read the paper portfolio
curl https://api.felix.trade/v1/portfolio \
  -H "Authorization: Bearer YOUR_KEY"

# Place a 250 dollar paper order in the stock market
curl -X POST https://api.felix.trade/v1/orders \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "market": "stocks",
    "symbol": "AAPL",
    "side": "buy",
    "amount_usd": 250,
    "environment": "paper"
  }'

Two details are worth noticing. The order is sized in dollars rather than shares or contracts, and the same key works across every market type. The environment field keeps this order on paper, which is where everything should stay until step 5.

Step 3: What safety limits belong in place before money moves?

This is the step beginners skip, and it is the one that matters most. Before the agent touches real money, configure every control Felix offers. Scoped keys restrict what a key can do, down to specific markets and specific actions. Budget caps set the total a key may spend. Position limits cap the size of any single position. Exit plans define in advance when positions close. The panic switch, also called the kill switch, flattens all open positions and revokes the key in a single action.

The custody model is the deeper layer of protection. Because Felix is non-custodial by construction, the agent can spend within its limits but can never withdraw to itself or send funds anywhere you have not approved. Withdrawal addresses are owner-approved only, so even a malfunctioning or compromised agent cannot steal the money. Running an AI trading agent with real money, safely covers the full control stack and is worth reading before you authorize anything.

Be honest with yourself about what limits do. They cap the damage an agent can do, but they do not make losses impossible. Markets gap overnight, leveraged positions can be liquidated, and options can expire worthless. Trading can lose money, including everything you allocate to it. Set the budget cap at a level where losing the whole amount would be irritating, not life-changing.

Steps 4 and 5: How do you go from paper to live trading?

Step 4: practice on paper

Paper trading runs the same agent logic against simulated fills with no real money involved. Let the agent operate on paper for at least a couple of weeks. Watch whether it rebalances when you expect, stays inside its limits, and behaves sensibly when a market moves against it. Read the logs rather than just the final balance, because the logs show you why the agent did what it did. Most configuration mistakes surface here, where they cost nothing.

Step 5: authorize live trading

Live trading requires explicit owner authorization of a key, so nothing goes live by accident. When you do authorize, start smaller than you planned. A common pattern is to fund live trading with a fraction of the intended budget, let the agent run for a few weeks, and add capital only after its live behavior matches its paper behavior. Keep the paper setup running in parallel so you can test every rule change there first.

What does day-to-day operation look like?

Once running, the agent handles the mechanical work: reading prices, comparing weights to targets, and placing corrective orders in plain dollar amounts. Your role shifts to supervision. A weekly review is enough for most portfolios: check the fills, confirm the weights are near targets, and skim the logs for anything unexpected. When you want to change the allocation, change the written rules, update the agent configuration, and let it execute the transition gradually. You remain in control throughout, and you can revoke the key at any moment.

The mistakes first-time automators make are predictable:

  • ·Skipping paper trading because the setup feels ready.
  • ·Setting the budget cap above what they can genuinely afford to lose.
  • ·Turning on all five market types on day one instead of starting with one or two.
  • ·Never reading the logs until something has already gone wrong.

Avoid those four and the rest is iteration: small changes, tested on paper, promoted to live only after they behave. When you are ready for the full reference, the documentation covers every endpoint, tool, and control mentioned here.

Frequently asked questions

Do I need programming experience to automate a portfolio?

No. If you use an MCP client such as Claude or Cursor, you can instruct the agent in plain language and it calls the Felix trading tools for you. The REST API is available if you prefer to write your own program, but it is not required.

Can the agent withdraw or steal my money?

No. Felix is non-custodial by construction. Funds sit in a wallet you control, the agent can only spend within the limits of its scoped key, and withdrawals go only to addresses you have approved in advance.

How much money do I need to start?

There is no fixed minimum built into the process, because orders are sized in plain US dollars and you set the budget cap yourself. The right amount is whatever you can genuinely afford to lose, since trading can lose money, including everything.

What happens if the agent starts behaving badly?

You trigger the kill switch, which flattens open positions and revokes the agent's access in one action. You can also revoke a key at any time without flattening if you simply want the agent to stop trading.

Should I automate all five market types at once?

Most first-time users should not. Starting with one or two market types on paper, then adding more as you gain confidence in the agent's behavior, keeps early mistakes small and easier to diagnose.

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.