Why we size every order in dollars
Felix sizes every order in plain US dollars, then converts to shares, contracts, or lots internally. This hides venue math from agents and prevents sizing errors across all market types.
- 01Sizing orders in dollars removes the need for agents to know contract specifications, multipliers, or decimal precision for every venue.
- 02Felix converts the requested dollar amount into the correct mechanical units after applying safety controls, so budget caps are enforced before any venue interaction.
- 03A dollar is the only unit that means the same thing across stocks, crypto, perps, options, and prediction markets, making it the natural abstraction for a multi-market API.
- 04Developers can write simpler prompts when agents reason about capital allocation in dollars rather than venue-specific contract math.
- 05Paper trading and live trading share identical dollar sizing logic, so strategy behavior does not change when an agent moves from simulation to real money.
Felix sizes every order in plain US dollars because a dollar has the same meaning whether the agent is trading stocks, crypto, perpetual futures, options, or prediction markets. When an agent requests a five hundred dollar position, Felix translates that amount into the correct number of shares, base units, contracts, lots, or outcome shares at the specific venue. The agent never sees tick sizes, notional multipliers, margin denominators, or contract specifications. This abstraction removes an entire class of sizing errors and makes budget controls trivial to enforce across every market type.
What problem does dollar-based sizing solve?
Trading venues do not share a common language for position size.
- ·A stock broker counts in shares.
- ·A crypto exchange counts in base units, sometimes with eight decimal places.
- ·A perps venue uses contracts that represent a fixed notional value, which may change with leverage.
- ·An options venue multiplies the premium by one hundred shares per contract.
- ·A prediction market sells outcome shares that pay out one dollar if correct, but trade in penny increments.
If an agent must speak these native units, it needs to carry a full specification database for every venue. It must know that one options contract is not one dollar of exposure, but one hundred times the premium. It must know that a perps contract on one venue might be one dollar of notional while another uses ten. It must track decimal precision for different tokens. This is not merely inconvenient. It is a source of unforced errors.
An agent that thinks in contracts can easily request ten contracts when it means ten dollars of exposure. It can confuse the notional value of a perps contract with the margin required to open it. It can fail to account for the options multiplier and accidentally size an order fifty times too large. These mistakes are especially likely under pressure, when an agent is reacting to market data and composing orders quickly.
Human traders make these errors too. A manual trader might misread an options chain and buy one contract thinking it represents one share. An automated agent can make the same mistake at machine speed. Dollar sizing removes the ambiguity for both.
Dollar sizing solves this by making the unit of intent identical to the unit of risk. The agent decides how much capital to allocate. Felix converts that capital allocation into the correct mechanical representation for the venue. The agent does not need to know the rules. It only needs to know its budget.
This common denominator also simplifies multi-market portfolios. An agent trading stocks and perps in the same account cannot compare risk if one position is measured in shares and another in contracts. Dollar sizing lets the agent view a five hundred dollar stock position and a five hundred dollar perp position as equal capital at risk.
How does Felix convert dollars to venue-specific units?
The conversion happens in three steps.
- 01Felix fetches the current market price and the venue's contract specification.
- 02It computes the number of units required to reach the requested dollar amount.
- 03It rounds according to the venue's minimum order increment and checks that the result satisfies minimum notional rules.
For a stock, the math is straightforward. If the agent requests one thousand dollars and the stock trades at two hundred dollars, Felix sends an order for five shares.
For a crypto spot market, Felix divides the dollar amount by the price and rounds to the tradable decimal places. If the agent wants fifty dollars of a token trading at ten cents, Felix sends an order for five hundred units.
For perpetual futures, the calculation must account for the contract's notional value and the current leverage context. Felix computes the number of contracts that produce the requested dollar exposure, not the margin collateral. The agent asks for one thousand dollars of exposure. Felix handles the conversion to contracts.
For options, the multiplier is the most common source of human error. An option quoted at two dollars costs two hundred dollars per contract. Felix divides the requested dollar amount by the premium multiplied by the contract size, then rounds to the nearest whole contract. The agent never needs to remember the factor of one hundred.
For prediction markets, the price is a probability expressed in cents. A share trading at sixty cents costs sixty cents. Felix converts the requested dollar amount directly into share count, rounding to the venue's minimum increment.
For limit orders, Felix uses the limit price specified by the agent to compute the unit count, not the current market price. If the agent requests five hundred dollars at a limit of ninety dollars, Felix computes shares based on ninety. This preserves the exact dollar intent. If the market moves before execution, the unit count remains fixed at the original calculation.
When the math produces a fractional contract or share, Felix rounds down to the nearest tradable unit to avoid overshooting the requested budget. If the rounded value falls below the venue's minimum notional threshold, Felix returns an error explaining that the dollar amount is too small for this market. This prevents the agent from sending orders that would be rejected by the venue.
Market orders carry slippage risk. If the price moves between the time Felix computes the unit count and the time the venue fills the order, the final dollar value may differ slightly from the request. This is expected and the agent should account for it in its strategy logic, just as any trader would.
This uniformity is what makes the One API for every market possible. The agent sends the same JSON shape regardless of the underlying asset class. The exact request schema is in the docs; the shape looks like this:
curl -X POST https://api.felix.trade/v1/order \
-H "Authorization: Bearer YOUR_KEY" \
-d '{
"market": "EXAMPLE-MARKET",
"side": "buy",
"dollar_amount": 1000,
"type": "market"
}'Why is this better than letting agents handle contract math?
Large language models are capable of reasoning about capital allocation, but they are not reliable calculators for venue-specific arithmetic. They can confuse notional value with margin. They can forget to apply a multiplier. They can use outdated contract specifications if their training data does not include the latest venue parameters.
When the agent is responsible for unit conversion, the prompt must include a detailed specification sheet. This increases token usage and introduces complexity that has nothing to do with the trading strategy. The agent should think about whether a market is attractive, not whether a contract size changed last quarter.
Prompt length directly affects cost and latency. Every contract specification added to a system prompt consumes tokens that could be used for market reasoning. By removing venue math from the prompt entirely, dollar sizing frees up context window for strategy and risk management.
Dollar sizing also makes risk management orthogonal to market mechanics. An agent can be instructed to risk no more than two percent of a five thousand dollar portfolio on any single trade. With dollar sizing, the agent simply requests a one hundred dollar order. Felix enforces the cap. If the agent had to convert that to contracts itself, the safety layer would need to reverse-engineer the dollar value from the contract count to verify the limit. That inversion is fragile and error-prone.
By keeping the agent in dollars, Felix ensures that the intent, the safety check, and the audit trail all share the same unit. A budget cap, a drawdown limit, and a position size are all expressed in the same currency. This alignment is essential for autonomous agents that must prove they are staying within bounds.
Backtesting benefits too. A backtest engine can simulate fills using dollar amounts without reproducing every venue's rounding rule. Felix applies the same conversion logic in simulation as it does in production, so the transition from paper to live does not introduce unit-related discrepancies.
How do safety controls work with dollar sizing?
Because Felix receives orders in dollars, it can apply safety controls before any venue interaction occurs. This ordering matters. The safety layer sees the agent's intent in the same unit that the owner uses to set limits.
Consider a spend cap. The owner configures a daily limit of one thousand dollars. An agent requests an eight hundred dollar order. Felix checks the running total, sees that three hundred dollars have already been spent today, and rejects the order because it would exceed the cap. The rejection happens before any conversion to contracts. The agent does not need to know how many contracts eight hundred dollars would have bought. The limit is clear and unambiguous.
Position limits work the same way. The owner might set a maximum position size of five hundred dollars for any single prediction market. Felix tracks the dollar value of open positions across all venues. If an agent tries to add exposure that would push the total above five hundred dollars, the order is blocked.
Drawdown limits are also simpler. If the owner sets a ten percent drawdown limit on a ten thousand dollar account, the trigger is one thousand dollars. Felix monitors the portfolio value in dollars. If the agent's open positions, marked to market, fall by one thousand dollars, the drawdown limit fires. This would be nearly impossible to track accurately if positions were recorded in mixed units.
Audit trails are clearer when every order is recorded in dollars. An owner reviewing logs can see that an agent requested five hundred dollars, that Felix approved it against a one thousand dollar cap, and that the venue received the correct unit count. There is no need to translate contracts back into capital to verify compliance.
The panic switch also benefits from dollar-based accounting. When the owner triggers a kill switch, Felix knows the target state is zero dollar exposure, or a specific cash level, across every market. It can flatten positions by converting the current dollar exposure into the necessary exit orders without asking the agent to calculate anything. The agent may lose money, including everything, when markets move, but the mechanical execution of the exit plan is precise.
This design is why dollar sizing is central to the guidance in How to set spend caps and drawdown limits for trading agents. The controls are only as strong as the unit they measure.
What does this mean for developers building agents?
Developers can write simpler prompts. Instead of instructing an agent to fetch contract specifications, compute multipliers, and round to tick sizes, the developer can say: allocate two hundred dollars to this market, reduce the position by fifty dollars, or rebalance to equal dollar weights. The agent reasons about capital, not mechanics.
This simplicity carries over to paper trading. An agent that paper trades with dollar sizing behaves identically when it goes live. The only change is that live orders require an authorized key and real money is at stake. The strategy logic does not change. The unit math does not change. See How paper trading changes when AI agents trade real money for a full discussion of the transition.
Developers building with MCP tools can expose a single place_order function that accepts a dollar amount. The underlying MCP server handles the translation. The agent sees a unified interface whether it is trading stocks or prediction markets. This is the practical benefit of the One API for every market design.
Prompt design also becomes safer. When the prompt is written in dollars, the safety controls are legible to both the agent and the owner. A developer can write: "You have a ten thousand dollar budget and a five hundred dollar maximum per trade." The agent can verify its own plan against those numbers before sending a request. For more on writing clear trading prompts, see How to design prompts for trading agents from first principles.
Developers can also write unit tests for their agents using dollar amounts. A test can assert that the agent requests exactly one hundred dollars under a given condition, without mocking the contract size of a specific venue. This makes test suites more stable and less brittle.
Finally, dollar sizing makes portfolio logic and reporting easier. An agent can target equal dollar weighting across ten markets. Without dollar sizing, equal weighting would require ten different unit calculations. With dollar sizing, the agent sends the same dollar amount to each and Felix handles the rest. An owner can review a trade history that shows dollar intent, dollar exposure, and dollar outcome in a single currency, without converting shares, contracts, or lots manually.
Frequently asked questions
Yes. Felix uses the limit price you specify to compute the correct unit count, so the dollar value of your intended fill matches your request. If the limit price moves before execution, the unit count stays fixed at what was calculated when the order was placed. The agent can always cancel and resubmit if the market moves significantly.
Felix rounds down to the nearest tradable unit and checks the venue's minimum notional threshold. If the requested dollar amount converts to a value below the minimum, Felix returns an error and does not send the order to the venue. The agent can then adjust the size or choose a different market.
No. The API accepts dollar amounts for order sizing to maintain the safety guarantees of the platform. Raw unit orders would bypass the budget caps and position limits that are enforced in dollar terms. This restriction is part of the non-custodial design that prevents agents from making uncontrolled mechanical errors.
It makes portfolio reporting simpler because every position is stored and displayed in its dollar exposure. The owner can see total capital at risk without converting shares, contracts, or lots manually. Historical logs also show dollar intent, dollar fill, and dollar PnL in a single currency.
No. The conversion is part of the core API and is included for all requests. There is no separate fee for translating dollar amounts into venue units. Trading fees from the underlying venue still apply as normal.
Yes. Paper trading uses the exact same dollar sizing logic as live trading. This means an agent can be tested for behavior, budget discipline, and strategy logic without any unit translation differences between simulation and real money.
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, choosing between a bot and an agent depends on whether you need fixed rules or adaptive reasoning across markets.
Algorithmic traders can deploy agents without giving up custody. Hard limits enforced by the infrastructure keep the agent inside boundaries the owner sets.