Why a single API changes how AI agents manage multi-market portfolios
One API normalizes stocks, crypto, perps, options, and prediction markets so an AI agent can allocate, hedge, and rebalance without custody risk.
- 01A single API normalizes stocks, crypto, perps, options, and prediction markets into dollar-sized positions, so an AI agent can manage cross-market exposure in one programmatic loop.
- 02Non-custodial architecture keeps funds in the owner's wallet, with scoped keys that let the agent trade but never withdraw to itself or arbitrary addresses.
- 03Hard limits, budget caps, position restrictions, and a kill switch are enforced by the infrastructure, not by the agent's prompt, and they aggregate across all active markets.
- 04Dollar-based sizing removes contract-math bugs and lets the agent reason about portfolio allocation in familiar base-currency terms rather than venue-specific units.
- 05Paper trading mirrors the live API for all five market types, but live trading requires explicit owner authorization and still carries the risk of losing the entire allocated capital.
A single API that exposes stocks, crypto, perpetual futures, options, and prediction markets as dollar-sized positions lets an AI agent treat a multi-market portfolio as one unified set of risk exposures. The agent no longer needs separate authentication schemas, contract multipliers, or margin rules for each venue. Instead, it receives normalized balance and position data, computes allocations in plain US dollars, and submits orders that the infrastructure translates into venue-specific instructions. This removes fragmentation and lets the agent rebalance, hedge, or reduce beta across asset classes in a single programmatic loop.
What is hard about multi-market portfolio management today?
Running capital across stocks, crypto, perpetual futures, options, and prediction markets traditionally means building a separate integration for each venue. Each connection has its own authentication format, rate limits, error codes, and contract specifications. A human trader or a software agent must translate notional intent into shares, lots, contracts, or outcome shares, while tracking margin requirements that differ by product type. Settlement currencies also fragment the picture. A stock broker may report P&L in fiat, a perps venue in a native token, and a prediction market in a stablecoin. The agent must fetch exchange rates and normalize values before it can compute total return. The result is fragmented risk visibility. An agent might hold a long delta in one market and an offsetting short in another, but the two positions sit in different systems and the agent cannot compute total exposure in real time. Rebalancing becomes a manual sequence of logins and ticket submissions rather than a single programmatic decision. This fragmentation increases the chance of sizing errors, delayed hedges, and unintended correlation gaps. It also multiplies operational risk because each API key is a potential attack surface that must be rotated and monitored independently. When the number of markets grows, the complexity does not scale linearly. It scales combinatorially, because each new venue introduces new edge cases in order validation, settlement timing, and reporting.
How does a single API normalize position sizing?
Felix exposes every market through one interface where orders are denominated in US dollars. The agent does not need to know that a perps venue uses a particular contract size, that an options venue lists premiums in a native token, or that a stock broker requires share quantities in whole numbers. The infrastructure translates the agent's dollar intent into the correct venue-specific units. For example, if the agent decides to reduce portfolio beta by two hundred dollars, it sends a single instruction and the system maps that to the appropriate number of shares, contracts, or perp lots. This removes an entire class of unit-conversion bugs that have caused agents to mis-size orders on other platforms. It also lets the agent reason about allocation in intuitive terms. A risk model can output target exposures in dollars, and the execution layer handles the rest. The same normalization applies when reading data back. Position updates and balance changes are reported in dollars, so the agent does not need to query live prices and multiply by contract multipliers to understand its own book. The exact translation logic and precision rules are documented, but the agent never needs to hardcode them. This mental model is closer to traditional portfolio theory, where weights and deviations are expressed in base currency terms. The approach is discussed in more detail in our guide on how to size positions for an AI trading agent from first principles.
How does non-custodial architecture protect a multi-market portfolio?
In a custodial setup, sending an agent to trade across multiple venues means depositing funds into several exchange accounts and giving the agent API keys that can withdraw or transfer. That model concentrates theft risk. Felix is non-custodial by construction. The owner controls the wallet where funds reside. The agent receives a scoped key that can place orders, cancel orders, and read balances, but it cannot withdraw funds to an arbitrary address. Withdrawal addresses are owner-approved only, and the agent cannot add new ones. Even if the agent's key is compromised or the model behaves unexpectedly, the attacker or malfunction is trapped inside pre-set budget and position limits. The owner retains the ability to revoke the key, flatten all positions through the kill switch, and withdraw funds directly. This structure matters especially for multi-market portfolios because the capital base is often larger and the attack surface is theoretically wider. By keeping the agent inside a walled environment that the owner defines, the system removes the custodial risk that otherwise scales with the number of markets. The owner can also scope keys by market type, granting one key access to stocks and another to crypto, or using a single key with a low global cap during initial testing. Developers who want to understand the full setup can read our guide on how developers can start self-custody algorithmic trading, and anyone concerned about model risk should review how to control the risks of LLM-powered trading without giving up custody.
How can an agent hedge across market types?
When all markets are visible through one API, an agent can construct hedges that were previously impractical to automate. Suppose the agent holds a long equity position and wants to protect against a broad drawdown. It can short a perpetual futures index or buy a put option through the same interface, sizing the hedge in dollars to match the desired delta reduction. The agent reads the combined portfolio state, computes net exposure, and executes the offsetting trade without switching contexts. The critical advantage is simultaneity. In a fragmented system, the agent might read the stock position, compute a hedge, then discover that by the time it connects to the derivatives venue the price has moved and the hedge ratio is stale. A single API provides a snapshot of the entire book and a unified execution path, so the agent can rebalance all legs in one pass. It is important to state that this is hypothetical and that such hedges can fail. Correlations between stocks, crypto, and derivatives are unstable. A hedge that looks balanced on paper can leave the portfolio exposed if the relationship breaks down. The agent can lose money, including the entire allocated capital, and dollar-based sizing does not eliminate market risk. The infrastructure provides the plumbing, but the agent's strategy is responsible for the logic. Still, the ability to express cross-market trades in one loop means the agent can react faster than a human operator who must log into separate accounts and calculate contract sizes manually. Speed and precision in execution do not guarantee profit, but they do remove a structural barrier to systematic multi-market risk management.
What guardrails prevent a multi-market agent from overconcentrating?
Trading across five market types does not reduce risk by itself. It can actually obscure it if the agent piles into correlated trades that appear diversified. A long stock position, a long crypto position, and a long perp on an equity index may all lose value in a risk-off episode. Felix enforces hard limits at the infrastructure level to prevent this kind of hidden concentration. The owner sets a budget cap that spans all venues, so the agent cannot exceed a total dollar exposure even if it splits orders across a stock broker, a perps venue, and an options venue. Position limits restrict the size of any single trade or market. Exit plans define automatic take-profit and stop-loss levels that execute without waiting for the model to re-evaluate. The panic switch flattens every position and revokes the key instantly. These controls are not suggestions inside the agent's prompt. They are enforced by the autonomous system, which means the agent cannot negotiate around them. This is critical because LLM-based agents can be unpredictable in edge cases. A scoped key might be restricted to only buy, only sell, or only trade specific markets. The owner can also require that certain markets remain in paper mode while others go live. Because the limits are dollar-based and global, they naturally aggregate risk across all five market types. For a deeper explanation of the enforcement layer, see how autonomous systems enforce hard limits the agent cannot cross.
How do developers test multi-market strategies before going live?
Paper trading on Felix uses the same API surface as live trading. An agent can rebalance across stocks, crypto, perps, options, and prediction markets with normalized dollar sizing, but no real capital moves. This lets developers validate cross-market logic, test correlation assumptions, and observe how the agent handles simultaneous orders. The environment mirrors the live system closely enough that a strategy which mis-sizes or over-trades in paper will reveal the flaw before money is at risk. Agents connect through MCP tools in Claude, Cursor, or other MCP clients, or through the REST API directly. A developer can iterate on prompts and logic inside an AI code editor, watch the agent paper-trade across multiple markets, and refine the strategy without financial exposure. When the owner is ready to trade live, they must explicitly authorize a specific key for real money. The authorization step is separate from model configuration, which prevents accidental deployment. Developers should still treat paper results with caution. A strategy that appears stable in simulation can lose money in live markets due to slippage, liquidity gaps, or changing correlations. Paper trading proves the integration and the logic, not the future profitability. The transition to live should be gradual, with tight budget caps and narrow market scopes that expand only after the owner observes consistent, safe behavior. Markets can move against any position, and trading can result in losses, including the total amount allocated.
Frequently asked questions
Yes. The API presents a unified interface, so the agent can hold positions in stocks, crypto, perps, options, and prediction markets simultaneously. The owner controls which markets are enabled for each scoped key, and the agent sees all allowed positions in one portfolio view.
No. The agent reasons in plain US dollars for both orders and position reporting. The infrastructure handles translation into venue-specific units, though the agent should still understand that leveraged products carry liquidation risk and that trading can lose money.
Hard limits enforce the owner-defined boundaries regardless of how many markets are active. Budget caps, position limits, and exit plans trigger automatically, and the owner can hit the kill switch to flatten everything and revoke the key. These controls operate at the infrastructure level, so the agent cannot override them.
Yes. Paper trading supports the same cross-market logic and dollar-based sizing as live trading, so developers can test rebalancing and hedging without capital at risk. Moving to live requires explicit owner authorization of a specific key.
The agent uses a scoped key that can trade but cannot withdraw funds. The owner retains control of the underlying account or wallet, and withdrawal addresses require owner approval. This applies consistently across all connected market types.
Yes. Scoped keys let the owner restrict the agent to specific market types, specific symbols, or specific actions. This is useful for gradually expanding access after testing in a narrower sandbox.
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.