CoinCraddle offers a developer-friendly API that lets you automate cryptocurrency swaps, including high-privacy pairs like ETH → XMR, BTC to XMR, or USDT to XMR. In 2026, this API is especially valuable for Monero users who want to run recurring swaps, build trading bots, or integrate XMR acquisition into custom scripts — all while maintaining privacy.
The API is designed for both individual power users and partners. It supports fixed-rate and floating-rate swaps, provides real-time quotes, and returns cashback automatically. This tutorial shows you how to use it with practical Python examples focused on Monero swaps.
1. Getting Started with the CoinCraddle API
Step 1: Access the API Go to https://coincraddle.com/coincraddle-api. The page explains integration options and how to set up your own fee structure for high-volume use. For individual automation, you can request an API key via the contact form or support (no registration required for basic access).
Step 2: Authentication CoinCraddle uses a simple API key header for authenticated requests. After approval, you receive a key like cc_api_key_xxxxxxxx. Include it in every request:
Authorization: Bearer YOUR_API_KEYNo complex OAuth — it’s designed for simplicity and privacy.
Step 3: Base URL All endpoints use: https://api.coincraddle.com/v1/
2. Core API Endpoints for XMR Swaps
A. Get Quote (Recommended First Step) Endpoint: POST /quote
This returns the current rate and estimated amount for your swap.
Example Request (Python)
import requests
url = "https://api.coincraddle.com/v1/quote"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"from": "ETH", # or "BTC", "USDT" etc.
"to": "XMR",
"amount": 0.5, # amount of source coin
"rate_type": "fixed" # or "floating"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())Response Example
{
"quote_id": "q_abc123",
"from": "ETH",
"to": "XMR",
"send_amount": 0.5,
"receive_amount": 142.35,
"rate": "284.7",
"fee": 1.12,
"expires_in": 600
}B. Create Swap Endpoint: POST /swap/create
Use the quote_id from the previous step to lock the swap.
C. Check Swap Status Endpoint: GET /swap/status/{swap_id}
3. Full Python Example: Automate ETH → XMR Swap
Here’s a complete script that:
- Gets a fixed-rate quote
- Creates the swap
- Monitors until complete
- Handles errors gracefully
import requests
import time
import json
API_KEY = "YOUR_API_KEY_HERE"
BASE_URL = "https://api.coincraddle.com/v1"
def get_quote(from_coin, to_coin, amount):
url = f"{BASE_URL}/quote"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
payload = {
"from": from_coin,
"to": to_coin,
"amount": amount,
"rate_type": "fixed"
}
response = requests.post(url, headers=headers, json=payload)
return response.json()
def create_swap(quote_id, receive_address):
url = f"{BASE_URL}/swap/create"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
payload = {
"quote_id": quote_id,
"receive_address": receive_address
}
response = requests.post(url, headers=headers, json=payload)
return response.json()
def check_status(swap_id):
url = f"{BASE_URL}/swap/status/{swap_id}"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.get(url, headers=headers)
return response.json()
# === MAIN AUTOMATION EXAMPLE ===
if __name__ == "__main__":
# Step 1: Get quote for 0.5 ETH → XMR with fixed rate
quote = get_quote("ETH", "XMR", 0.5)
print("Quote received:", json.dumps(quote, indent=2))
# Step 2: Use your fresh Monero subaddress
xmr_address = "YOUR_FRESH_MONERO_SUBADDRESS_HERE" # e.g., from Cake/Feather Wallet
# Step 3: Create the swap
swap = create_swap(quote["quote_id"], xmr_address)
swap_id = swap["swap_id"]
deposit_address = swap["deposit_address"]
print(f"Swap created. Send {quote['send_amount']} ETH to {deposit_address}")
# Step 4: In a real bot, you would now send the ETH programmatically or manually
# For this demo, we simulate waiting for confirmation
print("Waiting for deposit confirmation...")
# Step 5: Poll status until complete
for _ in range(30): # poll up to 5 minutes
status = check_status(swap_id)
if status["status"] == "completed":
print("Swap completed! Received XMR:", status["receive_amount"])
break
elif status["status"] == "failed":
print("Swap failed:", status.get("error"))
break
time.sleep(10)
else:
print("Swap still processing after timeout.")Important Notes:
- Replace YOUR_API_KEY_HERE and YOUR_FRESH_MONERO_SUBADDRESS_HERE.
- Always generate a new subaddress in Cake Wallet, Feather Wallet, or Monero GUI for every automated swap.
- Add error handling and logging in production scripts.
- Respect rate limits (not publicly documented but typically generous for personal use).
4. Best Practices for Automating XMR Swaps
- Fresh Subaddresses: Never reuse the same Monero address across swaps.
- Fixed Rate: Always use fixed rate for automated scripts to avoid unexpected slippage.
- Error Handling: Retry logic for temporary network issues.
- Rate Limiting: Add delays between swaps to avoid triggering any platform limits.
- Logging: Record every swap ID, amount, and timestamp privately.
- Hardware Wallets: For large automated volumes, sign transactions from Ledger/Trezor when possible.
- VPN/Tor: Route all API calls through Tor or Mullvad for extra privacy.
5. Advanced Automation Ideas
- Scheduled Swaps: Use cron jobs or GitHub Actions to swap mining rewards or salary automatically into XMR.
- Webhook Integration: Set up a webhook to trigger swaps when you receive ETH/USDT in a monitored wallet.
- Portfolio Rebalancing Bot: Automatically convert a percentage of your portfolio into XMR when certain conditions are met.
- Cashback Reinvestment: Write a script that detects incoming cashback and immediately uses it for the next small swap.
Security Reminder
- Store your API key securely (environment variables or secret manager).
- Never hard-code keys in public repositories.
- Monitor your swaps regularly.
- Use the Telegram bot for manual oversight of automated activity.
CoinCraddle’s API in 2026 makes automating XMR swaps simple, private, and efficient. Whether you are a miner converting rewards, a trader rebalancing, or building a custom tool, the platform’s no registration design combined with fixed rates and cashback makes it an excellent choice.
Start automating today: visit https://coincraddle.com/coincraddle-api for integration details and request your API key.
Trade private. Automate smart. Keep your XMR swaps sovereign.
Happy coding and swapping!