Live market data. Simulated funds. The same integration path your users will use in production.
Choose The Right Surface
Usemode: "paper" when users should trade through the normal execution path
with a simulated account. Users sign in normally, request smart routes normally,
fill quotes normally, and read balances, positions, and orders from the same SDK
methods or API reference operations they use for live trading.
Use the paper account management APIs when
your backend needs to create, seed, reset, or inspect server-side paper accounts
for user simulators, QA, or automated test runs.
Product Patterns
Paper trading supports two common app patterns:| Pattern | What users see | What your app sends |
|---|---|---|
| User-facing paper trading | Users can switch between a real account and a paper account in the same production app. | mode: "paper" for paper balances, quotes, fills, positions, and orders. Live mode for the real account. |
| Staging and QA execution tests | Test users exercise the same order entry, profile, and account surfaces without risking funds. | The same SDK/API calls as production, with mode: "paper" and test-only app chrome. |
How It Works
User signs in
Paper mode is user-scoped. A signed-in user gets a paper account for your app the first time
they request paper balances, positions, quotes, or a fill.
AGG reads live market data
Smart routes and direct paper fills price against the current order book. The result is
simulated, but the quote quality reflects current market depth.
Your app sends paper mode
Add
mode: "paper" to custom SDK/API execution calls. For AGG UI surfaces, set
trading.executionMode once in AggProvider config so hosted pages and order panels share
the same paper account mode.UI Components
For AGG-hosted UI surfaces, set paper mode globally inAggProvider config.
HomePage, EventMarketPage, PlaceOrder, and UserProfilePage read this
provider setting when an explicit executionMode prop is not supplied.
executionMode directly when one surface must override the
provider default, for example a live-only panel inside a paper-mode app shell:
SDK Flow
If you build your own order entry, passmode: "paper" on each execution call.
The SDK methods below map to the same API reference operations used in live
mode:
| SDK method | API reference |
|---|---|
getManagedBalances({ mode: "paper" }) | Get balances |
getSmartRoute({ mode: "paper" }) | Compute order route |
executeManaged({ mode: "paper" }) | Execute quote |
getExecutionPositions({ mode: "paper" }) | Get user positions |
getExecutionOrders({ mode: "paper" }) | Get user orders |
Funding UI
Hide deposit, withdrawal, and redemption controls anywhere your user is in a paper-only experience. Paper accounts exposePAPER_USD and simulated
positions; they do not need wallet funding, bridge setup, venue account funding,
or settlement redemption.
Execution Testing Strategies
Paper trading is the recommended way to test your execution UX because it uses the same route, fill, order, position, and balance surfaces as live trading. For staging or CI smoke tests:- Sign in a test user through the normal auth flow.
- Read paper balances and assert
PAPER_USDis present. - Quote a current open market with
mode: "paper". - Fill the quote with
mode: "paper"and assert order IDs are returned. - Read paper orders and active paper positions and assert the fill is visible.
- Assert the paper cash balance changed after the fill.
- Attempt to fill a paper quote without
mode: "paper"and expect rejection. - Switch from paper to live mode and require a fresh quote before fill.
- Verify paper pages do not show deposit, withdrawal, bridge, or redemption actions.
- Verify live balances and paper balances are never combined in one total.
- Seed or reset the user paper account from your backend before the run.
- Use current market discovery when selecting test outcomes instead of hardcoding a single outcome ID that can age out.
- Store scenario-owned
clientOrderIdvalues when placing direct paper orders from your backend, so test logs can correlate fixtures to AGG orders.
Launch Checklist
- Decide whether paper trading is staging-only, production user-facing, or both.
- Render a clear paper account badge or account switcher in your app shell.
- Set
config.trading.executionMode = "paper"onAggProviderwhen the paper account is selected. - Use component-level
executionModeprops only for intentional per-surface overrides. - Pass
mode: "paper"to custom SDK calls for paper balances, routes, fills, positions, and orders. - Use live mode only after the user has explicitly selected their real account.
- Do not show deposit, withdrawal, or redemption flows as part of the paper account experience.
- Reset or seed account balances from your backend when a QA run needs a known starting state.
FAQ
Can I quote in paper mode and fill in live mode?
No. Quote and fill modes must match. This prevents a paper account flow from accidentally turning a simulated quote into a live venue submission.When is a user paper account created?
AGG creates the user-scoped paper account lazily the first time a signed-in user requests paper balances, positions, quotes, or a paper fill for your app.How do I reset or seed the paper balance?
Use the backend-only account management surface in Manage Paper Trading Accounts. Normal browser paper mode uses theuser:<aggUserId> external ID, so your backend can reset
the same account the user sees in the app.