Sandbox

A full paper-trading environment on the real engine — mint a test key, trade virtual money, reset, and receive sandbox webhooks.

The sandbox lets you build and test an integration end to end with zero real-money risk. It is not a mock: paper orders run on the real LMSR pricing engine against isolated virtual balances (Paper vs live).

Where the sandbox is on

The sandbox is gated by DEVELOPER_SANDBOX_ENABLED, and the flag’s state is per environment:

EnvironmentSandboxWhy
Staging (https://staging.drazill.com)OnStaging (and development) turn it on automatically when the flag is not pinned — apply_staging_demo_product_defaults, app/core/config.py.
Production (https://api.drazill.com)OffProduction keeps every such flag at its False default; arming one there is an explicit owner action.

So the end-to-end flow on this page — mint a drzl_test_ key, trade paper, receive sandbox webhooks — works on staging today, which is exactly the environment the interactive API Explorer targets. Start at Get an API key.

An operator can still pin the flag off for a specific staging window (DEVELOPER_SANDBOX_ENABLED=false). When it is off, test keys cannot be minted, the paper endpoints are unavailable, and the dashboard mints live-class keys only.

Mint a test key

Create a key with environment: "test" (or request the env:paper scope). It carries the drzl_test_ prefix. As with any key, the full secret is shown once — store it.

POST /api/v1/api-keys
1{ "name": "My bot (sandbox)", "environment": "test" }

Paper routing

With a drzl_test_ key, the ordinary trading endpoints route onto the paper engine:

You callWith a test key
Trading endpoints (place/cancel orders)Execute as paper trades on isolated paper_* state
Market dataSame real market data as live
A real-money endpoint (e.g. a live deposit/withdrawal)403 TEST_KEY_LIVE_ENDPOINT — a paper key can never touch real funds

Reset

Paper state is yours to reset while iterating (paper positions, balances, and orders live in the isolated paper tables). Fund a fresh paper balance from the staging test-deposit flow and start clean — nothing you do in the sandbox affects real markets or real wallets.

Sandbox webhooks

Webhook endpoints are segregated by livemode. Register an endpoint with livemode: false to receive sandbox events driven by your test-key / paper activity; livemode: true endpoints receive live events. The two streams never cross, so you can wire and verify your webhook handler entirely against paper traffic before going live. See Webhooks.

When you’re ready to go live

Mint a drzl_live_ key, point at https://api.drazill.com, and run the same code against real markets — subject to your scopes and the compliance gate.