VeilSwap API Documentation
Public, unauthenticated REST API for instant cross-chain swaps with fixed-rate locking (Visual use only? Then you don't need this — the web UI at veilswap.io does everything without an account). This documentation targets builders integrating exchange functionality into wallets, bots and market tools.
Quick start
Three calls make a complete swap: get a quote → create an order with your payout address → send the deposit and poll status until paid. No API key, no registration — every endpoint is public.
- GET
/api/quote— see what you receive for a given amount. - POST
/api/order— returns your unique deposit address. - Send funds and poll GET
/api/order/{id}until terminal state.
/api/currenciesSupported currencies
Returns every tradable asset (each coin × network combination) with fixed-rate availability, logos and metadata. Server-cached for 1 hour.
Example request
curl "https://veilswap.io/api/currencies"Example response
{
"coins": [
{
"id": "btc-btc",
"ticker": "btc",
"network": "btc",
"name": "Bitcoin",
"logo": "https://content-api.changenow.io/uploads/btc_1_527dc9ec3c.svg",
"hasExtraId": false,
"featured": true,
"isStable": false
}
// … 460+ assets
]
}Errors
502— Upstream provider unreachable (stale cache served when possible)
/api/quoteGet a quote
Returns the best available fixed-rate quote for a pair. The amount you send and what you receive are both locked at order creation — market movement after that does not change your payout.
| Parameter | Type | Required | Description |
|---|---|---|---|
| from | string | yes | Asset ID from /api/currencies (e.g. `usdt-trx`) |
| to | string | yes | Destination asset ID (e.g. `xmr-xmr`) |
| amount | number | yes | Amount of `from` asset to swap, must be > 0 |
Example request
curl "https://veilswap.io/api/quote?from=btc&to=eth&amount=0.1"Example response
{
"best": {
"fromAsset": "btc",
"toAsset": "eth",
"fromAmount": 0.1,
"toAmount": 3.09265379,
"rate": 30.926538
}
}Errors
400— from/to/amount required — missing or invalid parameters404— no route — pair not supported429— rate limited — too many quote requests
/api/orderCreate an order
Creates a fixed-rate order. The server re-quotes and locks the price at creation time — the `toAmount` returned is what you receive (up to network fees already accounted in the quote). No registration, no API key required.
| Parameter | Type | Required | Description |
|---|---|---|---|
| fromAsset | string | yes | Source asset ID, ≤32 chars (e.g. `btc-btc`) |
| toAsset | string | yes | Destination asset ID, ≤32 chars |
| fromAmount | number | yes | Amount to send, must be within the pair's min/max (server validates) |
| toAddress | string | yes | Destination address on the target network, ≤256 chars |
| toExtraId | string | no | Destination memo/tag if required (e.g. XRP), ≤128 chars |
| refundAddress | string | no | Address to refund to if the order cannot complete |
| refundExtraId | string | no | Refund memo/tag if required |
Example request
curl -X POST "https://veilswap.io/api/order" \
-H "Content-Type: application/json" \
-d '{
"fromAsset": "eth-eth",
"toAsset": "btc-btc",
"fromAmount": 0.05,
"toAddress": "bc1q…",
"refundAddress": "0x…"
}'Example response
{
"id": "26e65cce-2172-493f-9768-6f9d4badea93",
"depositAddress": "TDcxfWaqzCXZvjeo3ccwxUS43LpLZoej6w",
"depositExtraId": null,
"fromAmount": 0.05,
"toAmount": 1.54321000,
"status": "waiting_deposit"
}Errors
400— field validation failed (length/type) or amount outside pair limits — response includes `minAmount`/`maxAmount` when applicable409— no route — pair unavailable for fixed-rate at this moment429— rate limited — 10 orders / 10 minutes per IP
/api/order/{id}Check order status
Polls current order status. Terminal states (`paid`, `expired`, `refunded`, `failed`) never regress and stop being polled — safe to stop checking once you see one.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string (URL path) | yes | Order UUID returned by POST /api/order |
Example request
curl "https://veilswap.io/api/order/26e65cce-2172-493f-9768-6f9d4badea93"Example response
{
"id": "26e65cce-2172-493f-9768-6f9d4badea93",
"status": "paid",
"providerStatus": "finished",
"toAmount": "1.54321000",
"depositAddress": "TDcxfWaqzCXZvjeo3ccwxUS43LpLZoej6w",
"depositExtraId": null,
"fromAmount": "0.05",
"fromAsset": "eth-eth",
"toAsset": "btc-btc",
"payinHash": "0xabc…",
"payoutHash": "0xdef…"
}Errors
404— not found — unknown order ID
Order lifecycle
waiting_deposit
confirming — your deposit is on-chain, waiting network confirmations
settling — provider is exchanging and broadcasting your payout
paid — complete, payout hash available
expired / refunded / failed — deposit auto-refunded to refundAddress
Usage guidelines
- — Floating-rate orders are not offered. The price locked at order creation is the payout you receive, as long as the deposit arrives within the validity window (15–30 minutes).
- — There is no upper limit per pair. Each pair's dynamic minimum is returned by the quote/create endpoints when relevant.
- — Server-side rate limits: quotes are throttled per IP; order creation allows 10 orders per 10 minutes per IP.
- — VeilSwap never holds user funds between steps — deposits go directly to order-specific addresses and swaps are executed by an integrated professional liquidity provider.
Questions & integrations
For API guidance, rate-limit increases or partnership integrations: [email protected] · Telegram @veilswap
Ready to try it out?
Open the exchange