79trust / 100

Quote

by RAVN in Onchain & crypto

x402 APIFailing, checked 4 h ago

RAVN — best-price swap quotes across 20 execution venues and 17 chains, including native (non-wrapped) Bitcoin as either source or destination. 0% protocol fee, non-custodial. Returns a quoteToken; pass it to POST /execute.

POST
https://app.ravn.exchange/api/v1/x402/quote
Price
$0.001
per call in USDC
Uptime
96.5%
last 30 days
Response time
446 ms
2.0 s slowest 5%
Last check
Failed
4 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 4 h ago: Expected HTTP 402, got 503

Status and outage history · Atom feed · Watch with other listings

How to call it

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

Each call costs $0.001 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://app.ravn.exchange/api/v1/x402/quote
content-type: application/json

{
  "inputAmount": "1000000000000000000",
  "inputChainId": 1,
  "inputToken": "0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE",
  "outputChainId": 8453,
  "outputToken": "0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE",
  "userAddress": "0x0000000000000000000000000000000000dEaD"
}

Parameters

ParameterTypeRequiredDescription
allowNoMinimumbooleanNoLet venues that enforce no minimum (today Rift) race even though slippageBps is set. Such a quote fills at the venue's own rate once the deposit lands: it carries slippage.noMinimum: true, slippage.guaranteedMin null, and your slippageBps does not protect it. Without slippageBps they already race. …
clientTimezonestringNoYour end user's IANA timezone (e.g. Europe/Berlin), forwarded only to venues whose API requires the user's details on every call (Houdini). Defaults to UTC.
confidentialbooleanNoSettle privately: the on-chain deposit and payout cannot be linked to each other. The race narrows to the private venues — NEAR Intents' Confidential Intents and Houdini Swap's two-hop exchange route — and the best output wins; you get NO_LIQUIDITY rather than a public fill if neither can quote. Me…
destinationAddressstringNoWhere 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 (RAVN two-hop routes). Omit it there and you get a preview (QuoteDTO.executable=fa…
excludeVenuesarray of stringNoDrop 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.
inputAmountstringYesPositive integer string, in the input token's smallest unit
inputChainIdnumberYes One of: 1, 10, 56, 130, 137, 324, 480, 999, 143, 8453, 42161, 59144.
inputTokenstringYesToken contract address, or the native-token sentinel 0xEeee...EEeE
outputChainIdnumberYes One of: 1, 10, 56, 130, 137, 324, 480, 999, 143, 8453, 42161, 59144.
outputTokenstringYes
quoteSessionIdstringNo
rankingModestringNoDefaults to best_output. One of: best_output, fastest.
refundAddressstringNoWhere to refund the input asset if the swap fails. Selling native Bitcoin with userAddress set to a Bitcoin address and no refundAddress refunds to userAddress (the address the BTC is sent from); with any other userAddress, supply it. For a Bitcoin-source Relay or THORChain quote, the refund must b…
sandboxbooleanNoTest 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, Chainflip, RAVN two-hop routes and Houdini Swap are unsupported (each would spend real money or open a live order at the venue,…
slippageBpsintegerNoMax slippage in basis points. Omitted means Auto: 50, wider where a route needs it (slippage.bps reports the figure used). Setting it drops venues that enforce no minimum (slippage.noMinimum: true, today Rift) from the race, since your figure is a protection they can't give — unless allowNoMinimum …
userAddressstringYes

Example response

The provider's example. We can't check it without paying.

Example response, 34 lines
{
  "data": {
    "estimatedTimeSeconds": 3,
    "expiresAt": 1786374968171,
    "fee": {
      "amount": "0",
      "bps": 0
    },
    "input": {
      "amount": "1000000000000000000",
      "token": {
        "chainId": 1,
        "decimals": 18,
        "isNative": true,
        "symbol": "ETH"
      }
    },
    "output": {
      "amount": "999534824840543000",
      "token": {
        "chainId": 8453,
        "decimals": 18,
        "isNative": true,
        "symbol": "ETH"
      }
    },
    "quoteToken": "eyJ2ZW51ZUlkIjoi...",
    "routeType": "EVM_CROSS_CHAIN",
    "venue": {
      "id": "mayan",
      "name": "Mayan"
    }
  }
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.001.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://app.ravn.exchange/api/v1/x402/quote' \
  -H 'content-type: application/json' \
  --data-raw '{"inputAmount":"1000000000000000000","inputChainId":1,"inputToken":"0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE","outputChainId":8453,"outputToken":"0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE","userAddress":"0x0000000000000000000000000000000000dEaD"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://app.ravn.exchange/api/v1/x402/quote' \
  -H 'content-type: application/json' \
  --data-raw '{"inputAmount":"1000000000000000000","inputChainId":1,"inputToken":"0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE","outputChainId":8453,"outputToken":"0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE","userAddress":"0x0000000000000000000000000000000000dEaD"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.001 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.001" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.001 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapp.ravn.exchange%2Fapi%2Fv1%2Fx402%2Fquote&method=POST
const res = await pay("https://app.ravn.exchange/api/v1/x402/quote", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "inputAmount": "1000000000000000000",
    "inputChainId": 1,
    "inputToken": "0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE",
    "outputChainId": 8453,
    "outputToken": "0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE",
    "userAddress": "0x0000000000000000000000000000000000dEaD"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.001 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.001"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://app.ravn.exchange/api/v1/x402/quote",
        json={
            "inputAmount": "1000000000000000000",
            "inputChainId": 1,
            "inputToken": "0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE",
            "outputChainId": 8453,
            "outputToken": "0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE",
            "userAddress": "0x0000000000000000000000000000000000dEaD",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoExpected HTTP 402, got 503503217 ms-
8 h agoPassed402178 ms$0.001
12 h agoPassed4021.5 s$0.001
16 h agoPassed402318 ms$0.001
21 h agoPassed402174 ms$0.001
Show 10 older checks
25 h agoPassed4021.9 s$0.001
29 h agoPassed402187 ms$0.001
33 h agoPassed4021.5 s$0.001
38 h agoPassed402188 ms$0.001
42 h agoPassed402396 ms$0.001
46 h agoPassed402416 ms$0.001
2 days agoPassed4021.9 s$0.001
2 days agoPassed402316 ms$0.001
2 days agoPassed4021.6 s$0.001
3 days agoPassed4021.8 s$0.001