API Reference

Every REST operation on the Drazill exchange, rendered from the versioned OpenAPI contract.

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.

GroupWhat lives here
Orders & ExecutionPlace, amend, and cancel orders; the public trade tape; the pro terminal.
Advanced Order TypesBracket, conditional, TWAP, trailing-stop, parlay, copy trading.
Paper TradingThe isolated paper rails.
MarketsMarkets, outcomes, order books, price history, events, series, hubs.
Sports & CryptoThe two themed verticals and live game state.
Data & ResearchSignals, transparency metrics, bulk datasets, search, news, fees.
WalletCAD balance, transactions, deposits, withdrawals, positions.
Portfolio & RiskHedging suggestions and institutional risk overlays.
Rewards & GrowthRewards, referrals, promos, giveaways, contests.
Authentication & KeysIssue scoped API keys and inspect their usage.
Account & ComplianceYour account, preferences, privacy, the compliance gate.
OrganizationsOrg accounts, members, plans, subscriptions.
WebhooksRegister endpoints and manage signed event delivery.
Profiles & LeaderboardsPublic profiles, follows, seasons, standings.
CommunityComments, chat, disputes, moderation.
Notifications & AlertsIn-app feed, web push, price alerts, watchlist.
LearnLessons and coaching recommendations.
PlatformStatus, 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.

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.

Start here: Get an API 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.

Code samples

Each operation shows a working snippet for the two official SDKs — drazill on PyPI and drazill on npm — 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.

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.

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.