Skip to main content

Referral Dashboard

Returns the referrer's comprehensive earnings data, including tier information and recent activity.

GET /referral/dashboard
Authorization: Bearer <token>

Response

{
"code": "4DDDC2D4",
"total_referrals": 8,
"active_referrals": 3,
"total_referred_volume": "52000.00",
"total_earnings": "125.50",
"pending_earnings": "45.00",
"claimed_earnings": "80.50",
"tier": {
"level": 1,
"name": "Bronze",
"commission_rate": "0.12",
"rate_bps": 1200,
"next_tier_referrals": 20,
"next_tier_volume": "100000.00"
},
"recent_activity": [
{
"referral_address": "0xabc...",
"event_type": "trade",
"volume": "10000.00",
"commission": "1.50",
"timestamp": 1771900000000
}
],
"bound_referral": null
}

When the user has not yet reached the Starter threshold, tier is null:

{
"code": "4DDDC2D4",
"total_referrals": 0,
"active_referrals": 0,
"total_referred_volume": "0.00",
"total_earnings": "0.00",
"pending_earnings": "0.00",
"claimed_earnings": "0.00",
"tier": null,
"tier_note": "Minimum rebate threshold not reached. Requirements: ≥1 referred user AND referred users' cumulative volume ≥ $1,000",
"recent_activity": [],
"bound_referral": null
}

Response Fields

FieldTypeDescription
codestring | nullUser's referral code
total_referralsint64Total number of referred users
active_referralsint64Number of active referees (recently traded)
total_referred_volumeDecimalCumulative trading volume of all referees (USD)
total_earningsDecimalTotal lifetime earnings (USDT)
pending_earningsDecimalUnclaimed earnings (USDT)
claimed_earningsDecimalAlready claimed earnings (USDT)
tierobject | nullTier info; null if Starter threshold not yet reached
tier_notestringOnly present when tier is null; describes the unmet threshold

tier

null when the user has not yet met the Starter threshold.

FieldTypeDescription
levelintTier level (0–4)
namestringTier name (Starter/Bronze/Silver/Gold/Diamond)
commission_ratestringCommission rate as decimal (e.g., "0.12" = 12%)
rate_bpsintCommission rate in basis points (1 bps = 0.01%)
next_tier_referralsint | nullReferrals needed for next tier; null if Diamond
next_tier_volumestring | nullReferred users' cumulative volume needed for next tier (USD); null if Diamond

recent_activity[]

FieldTypeDescription
referral_addressstringReferee's wallet address
event_typestringEvent type (e.g., "trade")
volumeDecimalTrade volume (USD)
commissionDecimalCommission earned (USDT)
timestampint64Event timestamp (milliseconds)

bound_referral

FieldTypeDescription
codestringReferral code bound to
referrer_addressstringReferrer's wallet address
bound_atint64Binding timestamp (milliseconds)

bound_referral is null if the user is not bound to any referrer.

Tier Levels

LevelNameCommission RateBPSMin Referrals (AND)Min Referred Volume (AND)
0Starter10%1000≥ 1≥ $1,000
1Bronze12%1200≥ 5≥ $10,000
2Silver17%1700≥ 20≥ $100,000
3Gold22%2200≥ 50≥ $500,000
4Diamond25%2500≥ 100≥ $2,000,000

Both conditions must be satisfied simultaneously to reach a tier. Users who have not met the Starter threshold have tier: null in the response.

Tiers are recalculated automatically by the backend as referees trade.

Code Examples

Python

import requests

BASE_URL = "https://api.ztdx.io"
JWT_TOKEN = "your_jwt_token"

resp = requests.get(
f"{BASE_URL}/referral/dashboard",
headers={"Authorization": f"Bearer {JWT_TOKEN}"},
)
data = resp.json()

print(f"Code: {data['code']}")
print(f"Total referrals: {data['total_referrals']}, Active: {data['active_referrals']}")
print(f"Earnings — Total: {data['total_earnings']}, Pending: {data['pending_earnings']}, Claimed: {data['claimed_earnings']}")
if data['tier']:
print(f"Tier: {data['tier']['name']} (Level {data['tier']['level']}), Commission: {data['tier']['commission_rate']}")
else:
print(f"No tier yet — {data.get('tier_note', '')}")

for act in data["recent_activity"]:
print(f" {act['event_type']}: vol={act['volume']} commission={act['commission']}")