> 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.

# API Reference

This reference is generated from the same CI-gated OpenAPI contract the exchange is built
against, so it cannot drift from the code that serves your requests. Every operation is
versioned under the `/api/v1` prefix.

## How it's organized

The sidebar is eighteen groups, each holding a small number of collapsible folders — one per
resource area — so you can scan a group without reading past it.

| Group                                                 | What lives here                                                           |
| ----------------------------------------------------- | ------------------------------------------------------------------------- |
| **[Orders & Execution](/orders)**                     | Place, amend, and cancel orders; the public trade tape; the pro terminal. |
| **[Advanced Order Types](/advanced-orders)**          | Bracket, conditional, TWAP, trailing-stop, parlay, copy trading.          |
| **[Paper Trading](/paper-trading)**                   | The isolated paper rails.                                                 |
| **[Markets](/markets)**                               | Markets, outcomes, order books, price history, events, series, hubs.      |
| **[Sports & Crypto](/sports-crypto)**                 | The two themed verticals and live game state.                             |
| **[Data & Research](/data-research)**                 | Signals, transparency metrics, bulk datasets, search, news, fees.         |
| **[Wallet](/wallet)**                                 | CAD balance, transactions, deposits, withdrawals, positions.              |
| **[Portfolio & Risk](/portfolio-risk)**               | Hedging suggestions and institutional risk overlays.                      |
| **[Rewards & Growth](/rewards-growth)**               | Rewards, referrals, promos, giveaways, contests.                          |
| **[Authentication & Keys](/auth-keys)**               | Issue scoped API keys and inspect their usage.                            |
| **[Account & Compliance](/account-compliance)**       | Your account, preferences, privacy, the compliance gate.                  |
| **[Organizations](/organizations)**                   | Org accounts, members, plans, subscriptions.                              |
| **[Webhooks](/webhook-endpoints)**                    | Register endpoints and manage signed event delivery.                      |
| **[Profiles & Leaderboards](/profiles-leaderboards)** | Public profiles, follows, seasons, standings.                             |
| **[Community](/community)**                           | Comments, chat, disputes, moderation.                                     |
| **[Notifications & Alerts](/notifications-alerts)**   | In-app feed, web push, price alerts, watchlist.                           |
| **[Learn](/learn)**                                   | Lessons and coaching recommendations.                                     |
| **[Platform](/platform)**                             | Status, health, feature flags, the pinned spec.                           |

## Authentication in one line

Every authenticated request carries **one** header — an `X-API-Key` server key or an
`Authorization: Bearer` session token. There is no request-signing ceremony to learn.

API keys are class-tagged. A **`drzl_live_`** key trades real money on production; a
**`drzl_test_`** key trades paper money on the isolated sandbox rails and is the only class
you should ever put in a browser. A test key that calls a live-money endpoint is rejected
with `403 TEST_KEY_LIVE_ENDPOINT`.

## Try it safely

Every operation on this site is executable from its page through the interactive API
Explorer. Two guardrails make that safe on a real-money exchange:

* **Staging only.** The Explorer offers the **staging** environment
  (`https://staging.drazill.com`) and no other — production is never selectable, so a
  real-money call cannot be issued from a browser. (The reference itself still documents
  production as the primary base URL.)
* **Test keys only.** Authenticate the Explorer with a `drzl_test_` paper key. Money-moving
  operations carry an explicit warning on their group page.
* **The sandbox is a flag, not an assumption.** Test keys and the paper rails exist only
  where `DEVELOPER_SANDBOX_ENABLED` is on — staging turns it on automatically, production
  keeps it at its `False` default, and arming it there is an explicit owner action. An
  operator can pin it off for a staging window, and while it is off test keys cannot be
  minted and the paper endpoints are unavailable. See **[Sandbox](/sandbox)**.

> **Warning**
>
> Never paste a `drzl_live_` key into the Explorer, a browser, or any client you don't
> control. Use a `drzl_test_` paper key against staging.

> **Info**
>
> **Start here:** [Get an API key](/get-a-key) walks the whole path — mint a `drzl_test_`
> key on staging, paste it into the Explorer, and make a real call. Unauthenticated reads
> (for example `GET /api/v1/markets`) are executable in the Explorer right now with no key
> at all.
>
> Test keys are minted in the [developer dashboard](https://drazill.com/developers) when
> the sandbox is enabled on an environment (`DEVELOPER_SANDBOX_ENABLED`, an
> owner-controlled flag). Until it is switched on for staging, the end-to-end try-it flow
> is not yet live — this note will be removed once the flag is on.

## Code samples

Each operation shows a working snippet for the two official SDKs — `drazill` on
[PyPI](https://pypi.org/project/drazill/) and `drazill` on
[npm](https://www.npmjs.com/package/drazill) — alongside cURL. The snippets are generated
from the same operation metadata that names the SDK methods, so a method shown here exists
in the published package. See **[SDKs](/sdks/overview)**.

## Postman and other API clients

There is no separately-published Postman collection — and there doesn't need to be. Postman,
Insomnia, and Bruno all import an OpenAPI 3.1 document directly, and Drazill serves the
pinned contract at a stable public URL:

```
https://api.drazill.com/api/v1/openapi/v1.json
```

In Postman: **Import → Link →** paste that URL. You get a collection covering every operation
on this page, generated from the same document this reference renders — so it cannot drift
from the API, and re-importing picks up contract changes. The response is ETag-cached, so
send `If-None-Match` if you automate the fetch.

> **Warning**
>
> A collection imported this way defaults to the **production** base URL. Point its base URL
> at `https://staging.drazill.com` and use a `drzl_test_` key while you build — unlike the
> Explorer on this site, an external API client will happily issue a real-money call.