Skip to main content
GET
Get the referral code for an address
The response body shown here is a static example, not live data. After you click Send, your live result appears in a separate panel headed 200 OK. The panel under the status-code tabs is a fixed sample from the spec — its field values (fees, prices, sizes, IDs, timestamps) are placeholders. Use Send, or call the endpoint, for current values.
Lightweight code-only read: returns { address, code, isAffiliate } from a single database point read — none of the volume, commission, or fee-tier enrichment that GET /v1/affiliate/info performs. Intended for UI surfaces that only need the code (e.g. an “Invite Friends” / copy-referral-link control) and may poll on every session. Unlike /info, “not an affiliate” is a valid empty state served as 200 with code: "" and isAffiliate: false — never a 404 — so callers don’t have to overload the 404 status. Public — no X-API-Key, no signature.

Query Parameters

address
string
required

Ethereum address to look up. 20-byte EVM address as hex: optional 0x or 0X prefix and exactly 40 hexadecimal digits. API responses normalize to lowercase af after 0x.

Pattern: ^(0x|0X)?[0-9a-fA-F]{40}$

Response

Referral code lookup result (including the non-affiliate empty state).

address
string
required

20-byte EVM address as hex: optional 0x or 0X prefix and exactly 40 hexadecimal digits. API responses normalize to lowercase af after 0x.

Pattern: ^(0x|0X)?[0-9a-fA-F]{40}$
code
string
required

The address's referral code. Empty string when the address is not a registered affiliate, or is an affiliate whose code was revoked / never created.

isAffiliate
boolean
required

True when the address has an affiliate state row (registered affiliate), regardless of whether it currently owns a code. False for addresses that never registered — served as 200, not 404, so clients can poll cheaply without treating the common "not an affiliate" case as an error.