VeilSwap
DocsAPI Reference

API Reference

Integrate VeilSwap's anonymous exchange into your application

Introduction

The VeilSwap API allows you to programmatically access our anonymous exchange functionality. All endpoints are designed with privacy in mind — no API keys required for public endpoints, and no user tracking of any kind.

Base URL

https://api.veilswap.io/v1

Authentication

Public endpoints require no authentication. For high-volume integrations, you can optionally use an API key for rate limit increases — but this is never required and does not affect the privacy of your users.

# Optional: Include API key for higher rate limits
curl -H "X-API-Key: your_api_key" \
  https://api.veilswap.io/v1/currencies

Endpoints

GET/currencies

Returns a list of all supported cryptocurrencies with their network information.

Response
{
  "currencies": [
    {
      "ticker": "btc",
      "name": "Bitcoin",
      "network": "btc",
      "hasExtraId": false,
      "isAvailable": true
    },
    {
      "ticker": "eth",
      "name": "Ethereum",
      "network": "eth",
      "hasExtraId": false,
      "isAvailable": true
    },
    {
      "ticker": "xmr",
      "name": "Monero",
      "network": "xmr",
      "hasExtraId": false,
      "isAvailable": true
    }
  ]
}
GET/estimate

Get an estimated exchange amount for a given pair.

Parameters
fromCurrencySource currency ticker (e.g., "btc")
toCurrencyDestination currency ticker (e.g., "xmr")
fromAmountAmount to exchange
Example
curl "https://api.veilswap.io/v1/estimate?fromCurrency=btc&toCurrency=xmr&fromAmount=0.1"
Response
{
  "fromCurrency": "btc",
  "toCurrency": "xmr",
  "fromAmount": 0.1,
  "toAmount": 45.234567,
  "rate": 452.34567,
  "fee": "0.5%",
  "validUntil": "2026-01-14T12:30:00Z"
}
POST/exchange

Create a new anonymous exchange. Returns a deposit address.

Request Body
{
  "fromCurrency": "btc",
  "toCurrency": "xmr",
  "fromAmount": 0.1,
  "address": "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H",
  "refundAddress": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
}
Response
{
  "id": "veil_abc123xyz789",
  "depositAddress": "bc1qrandomgeneratedaddress123456",
  "fromCurrency": "btc",
  "toCurrency": "xmr",
  "fromAmount": 0.1,
  "toAmount": 45.234567,
  "status": "waiting",
  "expiresAt": "2026-01-14T13:00:00Z"
}
GET/exchange/:id

Get the current status of an exchange.

Status Values
waitingWaiting for deposit
confirmingDeposit received, awaiting confirmations
exchangingExchange in progress
sendingSending to destination
finishedExchange complete
failedExchange failed (refund initiated)

Rate Limits

TierRequests/minExchanges/day
Public60100
With API Key300Unlimited

Error Handling

All errors return a consistent JSON structure:

{
  "error": {
    "code": "INVALID_ADDRESS",
    "message": "The provided destination address is not valid for XMR"
  }
}