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/v1Authentication
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/currenciesEndpoints
/currenciesReturns 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
}
]
}/estimateGet an estimated exchange amount for a given pair.
Parameters
fromCurrencySource currency ticker (e.g., "btc")toCurrencyDestination currency ticker (e.g., "xmr")fromAmountAmount to exchangeExample
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"
}/exchangeCreate 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"
}/exchange/:idGet the current status of an exchange.
Status Values
waitingWaiting for depositconfirmingDeposit received, awaiting confirmationsexchangingExchange in progresssendingSending to destinationfinishedExchange completefailedExchange failed (refund initiated)Rate Limits
| Tier | Requests/min | Exchanges/day |
|---|---|---|
| Public | 60 | 100 |
| With API Key | 300 | Unlimited |
Error Handling
All errors return a consistent JSON structure:
{
"error": {
"code": "INVALID_ADDRESS",
"message": "The provided destination address is not valid for XMR"
}
}