Affiliate data API documentation

Authentication

Include your API key in every request as a header:

X-API-Key: YOUR_API_KEY

You get your API key when you register. It is shown once — save it somewhere safe.

GET /v1/affiliates

Returns your affiliate list, sorted by wagered amount (highest first).

Query Parameters

ParamDefaultDescription
limit100Items per page (max 1000)
offset0Skip this many items
searchFilter by username (partial match)

Response Headers

HeaderDescription
X-Data-FreshnessSeconds since the data was last synced from SolPump

Example

curl -H "X-API-Key: YOUR_KEY" \ "https://api.solpump.app/v1/affiliates?limit=50"

Response

{ "data": [ { "username": "player123", "wagered_sol": 42.5, "wagered_usd": 6375.0, "first_seen": "2025-01-15T...", "last_seen": "2025-02-07T..." } ], "pagination": { "total": 1250, "limit": 50, "offset": 0, "has_more": true }, "meta": { "synced_at": "2025-02-07T12:00:00Z", "sync_interval_minutes": 15, "next_sync_at": "2025-02-07T12:15:00Z" } }

wagered_usd may be null if USD conversion is unavailable. Results are sorted by wagered_sol descending.

GET /v1/affiliates/total

Returns aggregate totals across all your affiliates.

Example

curl -H "X-API-Key: YOUR_KEY" \ "https://api.solpump.app/v1/affiliates/total"

Response

{ "total_affiliates": 1250, "total_wagered_sol": 85420.75, "total_wagered_usd": 12813112.5, "last_sync": "2025-02-07T12:00:00Z", "sync_interval_minutes": 15 }
POST /v1/sync

Trigger an immediate sync from SolPump. Your data syncs automatically every 15 minutes, but you can use this to force a refresh. Limited to 1 manual trigger per 15 minutes.

Example

curl -X POST -H "X-API-Key: YOUR_KEY" \ "https://api.solpump.app/v1/sync"

Response

{ "message": "Sync started", "sync_id": 42, "check_status": "/v1/sync/42" }

Returns 429 if a sync is already running or the 15-minute cooldown hasn't elapsed.

GET /v1/sync/:id

Check the status of a sync job. Status is one of: running, success, or failed.

Example

curl -H "X-API-Key: YOUR_KEY" \ "https://api.solpump.app/v1/sync/42"

Response

{ "id": 42, "status": "success", "started_at": "2025-02-07T12:00:00Z", "completed_at": "2025-02-07T12:00:15Z", "affiliates_count": 1250, "total_wagered_sol": 85420.75, "error": null }

error contains the failure reason when status is "failed". completed_at is null while status is "running".

GET /v1/affiliates/status

Check your account status, sync health, and current refresh interval.

Example

curl -H "X-API-Key: YOUR_KEY" \ "https://api.solpump.app/v1/affiliates/status"

Response

{ "name": "BigStreamer", "sync": { "enabled": true, "interval_minutes": 15, "last_sync_at": "2025-02-07T12:00:00Z", "next_sync_at": "2025-02-07T12:15:00Z", "consecutive_failures": 0 }, "data": { "total_affiliates": 1250, "total_wagered_sol": 85420.75 }, "latest_sync_log": { "id": 42, "status": "success", "started_at": "2025-02-07T12:00:00Z", "completed_at": "2025-02-07T12:00:15Z", "affiliates_count": 1250, "error": null } }

Use sync.interval_minutes to know how often your data refreshes. If consecutive_failures is rising, your JWT may have expired.

Errors

All errors return a JSON object with an error field:

{ "error": "Description of what went wrong" }
StatusMeaning
401Invalid or missing API key
429Rate limited — too many requests or sync cooldown active
404Sync job not found
500Server error

Notes