MUTEX
Docs
Home
Developers

Docs

Three developer surfaces, one base URL (https://trade.mutex.exchange) and one auth scheme. Every endpoint shape is generated from the live OpenAPI spec - the pages below are the narrative, the reference is the truth.

Open interactive reference live OpenAPI spec · always in sync with the deployed API
Shared

One key, one scope

Every authed route takes Authorization: Bearer <key>. There are two kinds, both issued display-once in the web app:

  • mtx_bot_… - a trading key, bound one-to-one to a single API-type bot sub-account.
  • mtx_aff_… - an affiliate key, read-only over your own referral stats.

Using one where the other belongs is 403 wrong_key_kind. Public market data (/v1/markets, /v1/candles) needs no key at all:

curl https://trade.mutex.exchange/v1/markets
Shared

Wire conventions

  • Numbers are decimal strings on output ("0.5"); inputs accept strings or JSON numbers.
  • Timestamps are Unix milliseconds, except affiliate day buckets, which are YYYY-MM-DD UTC days.
  • Errors are an honest HTTP status plus { "error": { "code", "message" } }. Match on code, never on prose.
  • Lists paginate by cursor: pass a response's next_before back as ?before= until it returns null.
Shared

No API moves money

Neither key can deposit, withdraw, swap or transfer, and neither can touch your main perp account. Funding, payouts and settings stay in the web app on purpose - the blast radius of a leaked key is one bot's balance, or read-only referral stats.