Quote
by RAVN in Onchain & crypto
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.
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
Reliability
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
| Parameter | Type | Required | Description |
|---|---|---|---|
allowNoMinimum | boolean | No | Let 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. … |
clientTimezone | string | No | Your 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. |
confidential | boolean | No | Settle 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… |
destinationAddress | string | No | 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 (RAVN two-hop routes). Omit it there and you get a preview (QuoteDTO.executable=fa… |
excludeVenues | array of string | No | 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 | string | Yes | Positive integer string, in the input token's smallest unit |
inputChainId | number | Yes | One of: 1, 10, 56, 130, 137, 324, 480, 999, 143, 8453, 42161, 59144. |
inputToken | string | Yes | Token contract address, or the native-token sentinel 0xEeee...EEeE |
outputChainId | number | Yes | One of: 1, 10, 56, 130, 137, 324, 480, 999, 143, 8453, 42161, 59144. |
outputToken | string | Yes | |
quoteSessionId | string | No | |
rankingMode | string | No | Defaults to best_output. One of: best_output, fastest. |
refundAddress | string | No | Where 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… |
sandbox | boolean | No | 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, Chainflip, RAVN two-hop routes and Houdini Swap are unsupported (each would spend real money or open a live order at the venue,… |
slippageBps | integer | No | Max 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 … |
userAddress | string | Yes |
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 --decodeJavaScript: 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
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 4 h ago | Expected HTTP 402, got 503 | 503 | 217 ms | - |
| 8 h ago | Passed | 402 | 178 ms | $0.001 |
| 12 h ago | Passed | 402 | 1.5 s | $0.001 |
| 16 h ago | Passed | 402 | 318 ms | $0.001 |
| 21 h ago | Passed | 402 | 174 ms | $0.001 |
Show 10 older checks
| 25 h ago | Passed | 402 | 1.9 s | $0.001 |
| 29 h ago | Passed | 402 | 187 ms | $0.001 |
| 33 h ago | Passed | 402 | 1.5 s | $0.001 |
| 38 h ago | Passed | 402 | 188 ms | $0.001 |
| 42 h ago | Passed | 402 | 396 ms | $0.001 |
| 46 h ago | Passed | 402 | 416 ms | $0.001 |
| 2 days ago | Passed | 402 | 1.9 s | $0.001 |
| 2 days ago | Passed | 402 | 316 ms | $0.001 |
| 2 days ago | Passed | 402 | 1.6 s | $0.001 |
| 3 days ago | Passed | 402 | 1.8 s | $0.001 |