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

# Drazill API

Drazill is a Canadian, real-money prediction-market exchange. Markets are priced by
a hybrid engine that runs a central limit order book and an LMSR automated market
maker over one shared price state, so every quote you read and every fill you take
comes from the same source of truth.

This site is the canonical developer documentation for the public Drazill API. It is
generated from the same CI-gated contract that the exchange itself is built against,
so the reference here cannot drift from the code that serves your requests.

#### [API Reference](/api-reference)

Every REST operation, rendered from the versioned OpenAPI contract with an
interactive request explorer.

#### [Realtime](/realtime/overview)

Subscribe to live prices, fills, and market events over the WebSocket feed.

#### [Webhooks](/webhooks/overview)

Receive signed, retried server-to-server events for the things your integration
can't afford to poll for.

#### [Changelog](/changelog/overview)

Dated, versioned API changes with deprecation notices ahead of every breaking
change.

## Base URLs

The API is versioned. Every endpoint below lives under the `/api/v1` prefix.

| Environment | Base URL                      | Use it for                                                                |
| ----------- | ----------------------------- | ------------------------------------------------------------------------- |
| Production  | `https://api.drazill.com`     | Live, real-money trading with `drzl_live_` keys.                          |
| Staging     | `https://staging.drazill.com` | Integration testing and the try-it explorer with `drzl_test_` paper keys. |

## Authentication

Every request authenticates with **one** of two credentials, sent in a header:

* **API key** — `X-API-Key: <your key>`. Server-to-server credentials you issue in the
  [developer dashboard](https://drazill.com/developers). Keys are class-tagged:
  `drzl_live_` keys trade real money on production; `drzl_test_` keys trade paper
  money and are the only keys you should ever use in a browser.
* **Bearer token** — `Authorization: Bearer <jwt>`. First-party session tokens, for
  user-context calls.

> **Warning**
>
> Drazill settles real money. Never paste a `drzl_live_` key into a browser, a
> notebook you share, or any client you don't control. The interactive explorer on
> this site targets **staging** and is built for `drzl_test_` keys only.

## SDKs

Official Python and TypeScript SDKs mirror the contract one-to-one. They are
currently installed from source while their public release clears legal review — the
[API Reference](/api-reference) covers the contract honestly rather than pointing you at a
registry that isn't live yet.

> **Info**
>
> Prefer HTTP directly? The full contract is downloadable and pinned at
> `GET https://api.drazill.com/api/v1/openapi/v1.json` (ETag-cached), so you can
> generate your own client against a versioned, stable spec.