Referral links

Drive traffic at /r/{code} with the swap direction encoded in the URL. Per-code afftax accrues automatically.

A second integration model alongside the signed Partner API: send traffic at a short URL that carries your reference code plus the intended swap direction. The visitor lands on the homepage with that pair pre-filled, and any order created in that browser session is attributed to your code — with no backend on your side.

URL contract

Template
https://0trace.io/r/{code}?from={FROM}&to={TO}

{code} is the public string from /v1/codes (the same code you use as the suffix in X-API-KEY: prefix.code). {FROM} and {TO} are asset IDs from /v1/currencies (e.g. btc, xmr, usdt_trc20). Both are optional; missing or unknown values fall back to the homepage defaults.

Example
https://0trace.io/r/desktop?from=usdt_trc20&to=btc

How traffic flows

  1. Visitor follows your link. We validate the code and the asset IDs, set an HMAC-signed cookie carrying partnerId and codeId, and 302 to the homepage with the requested pair pre-filled.
  2. The visitor proceeds through the standard swap flow. The cookie rides along on the order-create request.
  3. On order creation we re-validate the cookie against your enabled partner and enabled code, then attach attribution to the order. Earnings accrue against your account in real time.

Pairing with the XML rate feed

Most listing integrations pair this URL with our XML rate feed. Scrape the feed at /api/rates.xml; each <item> carries the asset IDs you substitute into the URL template per row.

Earnings model

Each code carries its own afftaxBps (your markup on top of the service fee). You set it when you create the code and can adjust it at any time from the cabinet. The new rate applies to orders created after the change; existing cookies do not need to expire.

A separate baseFeeShareBps (a share of the service fee itself) is available by agreement and adjusted by the operator on your partner record. It composes additively with the per-code afftaxBps when set.

Attribution lifetime

The cookie is HttpOnly, signed with HMAC-SHA256, and lives for 30 days. Last-touch model: a subsequent visit through a different partner’s link overwrites the cookie with the newer attribution. A cookie that survives past TTL or carries a now-disabled code is rejected at order-create time without partner credit.

Kill switch and rotation

Disable a code from /v1/codes/enable or the cabinet to stop new attributions immediately. Existing in-flight cookies stop earning the moment the code is disabled — re-enabling restores future earnings without re-issuing links. To retire a code permanently, disable it and issue a new one alongside.

Privacy

Bad codes, disabled codes, and unknown asset IDs all 302 to the homepage with no cookie set — the response is identical to a hit with no code at all. The cookie payload contains only opaque internal identifiers; no email, IP, or user-agent data is stored. The capture endpoint is per-IP rate limited to prevent enumeration.

Partner API.
Same engine as 0trace.

A private partner integration surface. Signed quotes, server-side pricing, webhook delivery, multiple reference codes, and a self-serve cabinet — all backed by the production exchange engine.

Support

Questions? Answers.

Get the latest updates

Follow us on X

The 0trace team will never ask for KYC or AML. We retain no logs, metadata, or tracking cookies.

Learn more