Developers

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.

https://swapoon.io/api/v1

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 { "success": true, "data": { ... } } // Affiliate API { "ok": true, ... } // Affiliate API — error { "ok": false, "error": "Human-readable message" }

Public endpoints

GET /pairs public

List of supported assets, with limits and decimals.

// 200 OK { "success": true, "data": { "pairs": [ { "key": "XMR", "symbol": "XMR", "name": "Monero", "chain": "Monero", "decimals": 12, "min": "0.15", "max": "500", "min_usd": 25 } ] } }
GET /rates public

Current exchange rates (cached). Base asset is XMR.

// 200 OK { "success": true, "data": { "rates": [ ... ], "updated_at": "2026-06-30T12:00:00Z", "base": "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).

# Header Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Only the key's hash is stored server-side. The full key is shown once, at creation.

GET /coins auth

Supported tokens with their keys, symbols, chains and decimals.

// 200 OK { "ok": true, "coins": [ { "key": "XMR", "symbol": "XMR", "name": "Monero", "chain": "Monero", "decimals": 12 }, { "key": "BTC", "symbol": "BTC", "name": "Bitcoin", "chain": "Bitcoin", "decimals": 8 } ] }
GET /rate auth

Quote for a pair. Query params: from, to (token keys from /coins), amount (human units).

# Request GET /api/v1/rate?from=XMR&to=BTC&amount=0.5 // 200 OK { "ok": true, "from": "XMR", "to": "BTC", "amount_in": 0.5, "amount_out": "0.00251", "rate": 0.00502, "min": 0.15, "max": 500, "eta": "15–30 min" }
POST /swaps auth

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.

# Request body { "from": "XMR", "to": "BTC", "amount": 0.5, "to_address": "bc1q...", "refund_address": "4A..." // optional } // 201 Created { "ok": true, "id": "a1b2c3d4e5f6...", "status": "awaiting_deposit", "deposit_address": "4B...", "deposit_amount": "0.5", "deposit_symbol": "XMR", "deposit_chain": "Monero", "expected_output": "0.00251", "to_symbol": "BTC", "to_address": "bc1q...", "expires_at": "2026-08-09T10:26:56+00:00", "guarantee": { "signature": "9f2a...", "verify_url": "https://swapoon.io/guarantee" } }

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.

GET /swaps/{id} auth

Status of one of your swaps. Only swaps created with your key are visible.

// 200 OK { "ok": true, "id": "a1b2c3d4e5f6...", "status": "completed", "from_symbol": "XMR", "to_symbol": "BTC", "deposit_address": "4B...", "deposit_amount": "0.5", "deposit_chain": "Monero", "expected_output": "0.00251", "actual_output": "0.00250", "deposit_tx": "e3b0c442...", "receiving_tx": "a94a8fe5...", "to_address": "bc1q...", "expires_at": "2026-07-08T10:26:56+00:00", "created_at": "2026-07-08T09:56:56+00:00", "guarantee": { "signature": "9f2a...", "verify_url": "https://swapoon.io/guarantee" } }

Statuses: awaiting_deposit, deposit_detected, deposit_confirmed, exchanging, sending, completed, expired, refunded.

GET /swaps auth

Paginated history of your swaps. Query param: per_page (1–50, default 20).

# Request GET /api/v1/swaps?per_page=20 // 200 OK { "ok": true, "swaps": [ { "id": "a1b2c3d4...", "status": "completed", "from_symbol": "XMR", "to_symbol": "BTC", "deposit_amount": "0.5", "expected_output": "0.00251", "created_at": "2026-07-08T09:56:56Z" } ], "page": 1, "pages": 3, "total": 42 }
GET /stats auth

Your affiliate totals: clicks, swaps, volume, earned and pending.

// 200 OK { "ok": true, "stats": { "code": "cryptojoe", "clicks": 128, "swaps": 42, "volume_usd": 15230.50, "earned_usd": 76.15, "paid_usd": 50.00, "pending_usd": 26.15, "payout_mode": "xmr_manual", "payout_min": 50, "payout_eligible": false, "payout_remaining": 23.85, "active": true } }

Errors

Errors use standard HTTP status codes with an ok: false body.

401Missing or invalid API key.
404Swap not found (or not yours).
422Invalid parameters, unknown token, or amount out of bounds.
429Rate 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.

Questions?

Reach out if you are building on the Swapoon API.

Contact us