Open app

API reference

Markdown

Quote a swap

POST/v2/swaps/quote

Quote an exact-input or exact-output swap.

Authentication: None required. Optional: integrator key in X-Integrator-Key.

#Request body

Send one of these 2 shapes:

#Shape 1: with fromAmount

  • fromChainId · integer · required — Non-negative integer chain identifier.
  • toChainId · integer · required — Non-negative integer chain identifier.
  • fromToken · string — Token contract address on the corresponding chain. For a chain's native coin, send "native" or its native symbol.
  • toToken · string — Token contract address on the corresponding chain. For a chain's native coin, send "native" or its native symbol.
  • fromTokenSymbol · string — Optional symbol hint for the same token. Resolution is driven by the token address, not by this value.
  • toTokenSymbol · string — Optional symbol hint for the same token. Resolution is driven by the token address, not by this value.
  • fromAmount · string (atomic integer) · required — Positive base-10 integer in the asset’s atomic unit.
  • toAddress · string — Intended destination address. Optional for a quote: it only lets the router account for destination-specific costs.
  • integratorFeePercent · number (0–5) — Optional integrator fee percentage. Requires a valid integrator API key.

#Shape 2: with toAmount

  • fromChainId · integer · required — Non-negative integer chain identifier.
  • toChainId · integer · required — Non-negative integer chain identifier.
  • fromToken · string — Token contract address on the corresponding chain. For a chain's native coin, send "native" or its native symbol.
  • toToken · string — Token contract address on the corresponding chain. For a chain's native coin, send "native" or its native symbol.
  • fromTokenSymbol · string — Optional symbol hint for the same token. Resolution is driven by the token address, not by this value.
  • toTokenSymbol · string — Optional symbol hint for the same token. Resolution is driven by the token address, not by this value.
  • toAmount · string (atomic integer) · required — Positive base-10 integer in the asset’s atomic unit.
  • toAddress · string — Intended destination address. Optional for a quote: it only lets the router account for destination-specific costs.
  • integratorFeePercent · number (0–5) — Optional integrator fee percentage. Requires a valid integrator API key.

#Response

200 returns an object with:

  • toAmount · string · required
  • fromAmount · string or null
  • fromAmountUsd · string or null
  • fromSymbol · string or null
  • toAmountUsd · string or null
  • toSymbol · string or null
  • toolUsed · string or null
  • feeFraction · number or null
  • feeBreakdown · object or null
    • platformFeeRate · number or null
    • platformFeeXmr · string or null
    • platformFeeUsd · string or null
    • bridgeFlatFeeXmr · string or null
    • bridgeFlatFeeUsd · string or null
    • hlSizeRoundingXmr · string or null
    • hlSizeRoundingUsd · string or null
    • hlTakerFeeXmr · string or null
    • hlTakerFeeUsd · string or null
    • totalFeeUsd · string or null
    • totalCostUsd · string or null
  • integratorFee · object or null
    • feePercent · number · required
    • feeAmountUsd · number · required
    • feeAddress · string or null
  • minDepositUsd · number or null
  • isXmrInput · boolean
  • isXmrOutput · boolean

Errors use the standard error envelope: branch on code, never on the message.

#Example

curl
curl -X POST 'https://api-beta.wagyu.xyz/v2/swaps/quote' \
  -H 'content-type: application/json' \
  -d '{
    "fromChainId": 20000000000001,
    "toChainId": 0,
    "fromToken": "bitcoin",
    "toToken": "XMR",
    "fromAmount": "1000000",
    "toAddress": "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A"
  }'
JavaScript
const res = await fetch('https://api-beta.wagyu.xyz/v2/swaps/quote', {
  method: 'POST',
  headers: {"content-type":"application/json"},
  body: JSON.stringify({
    "fromChainId": 20000000000001,
    "toChainId": 0,
    "fromToken": "bitcoin",
    "toToken": "XMR",
    "fromAmount": "1000000",
    "toAddress": "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A"
  }),
});
const data = await res.json();
Python
import requests

res = requests.post('https://api-beta.wagyu.xyz/v2/swaps/quote', json={
        "fromChainId": 20000000000001,
        "toChainId": 0,
        "fromToken": "bitcoin",
        "toToken": "XMR",
        "fromAmount": "1000000",
        "toAddress": "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A"
    }, timeout=30)
data = res.json()
Response · 200 · captured 4 Nov 2026, 08:24 UTC
{
  "toAmount": "1195223386000",
  "fromAmount": "1000000",
  "fromAmountUsd": "781.65",
  "fromSymbol": "BTC",
  "toAmountUsd": "765.30",
  "toSymbol": "XMR",
  "toolUsed": "near",
  "feeFraction": 0.02,
  "feeBreakdown": {
    "platformFeeRate": 0.02,
    "platformFeeXmr": "0.024392314",
    "platformFeeUsd": "15.62",
    "bridgeFlatFeeXmr": "0",
    "bridgeFlatFeeUsd": "0.00",
    "hlSizeRoundingXmr": "0.000754402624",
    "hlSizeRoundingUsd": "0.48",
    "hlTakerFeeXmr": "0.0003843",
    "hlTakerFeeUsd": "0.25",
    "totalFeeUsd": "15.62",
    "totalCostUsd": "16.35"
  },
  "integratorFee": null,
  "minDepositUsd": 40,
  "isXmrInput": false,
  "isXmrOutput": true
}

Tip: every page is also plain Markdown, and /llms.txt indexes them for AI tools.