Skip to content
onelayer.
All tools

Tool detail

RAVN

Returns a best-price cross-chain swap quote across 20 execution venues and 17 chains, including native Bitcoin, with a quoteToken to pass to /execute.

Categories: Defi

Use when

  • get a swap quote between two tokens on different chains
  • compare execution venues for a cross-chain Bitcoin swap
  • check slippage and output amount before executing a swap

Not for

  • not the swap execution itself — this returns a quoteToken for a separate /execute call
  • not a price-only preview unless destinationAddress is omitted (then it's non-executable)

Inputs

POST JSON body: { inputChainId, outputChainId, inputToken, outputToken, inputAmount, userAddress } (required); destinationAddress, excludeVenues, rankingMode, slippageBps, sandbox and others (optional)

Admitted input schema

{
  "type": "object",
  "properties": {
    "destinationAddress": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "description": "Where output should land. Required at quote time for a real (executable) quote from Relay (Bitcoin as source or dest), THORChain (Bitcoin either direction), Across (Solana-touching), Eco (cross-ecosystem), or compose (2-hop). Omit it there and you get a preview (QuoteDTO.executable=false)."
    },
    "excludeVenues": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 0,
        "maxLength": 4096,
        "enum": [
          "rift",
          "0x_gasless",
          "0x_swap",
          "0x_solana",
          "bebop",
          "cow",
          "across",
          "relay",
          "mayan",
          "jupiter",
          "near_intents",
          "garden",
          "chainflip",
          "thorchain",
          "eco",
          "compose",
          "nordstern",
          "flytrade",
          "kyberswap",
          "layerswap"
        ]
      },
      "minItems": 0,
      "maxItems": 100,
      "description": "Drop specific venues from this race — e.g. a risk objection to one of them. Naming a venue that was never eligible for this pair is a no-op, not an error."
    },
    "inputAmount": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "description": "Positive integer string, in the input token's smallest unit"
    },
    "inputChainId": {
      "type": "number",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "enum": [
        1,
        10,
        56,
        130,
        137,
        324,
        480,
        999,
        143,
        8453,
        42161,
        59144,
        43114,
        4663,
        4217,
        -1,
        -2
      ]
    },
    "inputToken": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "description": "Token contract address, or the native-token sentinel 0xEeee...EEeE"
    },
    "outputChainId": {
      "type": "number",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "enum": [
        1,
        10,
        56,
        130,
        137,
        324,
        480,
        999,
        143,
        8453,
        42161,
        59144,
        43114,
        4663,
        4217,
        -1,
        -2
      ]
    },
    "outputToken": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096
    },
    "quoteSessionId": {
      "type": "string",
      "minLength": 0,
      "maxLength": 64
    },
    "rankingMode": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "enum": [
        "best_output",
        "fastest"
      ],
      "description": "Defaults to best_output."
    },
    "refundAddress": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "description": "Where to refund the input asset if the swap fails. For a Bitcoin-source Relay quote specifically, this must be supplied here, at quote time — Relay has no execute-time re-bind, so omitting it returns a priced-but-unexecutable preview and supplying it later on execute has no effect. Other BTC-source venues (Garden, THORChain, Chainflip, Rift) support binding this at execute time instead."
    },
    "sandbox": {
      "type": "boolean",
      "description": "Test the full quote -> execute -> status flow with no real funds and no live venue settlement. The quote itself is still priced live. On /v1/execute, THORChain BTC-source and Chainflip are unsupported (both can incur a real on-chain cost that can't be sandboxed) and every other venue returns realistically-shaped execution data with no funds moved. /v1/submit-signature skips the real venue submission. /v1/status always reports an immediate synthetic success. Sandbox swaps are never metered or billed."
    },
    "slippageBps": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5000
    },
    "userAddress": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096
    }
  },
  "required": [
    "inputChainId",
    "outputChainId",
    "inputToken",
    "outputToken",
    "inputAmount",
    "userAddress"
  ],
  "additionalProperties": false
}

Endpoint

Method
POST
URL
https://app.ravn.exchange/api/v1/x402/quote

Payment

Protocol
x402
Listed price
0.001 USDC per call on Base
Payment method
exact
Network
eip155:8453
Asset
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Listed terms are catalog metadata. The caller supplies inputs and calls the tool outside Onelayer. If payment is required, the caller uses a compatible wallet to pay.

Source

Record
POST https://app.ravn.exchange/api/v1/x402/quote
Retrieved
2026-09-30T20:37:07.382Z
Catalog file SHA-256
6837ccddf886f0007cf3727ea9d27faaa5047b51b4f425345c554ce1c271a524
Catalog built
2026-09-30T22:31:58.034Z