Pull your referral stats over REST: who signed up, what they deposited and traded, and exactly what you earned. Everything the affiliate dashboard shows, in JSON.
An affiliate key (mtx_aff_…) is read-only. It cannot trade, cannot move money, and sees only your own referrals. Base URL https://trade.mutex.trade.
You need an active affiliate code before a key can be issued - without one, key generation is 403. Claim yours on the affiliate dashboard.
In the app, open Settings, then the API tab, and generate the affiliate key. It is shown once - the plaintext secret exists only in that response, so copy it then (mtx_aff_…).
There is one active key per user. Regenerating revokes the old one and replaces it; revoking is immediate. Keys never expire on their own.
Check it's wired up:
curl https://trade.mutex.trade/v1/key \
-H "Authorization: Bearer mtx_aff_…"
# {"kind":"affiliate","display_prefix":"mtx_aff_a1b2","bot":null,"created_at":1721480400000}bot is null on affiliate keys - they are not bound to a sub-account. Presenting one on a trading route is 403 wrong_key_kind; a mtx_bot_ key here is 403 wrong_key_kind.
curl "https://trade.mutex.trade/v1/affiliate/summary?from=2026-07-01&to=2026-07-31" \
-H "Authorization: Bearer mtx_aff_…"
# {"from":"2026-07-01","to":"2026-07-31",
# "signups":42,"depositors":18,"deposits_total":"91500",
# "traders":11,"volume_total":"2450000","commission_total":"30.051",
# "by_avenue":{"spot":"0.04","perps":"0.011","bots":"0","farm":"0",
# "prop_purchase":"30","prop_profit":"0"}}commission_total is ledger-exact - it is summed from the commission ledger, not recomputed. volume_total and deposits_total are window-intersected through your attributions, so they answer “activity by users attributed to me, inside this window”.
curl "https://trade.mutex.trade/v1/affiliate/referrals?limit=50" \
-H "Authorization: Bearer mtx_aff_…"
# {"referrals":[{"user":"3f2a…-uuid","code":"WERNER",
# "signup_at":1721480400000,"attributed_at":1721480400000,
# "first_deposit_at":1721566800000,"deposits_total":"5000",
# "first_trade_at":1721570400000,"volume":"128000",
# "commission":"96.40"}],"next_before":"…"}One row per referred user, newest first. user is the full Mutex user id - feed it back as ?user= on referrals or daily to drill into that one referral. *_at fields are Unix ms or null; amounts are decimal strings.
Page with the cursor: pass the response's next_before back as ?before= until it comes back null. Default window is epoch → today, uncapped.
curl "https://trade.mutex.trade/v1/affiliate/daily?from=2026-07-01&to=2026-07-31&limit=100" \
-H "Authorization: Bearer mtx_aff_…"
# {"daily":[{"day":"2026-07-31","user":"3f2a…-uuid",
# "volume":"12800","commission":"9.64",
# "by_avenue":{"spot":"9.64","perps":"0","bots":"0","farm":"0",
# "prop_purchase":"0","prop_profit":"0"}}],
# "next_before":"…"}UTC-day buckets, newest first, one row per (day, user). The window is capped at 90 days here - a wider range is 400 invalid_request. The cursor is the opaque (day, user) pair; page it the same way.
| Endpoint | Returns | Query |
|---|---|---|
| GET /v1/affiliate/referrals | One row per referred user, newest first. | from · to · user · limit · before |
| GET /v1/affiliate/summary | Window totals: signups, depositors, volume, commission. | from · to |
| GET /v1/affiliate/daily | Per-day-per-user volume and commission (UTC day buckets). | from · to · user · limit · before |
from and to are inclusive UTC days, YYYY-MM-DD. limit is 1–100 (default 25). user narrows referrals and daily to a single referred user id.
by_avenue splits commission by where it was earned. All six keys are always present - "0" when nothing was earned there - so you never need the list to render an empty row. The values sum exactly to the commission_total / commission beside them.
| Avenue | Earned from |
|---|---|
| spot | Spot trading fees. |
| perps | Perp trading fees. |
| bots | Bot trading fees. |
| farm | Farm fees. |
| prop_purchase | Prop challenge fees, paid when the challenge settles. |
| prop_profit | The house part of each funded payout, paid at the prop challenge rate. |
The house part of a funded payout is the profit less the trader's split. Its share earns at your prop_purchase rate, and none of it is rebated to the referred trader.
options is present, at "0" when empty, while Options is on. Other keys appear only when they carry money: arena once it earns, prediction (a share of the MUTEX fee on Predictions, credited when the fee is collected) once it earns, prop_trading for history only (prop trading pays no commission), and unknown if a share was booked without an avenue. Volume has no avenue and is never split.
Volume is routed-order volume (perps plus spot), not filled volume.
Predictions volume is a field of its own on the summary, prediction_volume, present while Predictions is on: each closed buy or sell by your referred users in the window, at what its fills cost. It is not part of volume_total.
Options volume is a field of its own too, options_volume, present while Options is on: the position's value, the coin's price times the size, on each open and close by your referred users in the window. It is not part of volume_total.
Affiliate routes sit in the reads bucket: 300 / min per key, fixed 1-minute window. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; over the limit is 429 rate_limited plus Retry-After. Sustained flooding auto-suspends the key.
Errors are an honest HTTP status plus { "error": { "code", "message" } }. Match on code, not prose.
| Code | HTTP | Meaning |
|---|---|---|
| service_disabled | 403 | The affiliate API is not enabled. |
| missing_key | 401 | No Authorization: Bearer. |
| invalid_key | 401 | Unknown or malformed key. |
| wrong_key_kind | 403 | The key kind does not fit the route: a trading (mtx_bot_) key here, or this key on a trading route. |
| key_suspended | 403 | Auto-suspended for abuse; retry after the window. |
| account_suspended | 403 | The owning user is disabled. |
| invalid_request | 400 | Bad window or params - e.g. daily beyond 90 days. |
| rate_limited | 429 | Reads bucket exhausted; see Retry-After. |
| internal_error | 500 | Unexpected; safe to retry. |
Payouts, claiming codes, changing your split, and anything that moves money - those stay in the web app. This key reads. Full request/response schemas live in the interactive reference under the Affiliate tag.