Skip to main content
client.referral manages referral codes. Referrers earn a share of referred traders’ fees as claimable rebates; referred traders get a fee discount.
Referral actions are caller-scoped: they execute as the signing key’s own address and cannot be routed through a delegate/API key. Use your wallet key directly.

Register a code (as referrer)

register_code("MYCODE") is the non-gasless variant (direct calldata; you pay gas in direct mode).

Attach to a code (as trader)

Track and claim

client.info.referral_count(trader) and referred_fees(trader) give further detail.

Code administration

All take the usual wait=True and return an ExecutionReceipt.