Referral links
Drive traffic at /r/{code} with the swap direction encoded in the URL. You earn your revenue share automatically.
A second integration model alongside the signed Partner API: send traffic at a short link. Your default referral link is ready the moment your cabinet is — no code required. The visitor lands on the homepage, and any order created in that browser session is attributed to you — with no backend on your side. Optional codes let you split traffic by channel.
URL contract
https://0trace.io/r/{code}?from={FROM}&to={TO}{code} is either your default referral id (shown in your cabinet — the simplest link, no setup) or the public string of a code from /api/v1/codes (the same code you use as the suffix in X-API-KEY: prefix.code). {FROM} and {TO} are asset IDs from /api/v1/currencies (e.g. btc, xmr, usdt_trc20). Both are optional; missing or unknown values fall back to the homepage defaults.
https://0trace.io/r/8f3kd0aZ91xQ?from=usdt_trc20&to=btchttps://0trace.io/r/desktop?from=usdt_trc20&to=btcHow traffic flows
- Visitor follows your link. We resolve it — your referral id, or a code — to your partner and the asset IDs, set an HMAC-signed cookie carrying
partnerId(pluscodeIdwhen it is a code link), and 302 to the homepage with the requested pair pre-filled. - The visitor proceeds through the standard swap flow. The cookie rides along on the order-create request.
- On order creation we re-validate the cookie: your partner must be enabled, and — for a code link — the code must be enabled too. We 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
Referral traffic earns your revenue share of our service fee. The visitor sees our live rate — your share comes out of our fee, not theirs. The exact percentage is set on your partner record and shown in your cabinet.
Markup — your own margin on top of our rate — applies only to the signed API (X-API-KEY: prefix.code), where you render the marked-up rate in your own interface. It is not applied to referral-link traffic.
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, belongs to a disabled partner, or carries a now-disabled code is rejected at order-create time without partner credit.
Kill switch and rotation
Your default referral link follows your partner status: it earns whenever your account is enabled and stops the moment the operator disables it. Code links add per-channel control on top — disable a code from /api/v1/codes/enable or the cabinet to stop new attributions for that channel immediately. Existing in-flight cookies stop earning the moment the code (or your partner) 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.