Swapoon API
Public endpoints for assets and rates, plus an authenticated Affiliate API.
Introduction
The Swapoon API has two parts. The public endpoints are read-only and require no authentication — they list supported assets and current rates. The Affiliate API is authenticated with a key and lets you create real swaps that are automatically credited to your affiliate account. All endpoints live under the base URL below and return JSON.
Response format
Public endpoints wrap their payload in a success/data envelope. The Affiliate API returns a flat object with an ok boolean and the relevant fields at the top level.
Public endpoints
List of supported assets, with limits and decimals.
Current exchange rates (cached). Base asset is XMR.
Affiliate API
Overview
The Affiliate API lets you integrate Swapoon into your own site or app. Every swap you create through it is automatically credited to your affiliate account — you earn 0.5% of each completed swap's volume, paid manually in Monero. Generate your API key from your affiliate dashboard.
Authentication
Pass your secret key as a Bearer token on every request. Keep it private — it can create real swaps. If a key leaks, revoke and regenerate it from your dashboard (the old key stops working immediately).
Only the key's hash is stored server-side. The full key is shown once, at creation.
Supported tokens with their keys, symbols, chains and decimals.
Quote for a pair. Query params: from, to (token keys from /coins), amount (human units).
Create a real swap, credited to your account. Body (JSON): from, to, amount, to_address, and optional refund_address. Send the deposit to the returned address.
Creates a real transaction with real funds. Double-check to_address — swaps are irreversible.
Every order is signed with our Ed25519 key the moment it is created. Pass the guarantee block on to your users so they can verify offline that the order genuinely came from Swapoon. It attests to the order's authenticity, not to a payout.
Status of one of your swaps. Only swaps created with your key are visible.
Statuses: awaiting_deposit, deposit_detected,
deposit_confirmed, exchanging, sending,
completed, expired, refunded.
Paginated history of your swaps. Query param: per_page (1–50, default 20).
Your affiliate totals: clicks, swaps, volume, earned and pending.
Errors
Errors use standard HTTP status codes with an ok: false body.
401 | Missing or invalid API key. |
404 | Swap not found (or not yours). |
422 | Invalid parameters, unknown token, or amount out of bounds. |
429 | Rate limit exceeded. |
Rate limits
Public endpoints: 120 requests per minute per IP. Affiliate reads: 120 per minute per key. Swap creation (POST /swaps): 10 per minute per key, since it moves real funds. Exceeding a limit returns 429.