Skip to main content
A referral pays referrer from the same trade. On a sell it applies only when you set a sell rate. Rates and the parameter table live on Fees. Signature payload types live on Self-custody signing. Send referral fields from your backend with x-app-api-key, alongside x-app-id and the user’s access token. The API key does not replace the user’s session. Never expose it in browser code.

Who pays

referralPayer is "user" (default) or "app". A user-paid referral is reserved from maxSpend and collected the same way as the app fee: on the amount actually filled. feeBreakdown.appFee is the maximum if the buy fills in full. feeBreakdown.referralFee is the user-paid referral. An app-paid referral is not a user cost. A partial fill pays the quoted referral amount. A failed fill pays nothing. You pay it from referralPayerAddress. Per-venue rates go in referrerFeeBipsByVenue. Hyperliquid charges 1 USDC to activate a referrer with no HyperCore account. On a self-custody Hyperliquid buy with a user-paid referral, referralActivationSponsorAddress names a wallet of yours that pays it instead, and its signature is listed with purpose: "hl_activation_sponsor". See Fees.

Poll past terminal

An app-paid payout can appear in pendingSignatures with purpose: "referral_payout" after the trade is already terminal, including for managed trades. When you requested an app-paid referral, continue polling for that payout after a successful fill. Read each request’s expiresAt; an unanswered request expires without undoing the trade.
Full shape on Get execution status. Submit the signature on Submit signatures for a pending self-custody fill. How to sign payload is Self-custody signing. On an EVM chain the request type is transaction and you send { stepId, txHash } after broadcasting. On HyperCore (1337) the type is eip712 and you send { stepId, signature }. Solana payouts are refused.
In self-custody the same pendingSignatures list also holds the trader’s requests. Skip a request whose signerAddress is not the wallet you hold.