Skip to content

Claim Referral

Claim accrued referral commissions for the authenticated wallet. The referrer wallet is derived from the EIP-712 signature — no explicit address field is required or accepted.

Unlike most trade endpoints, claimReferral does not use a top-level { v, r, s } signature or nonce. The EIP-712 signature is passed as a 0x-prefixed hex string inside params.

Endpoint

POST https://papi.synthetix.io/v1/trade

Request

Request Format

{
  "params": {
    "action": "claimReferral",
    "expiresAfter": 1704067500,
    "signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12"
  }
}

Request Parameters

ParameterTypeRequiredDescription
paramsobjectYesRequest parameters wrapper
params.actionstringYesMust be "claimReferral"
params.expiresAfterintegerYesSignature expiry as a Unix timestamp in seconds; must be in the future and within 5 minutes of the current server time
params.signaturestringYes0x-prefixed hex encoding of the EIP-712 signature over the ClaimReferralPayout typed data

:::info Owner key required claimReferral must be signed with the wallet owner key. The recovered signer is used as the canonical referrer identity — signing with a delegate key would attempt to claim on behalf of the delegate address, not the account owner. :::

Response

Success Response

{
  "status": "ok",
  "response": {
    "payoutId": "4892034750123456789",
    "amountUsdt": "125.50",
    "status": "confirmed"
  },
  "request_id": "5ccf215d37e3ae6d"
}

Response Fields

FieldTypeDescription
payoutIdstringUnique payout identifier, serialized as a decimal string to preserve precision for JavaScript clients
amountUsdtstringAmount credited in USDT, as a decimal string (for example "125.50")
statusstringPayout status — "confirmed" on a successful claim

Authentication

EIP-712 Signature

claimReferral uses a dedicated EIP-712 primary type ClaimReferralPayout. The signed payload contains only expiresAfter. The signer of the signature is the wallet whose commissions are being claimed.

ClaimReferralPayout Type Definition

const ClaimReferralPayoutTypes = {
  ClaimReferralPayout: [
    { name: "expiresAfter", type: "uint256" }
  ]
}

Example Typed Data for ClaimReferralPayout

{
  "types": {
    "EIP712Domain": [
      { "name": "name", "type": "string" },
      { "name": "version", "type": "string" },
      { "name": "chainId", "type": "uint256" },
      { "name": "verifyingContract", "type": "address" }
    ],
    "ClaimReferralPayout": [
      { "name": "expiresAfter", "type": "uint256" }
    ]
  },
  "primaryType": "ClaimReferralPayout",
  "domain": {
    "name": "Synthetix",
    "version": "1",
    "chainId": 1,
    "verifyingContract": "0x0000000000000000000000000000000000000000"
  },
  "message": {
    "expiresAfter": "1704067500"
  }
}
Important notes:
  • Serialize the signed payload to params.signature as a single 0x-prefixed hex string (standard Ethereum signature bytes), not as a top-level { v, r, s } object
  • expiresAfter is encoded as a decimal string in the EIP-712 message (matching the uint256 type encoding)
  • expiresAfter must be a future Unix second timestamp and no more than 5 minutes ahead of current server time
  • There is no nonce field — replay protection relies on the 5-minute validity window and a per-referrer 24-hour claim cooldown enforced server-side
  • A leaked signature can be replayed at most once before the 24-hour cooldown blocks further claims
  • Use the chainId for your target environment. See Environments for the domain configuration used on mainnet and testnet

For general EIP-712 background, see EIP-712 Signing.

Validation Rules

  • expiresAfter must be a positive integer representing a future Unix timestamp in seconds
  • expiresAfter must be within 5 minutes of the current server time
  • params.signature must be a valid EIP-712 signature over the ClaimReferralPayout typed data, passed as a 0x-prefixed hex string inside params
  • Wallet must have a claimable balance above the minimum payout threshold
  • A 24-hour cooldown applies between successful claims per referrer wallet

Error Handling

Error CodeDescriptionRetryable
UNAUTHORIZEDEIP-712 signature validation failedNo
VALIDATION_ERRORRequest validation failedNo
MISSING_REQUIRED_FIELDRequired field is missingNo
INVALID_FORMATField format is invalidNo
INVALID_VALUEInvalid parameter valueNo
RATE_LIMIT_EXCEEDEDToo many requests in time windowYes
INSUFFICIENT_MARGINNot enough margin for tradeNo
ORDER_NOT_FOUNDOrder does not existNo
OPERATION_TIMEOUTOperation timed outYes
ErrorHTTP StatusDescription
expiresAfter is required and must be a future unix-second timestamp400expiresAfter is missing, zero, or in the past
signature is required400params.signature is missing or blank
signature verification failed401Signature is invalid or expiresAfter exceeds the 5-minute validity window
No claimable balance / below minimum400Wallet has no accrued commissions or the balance is below the minimum payout threshold
Claim cooldown active429A claim was already made within the last 24 hours; see nextEligibleAt in the error response for the next eligible claim time

Cooldown Response

When a claim is rejected due to the cooldown period, the response includes a nextEligibleAt field in the error details:

{
  "status": "error",
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "claim cooldown active",
    "details": {
      "nextEligibleAt": "2026-06-05T12:00:00Z"
    }
  },
  "request_id": "5ccf215d37e3ae6d"
}

Related

  • Apply Referral — Attribute a referral code to a wallet
  • Get Referral — View referral dashboard, claimable balance, and referee list