Get Referral
Returns the referral dashboard for the wallet that owns the authenticated subaccount. Includes the wallet's referral code (if active), the code the wallet was referred by, cumulative earnings, claimable balance, and a paginated list of referred wallets.
Endpoint
POST https://papi.synthetix.io/v1/tradeRequest
Request Format
{
"params": {
"action": "getReferral",
"subAccountId": "1867542890123456789",
"limit": 50,
"cursor": ""
},
"signature": {
"v": 28,
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
}
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | Request parameters wrapper |
params.action | string | Yes | Must be "getReferral" |
params.subAccountId | string | Yes | Subaccount ID used to authenticate and resolve the owner wallet |
params.limit | integer | No | Maximum number of referee entries to return. Server applies a default if omitted or zero. Must be non-negative |
params.cursor | string | No | Pagination cursor from a previous response's nextCursor field. Omit or pass an empty string for the first page |
signature | object | Yes | EIP-712 signature object |
Response
Success Response
{
"status": "ok",
"response": {
"referrerAddress": "0x742d35Cc6634C0532925a3b8D371d1c62a39b6e2",
"referralCode": "FRIEND50",
"referredByCode": "EARLYUSER",
"totalEarnedUsdt": "215.75",
"totalPaidUsdt": "90.25",
"claimableUsdt": "125.50",
"referees": [
{
"refereeAddress": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
"feesGeneratedUsdt": "10250.00",
"commissionEarnedUsdt": "51.25",
"referredAt": "2026-01-15T10:30:00Z"
}
],
"nextCursor": "eyJpZCI6MTIzNH0",
"dataAsOf": "2026-06-04T12:00:00Z"
},
"request_id": "5ccf215d37e3ae6d"
}Response Fields
| Field | Type | Description |
|---|---|---|
referrerAddress | string | Wallet address of the authenticated referrer (checksummed Ethereum address) |
referralCode | string | The active referral code issued to this wallet. Omitted from the response if the wallet has no active code |
referredByCode | string | The referral code this wallet used at attribution time. Always present as an explicit empty string "" when the wallet was never attributed or the original code is no longer active |
totalEarnedUsdt | string | Cumulative gross commissions earned across all referees, as a decimal string |
totalPaidUsdt | string | Total commissions already paid out to this wallet, as a decimal string |
claimableUsdt | string | Current balance available to claim via Claim Referral, as a decimal string |
referees | array | Paginated list of referred wallets and their contribution summaries |
referees[].refereeAddress | string | Wallet address of the referred user |
referees[].feesGeneratedUsdt | string | Total trading fees generated by this referee, as a decimal string |
referees[].commissionEarnedUsdt | string | Commission earned from this referee's activity, as a decimal string |
referees[].referredAt | string | ISO 8601 timestamp of when this referee was attributed to the referrer |
nextCursor | string | Cursor for the next page of referee results. Omitted when there are no further results |
dataAsOf | string | ISO 8601 timestamp indicating how recent the underlying referral data is. Omitted if not available |
Authentication
getReferral uses the standard SubAccountAction EIP-712 signing. The subaccount is used to resolve the owner wallet, which is the identity the referral dashboard is loaded for.
SubAccountAction Type Definition
const SubAccountActionTypes = {
SubAccountAction: [
{ name: "subAccountId", type: "uint256" },
{ name: "action", type: "string" },
{ name: "expiresAfter", type: "uint256" }
]
}Example Typed Data for getReferral
{
"types": {
"EIP712Domain": [
{ "name": "name", "type": "string" },
{ "name": "version", "type": "string" },
{ "name": "chainId", "type": "uint256" },
{ "name": "verifyingContract", "type": "address" }
],
"SubAccountAction": [
{ "name": "subAccountId", "type": "uint256" },
{ "name": "action", "type": "string" },
{ "name": "expiresAfter", "type": "uint256" }
]
},
"primaryType": "SubAccountAction",
"domain": {
"name": "Synthetix",
"version": "1",
"chainId": 1,
"verifyingContract": "0x0000000000000000000000000000000000000000"
},
"message": {
"subAccountId": "1867542890123456789",
"action": "getReferral",
"expiresAfter": "0"
}
}- No
noncefield is required —getReferralusesSubAccountActionsigning which does not include a nonce expiresAfteris optional; pass"0"or omit the field to indicate no expiry- The subaccount resolves to its owner wallet server-side; you do not need to supply the wallet address separately
- Use the
chainIdfor your target environment. See Environments for the domain configuration used on mainnet and testnet
Signing
All trading methods are signed using EIP-712. Each successful trading request will contain:
- A piece of structured data that includes the sender address
- A signature of the hash of that structured data, signed by the sender
For detailed information on EIP-712 signing, see EIP-712 Signing.
Pagination
Results are paginated using opaque cursor tokens.
- Omit
cursor(or pass an empty string) to retrieve the first page - When the response includes
nextCursor, pass that value ascursorin the next request to retrieve the following page - When
nextCursoris absent, the current page is the last page - Use
limitto control page size; the server applies a default if omitted
Validation Rules
subAccountIdmust be a valid subaccount owned by or delegated to the signing accountlimitmust be non-negative; omit or set to0to use the server defaultcursormust be a valid pagination cursor from a previous response, or an empty string
Error Handling
| Error Code | Description | Retryable |
|---|---|---|
UNAUTHORIZED | EIP-712 signature validation failed | No |
VALIDATION_ERROR | Request validation failed | No |
MISSING_REQUIRED_FIELD | Required field is missing | No |
INVALID_FORMAT | Field format is invalid | No |
INVALID_VALUE | Invalid parameter value | No |
RATE_LIMIT_EXCEEDED | Too many requests in time window | Yes |
INSUFFICIENT_MARGIN | Not enough margin for trade | No |
ORDER_NOT_FOUND | Order does not exist | No |
OPERATION_TIMEOUT | Operation timed out | Yes |
| HTTP Status | Description |
|---|---|
| 400 | limit must be non-negative — limit was negative |
| 400 | Invalid request body format |
| 404 | Subaccount not found or no referral record for the resolved wallet |
Related
- Apply Referral — Attribute a referral code to a wallet
- Claim Referral — Claim accrued referral commissions