MUTEX
Developers

Docs

Three developer surfaces. The two REST APIs share one base URL (https://trade.mutex.trade) and one auth scheme. Every endpoint shape is in 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>. These docs cover two kinds, both issued display-once in the web app:

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

A trading key on an affiliate route is 403 wrong_key_kind, and so is an affiliate key on a trading route. Public market data (/v1/markets, /v1/candles) needs no key at all:

curl https://trade.mutex.trade/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

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