> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.drazill.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.drazill.com/_mcp/server.

# Paper vs live

Drazill gives you a true sandbox: **paper (test) keys** that exercise the real trading engine
against isolated, virtual balances. This lets you build and test a bot end to end before a
single real dollar is at risk.

## Two key classes

| Prefix       | Class        | Trades        | Endpoints                                                                 |
| ------------ | ------------ | ------------- | ------------------------------------------------------------------------- |
| `drzl_live_` | Live         | Real money    | The real-money API                                                        |
| `drzl_test_` | Test (paper) | Virtual money | Paper-routed; **`403 TEST_KEY_LIVE_ENDPOINT` on any real-money endpoint** |

Set a key's class at creation with `environment: "live" | "test"` (see
[Authentication](/authentication)). A key created with the `env:paper` scope is a paper key.

## What "isolated" means

Paper orders execute against the **real LMSR pricing engine** — so quotes, fills, and price
impact behave exactly as they would live — but they **do not modify real AMM state, order
books, or wallets.** All paper activity lives in separate `paper_*` tables
(`app/services/paper_trading_service.py`). Concretely:

* A paper trade **reads** the live price to quote realistically, but **never mutates** the
  canonical `amm_shares` price state that live trading uses.
* Paper positions, balances, and payouts are tracked in the paper tables only.
* A `drzl_test_` key is hard-rejected on real-money endpoints, so it is structurally
  incapable of touching real funds.

This is why a test key is the only key that is safe to run in less-trusted contexts, and the
only credential the interactive explorer on this site accepts.

## The sandbox flag

Test keys require the sandbox to be enabled on the environment
(`DEVELOPER_SANDBOX_ENABLED`). The state is **per environment**: staging and development
turn it on automatically when it is not pinned, and production keeps it off until the owner
arms it explicitly. So test keys are mintable on staging today, and staging is what the
interactive Explorer targets — see [Sandbox](/sandbox) for the table and
[Get an API key](/get-a-key) for the full flow.

## Webhooks follow the same split

Webhook endpoints are class-segregated by `livemode`. An endpoint created with
`livemode: false` receives **sandbox** events (your test-key / paper activity); a
`livemode: true` endpoint receives **live** events. **The two never cross.** See
[Webhooks](/webhooks/overview) and [Sandbox](/sandbox).

## Going live

When you're ready, mint a `drzl_live_` key with the scopes your integration needs, point your
client at the production base URL (`https://api.drazill.com`), and the same code runs against
real markets — subject to your scopes and the [compliance gate](/compliance).