Skip to content

Referral

The referral system requires Privy authentication. Include a Privy Bearer token in the Authorization header. The verified wallet address must match the :address parameter.

Authorization: Bearer <privy_token>

Get Referral Code

GET /referral/:address

Gets or creates a referral code for the authenticated user.

bash
curl https://mainnet.api.ryze.pro/api/referral/0xYourAddress \
  -H "Authorization: Bearer <privy_token>"

Response 200

json
{
  "address": "0xyouraddress",
  "referralCode": "ABC123"
}
FieldTypeDescription
referralCodestring6-character alphanumeric code

Errors

CodeReason
403Authenticated wallet doesn't match :address
500Code generation failed

Register Referral

POST /referral/register

Register that you were referred by someone.

bash
curl -X POST https://mainnet.api.ryze.pro/api/referral/register \
  -H "Authorization: Bearer <privy_token>" \
  -H "Content-Type: application/json" \
  -d '{ "referralCode": "ABC123" }'

Request Body

FieldTypeRequiredDescription
referralCodestringYesReferrer's code (case-insensitive)

Response 200

json
{
  "success": true,
  "referrer": "0xreferreraddress"
}

If already referred:

json
{
  "success": true,
  "alreadyReferred": true,
  "referrer": "0xreferreraddress"
}

Errors

CodeReason
400Missing code, invalid code format, or self-referral
404Referral code doesn't exist

Referred Users

GET /referral/:address/referred

Lists users that this address has referred.

bash
curl https://mainnet.api.ryze.pro/api/referral/0xYourAddress/referred \
  -H "Authorization: Bearer <privy_token>"

Response 200

json
{
  "address": "0xyouraddress",
  "referredUsers": [
    {
      "address": "0xreferred1...",
      "createdAt": "2026-06-10T00:00:00.000Z",
      "rank": 1,
      "tradeVolumeUsd": 1730.66,
      "lpStakingUsdValue": 177033.85,
      "unitReceived": 0
    },
    {
      "address": "0xreferred2...",
      "createdAt": "2026-06-11T00:00:00.000Z",
      "rank": 2,
      "tradeVolumeUsd": 0,
      "lpStakingUsdValue": 44,
      "unitReceived": 0
    }
  ]
}

Errors

CodeReason
403Authenticated wallet doesn't match :address

Referral Status

GET /referral/:address/status

Returns whether the authenticated wallet is registered, whether new wallets must enter a code, and the caller's current daily referral cap.

bash
curl https://mainnet.api.ryze.pro/api/referral/0xYourAddress/status \
  -H "Authorization: Bearer <privy_token>"

Response 200

json
{
  "registered": true,
  "hasOwnCode": true,
  "wasReferred": true,
  "requireCodeForNewWallets": true,
  "cap": {
    "used": 4,
    "limit": 30,
    "remaining": 26,
    "tier": 2,
    "resetsAt": "2026-06-12T00:00:00.000Z"
  },
  "progress": {
    "volumeUsd": 1730.66,
    "lpUsd": 177033.85,
    "nextTier": {
      "volumeRequired": 1000000,
      "lpRequired": 500000
    }
  }
}

Cap Tiers

TierRequirementDaily Code Limit
0Below tier 12
1At least $10,000 volume or $5,000 LP10
2At least $100,000 volume or $50,000 LP30
3At least $1,000,000 volume or $500,000 LP50

Once a wallet reaches a tier, it keeps that tier. The daily code limit resets each UTC day; unused daily capacity does not roll over.