https://idxsolana.io/api/affiliate/register| Endpoint | POST https://idxsolana.io/api/affiliate/register |
|---|---|
| Description | This API enables website owners to join our affiliate program and earn IDX tokens for each unique visitor they refer to our platform. |
| Authentication | API key required for affiliate dashboard access. Initial registration requires no authentication. |
The request body should be a JSON object containing:
| Parameter | Type | Required | Description |
|---|---|---|---|
| website_url | String | Yes | URL of the partner website |
| String | Yes | Contact email for the affiliate account | |
| name | String | Yes | Name of the website or organization |
| wallet_address | String | Yes | Solana wallet address to receive IDX tokens |
| description | String | No | Brief description of your website |
| category | String | No | Website category (e.g., "crypto", "finance", "tech") |
| preferred_payout_frequency | String | No | Preferred payout frequency: "daily", "weekly", or "monthly" (default: "monthly") |
{
"website_url": "https://cryptoblog.example.com",
"email": "partner@example.com",
"name": "Crypto Blog Example",
"wallet_address": "8xDmhMtYZP6uqj64KxNbfcMxpzSKnCXrKvQVDfMpuQNM",
"description": "A blog about cryptocurrency and blockchain technology",
"category": "crypto",
"preferred_payout_frequency": "weekly"
}{
"status": 200,
"error": false,
"message": "Affiliate registration successful",
"data": {
"affiliate_id": "aff_12345",
"api_key": "idx_affkey_67890abcdef12345",
"referral_url": "https://idxsolana.io/ref/aff_12345",
"widget_code": "<script src='https://idxsolana.io/js/affiliate.js?id=aff_12345'></script>",
"reward_rate": {
"per_visitor": 0.1,
"per_signup": 5.0,
"currency": "IDX"
},
"dashboard_url": "https://idxsolana.io/affiliate/dashboard/aff_12345"
}
}{
"status": 400,
"error": true,
"message": "Invalid wallet address format",
"data": null
}fetch('https://idxsolana.io/api/affiliate/register', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"website_url": "https://cryptoblog.example.com",
"email": "partner@example.com",
"name": "Crypto Blog Example",
"wallet_address": "8xDmhMtYZP6uqj64KxNbfcMxpzSKnCXrKvQVDfMpuQNM",
"description": "A blog about cryptocurrency and blockchain technology",
"category": "crypto",
"preferred_payout_frequency": "weekly"
}),
})
.then(response => response.json())
.then(data => {
if (!data.error) {
// Store API key securely
localStorage.setItem('idx_affiliate_id', data.data.affiliate_id);
// Display widget code for the website owner to copy
document.getElementById('widget-code').textContent = data.data.widget_code;
// Show success message
alert('Successfully registered as an affiliate partner! Your referral URL is: ' + data.data.referral_url);
} else {
alert('Error: ' + data.message);
}
})
.catch(error => console.error('Error:', error));There are two ways to implement the affiliate tracking on your website:
Simply add the provided script tag to your website's header or footer. This will automatically track visitors and display a subtle IDX logo in the corner of your site.
<script src="https://idxsolana.io/js/affiliate.js?id=aff_12345"></script>
Share your unique referral link with your audience. When users click through, they'll be redirected to our platform and tracked as your referrals.
https://idxsolana.io/ref/aff_12345
You can also create custom banners or buttons that link to your referral URL. Here's an example of how to implement a promotional banner:
<div style="border: 1px solid #3b82f6; border-radius: 8px; padding: 20px; max-width: 500px; margin: 20px auto; background-color: #1e3a8a;">
<h3 style="color: #93c5fd; margin-top: 0; font-size: 18px;">Earn IDX Tokens with Crypto Trading</h3>
<p style="color: #e5e7eb; margin-bottom: 15px;">Join IDX Solana for seamless crypto trading and staking with lower fees.</p>
<a href="https://idxsolana.io/ref/aff_12345"
style="display: inline-block; background-color: #3b82f6; color: white; padding: 10px 20px;
text-decoration: none; border-radius: 4px; font-weight: bold;">
Join Now
</a>
</div>Join IDX Solana for seamless crypto trading and staking with lower fees.
| Action | Reward (IDX) | Requirements |
|---|---|---|
| Unique Visitor | 0.1 | User must stay on the site for at least 30 seconds |
| New Registration | 5.0 | User must complete email verification |
| First Deposit | 10.0 | Minimum deposit of $50 equivalent |
| Trading Volume | 0.01% of volume | User's trading activity for the first 3 months |
As you refer more users, you can advance through our tier structure to earn higher rewards:
0-50 active referred users
• Base reward rates
• Monthly payouts
51-200 active referred users
• 1.5x base reward rates
• Bi-weekly payouts
201+ active referred users
• 2x base reward rates
• Weekly payouts + bonus rewards
After registration, you can access your affiliate statistics programmatically through our Dashboard API.
GET https://idxsolana.io/api/affiliate/stats
{
"X-API-KEY": "your_api_key_here"
}| Parameter | Type | Required | Description |
|---|---|---|---|
| period | String | No | "day", "week", "month", or "all" (default: "month") |
| start_date | String | No | Start date in YYYY-MM-DD format |
| end_date | String | No | End date in YYYY-MM-DD format |
{
"status": 200,
"error": false,
"data": {
"period": "month",
"start_date": "2023-09-01",
"end_date": "2023-09-30",
"statistics": {
"total_visitors": 1458,
"unique_visitors": 876,
"registrations": 92,
"deposits": 37,
"total_earned": 246.82,
"pending_payout": 125.45,
"currency": "IDX"
},
"daily_breakdown": [
{
"date": "2023-09-01",
"visitors": 42,
"registrations": 3,
"earnings": 8.20
},
// Additional daily entries...
],
"tier_status": {
"current_tier": "Silver",
"active_referred_users": 124,
"next_tier": "Gold",
"users_needed_for_next_tier": 77
}
}
}