RAVN

v1.0.3
exchange.ravn/ravn Checked 2 days ago Published 2 months ago

Cross-chain swap API for native Bitcoin, Solana and EVM chains.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ravn_quote Get a RAVN swap quote

Get a swap quote from RAVN — same-chain or cross-chain, across 20 chains including native (non-wrapped) Bitcoin and Solana as source or destination. Free, no API key or payment required. Returns a quoteToken; pass it to ravn_execute to get a signable/broadcastable execution payload.

ParameterTypeDescription
inputAmount *stringPositive integer string, in the input token's smallest unit (no decimals)
inputChainId *integerNumeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status
inputToken *stringToken contract address, or 0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE for the chain's native coin
outputChainId *integerNumeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status
outputToken *stringToken contract address, or 0xEeeeeEeeeEeEeeEeEeEeeeEEeeeeEeeeeeeeEEeE for the chain's native coin
userAddress *stringAddress the input asset will be sent from
allowNoMinimumbooleanLet venues that enforce no minimum (today Rift) race even though slippageBps is set. Their quotes carry slippage.noMinimum true and fill at the venue's own rate: slippageBps does not protect them
apiKeystringYour RAVN API key, if you have one — raises your rate limit
confidentialbooleanSettle privately via NEAR Intents' Confidential Intents so the deposit and payout can't be linked on-chain. Through this MCP server only NEAR quotes it (NO_LIQUIDITY if it can't, never a public fallba…
destinationAddressstringWhere output should land, if different from userAddress. Required here, at quote time, to get an executable quote from Relay (Bitcoin as the source), THORChain (Bitcoin either direction), Across (a So…
excludeVenuesarrayDrop specific venues, e.g. a risk objection to one of them or ravn_health showing it degraded. An excluded venue is used nowhere in the route, including the steps of RAVN's multi-step routes (compose,…
onlyVenuesarrayRace only these venues, e.g. ["bebop"] for an RFQ-only race. Every other venue is left out (including ones RAVN adds later); excludeVenues still applies on top. It covers every venue RAVN routes your…
rankingModestringbest_output (default) picks the highest net output; fastest picks the quickest-settling quote within slippageBps
refundAddressstringWhere 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. Well-known sample addresses (e.g. bc1qx…
slippageBpsintegerMax acceptable slippage in basis points. Setting it drops venues that enforce no minimum (today Rift) from the race unless allowNoMinimum is true
timeoutMsintegerThe race's time limit in milliseconds, counted from its start: once it has passed and some venue has priced the swap, slower venues are left out (with none priced yet, the first price ends the wait; a…

ravn_execute Execute a RAVN swap quote

Turn a quoteToken from ravn_quote into an execution payload. Returns one of three shapes (executionType): TRANSACTION (sign and broadcast yourself), SIGNATURE (sign, RAVN submits), or DEPOSIT (send the input asset to a given address). RAVN never takes custody of funds — you always sign or send from your own wallet. TRANSACTION and SIGNATURE may also include an `approval` — an ERC-20 approve() you must broadcast and wait to be MINED before the transaction/signature, or it fails (reverts on TRANSACTION; on SIGNATURE the order is accepted and silently never fills). Only present when the sold…

ParameterTypeDescription
quoteToken *stringThe quoteToken returned by ravn_quote
apiKeystringYour RAVN API key, if you have one — raises your rate limit
destinationAddressstringLate-bound output recipient, honoured by venues that bind at execution time (Chainflip, Garden, Layerswap, Mayan, NEAR Intents, Rift, RAVN two-hop routes). Every other venue fixes the recipient when i…
refundAddressstringLate-bound refund recipient if the swap fails, honoured by venues that read one at execution time (Chainflip, Garden, NEAR Intents, Rift). Every other venue, Mayan, Layerswap and RAVN two-hop routes i…

ravn_submit_signature Submit a signed RAVN order

For a SIGNATURE-type ravn_execute result only: submit the signature(s) you collected (over typedData, and approvalData if present) to actually place the order. RAVN decodes the venue from quoteToken and routes to the right venue-specific submit path — you never touch a per-venue endpoint. Returns a statusRef — pass it to ravn_status as `ref` to poll this swap.

ParameterTypeDescription
quoteToken *stringThe quoteToken from ravn_quote
signature *stringSignature over the typedData from ravn_execute
apiKeystringYour RAVN API key, if you have one — raises your rate limit
approvalSignaturestring0x Gasless only: signature over approvalData, when ravn_execute returned one

ravn_status Check RAVN swap status

Poll the status of a swap by its quoteToken and ref from ravn_execute (statusRef, deposit address, or origin tx hash). Use the quoteToken execute returned — compose rebinds hop 1 onto hop 2's deposit. Status is authoritative where the venue exposes it; a swap the venue can't track reports 'unknown' rather than a guess.

ParameterTypeDescription
quoteToken *stringThe quoteToken from ravn_quote — the venue is decoded from it
ref *stringstatusRef from ravn_execute when it returned one (always for DEPOSIT and SIGNATURE venues — it is the venue's own tracking key, which is not always the deposit address); otherwise the origin tx hash
apiKeystringYour RAVN API key, if you have one — raises your rate limit
txHashstringThe transaction that paid a fee the swap carries, where RAVN can't find it otherwise: a two-hop route's hop-1 tx, or the on-chain transaction that carried an execution's fee.transaction (Rift and priv…

ravn_health Check RAVN venue health

Liveness check across every venue RAVN routes through — call before a swap if you want to know whether a route is degraded ahead of time.

ravn_tokens List RAVN's token registry for a chain

RAVN's own listed token registry for one chain — populate a token picker without hardcoding one. This is "what RAVN knows about and might route", not a per-pair routability guarantee for any specific pair; call ravn_quote to check that.

ParameterTypeDescription
chainId *integerNumeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status
apiKeystringYour RAVN API key, if you have one — raises your rate limit

ravn_tokens_resolve Resolve a token address to its metadata

Resolve an arbitrary token address to its metadata (symbol, name, decimals) via an on-chain read — for a paste-any-address flow, when the token isn't necessarily on ravn_tokens's list.

ParameterTypeDescription
address *stringToken contract address / mint to resolve
chainId *integerNumeric chain id, e.g. 1=Ethereum, 8453=Base, -1=Bitcoin, -2=Solana — see ravn_chains for the full list, or ravn_health for live venue status
apiKeystringYour RAVN API key, if you have one — raises your rate limit

ravn_btc_coverage How many BTC venues list each token

For a swap where native BTC is the source: how many BTC venues list each of ravn_tokens's tokens on `chainId`. A ranking hint (a token more venues list is more likely to keep routing through one venue's outage), not a gate: ravn_quote decides, and tokens off RAVN's list route from BTC too. BTC-as-source only.

ParameterTypeDescription
chainId *integerThe destination chain to check BTC-source coverage on
apiKeystringYour RAVN API key, if you have one — raises your rate limit

ravn_chains List every chain RAVN supports

Every chain RAVN lists a token registry for (see ravn_tokens). Static, doesn't change per request, safe to cache instead of hardcoding a chain table.

ParameterTypeDescription
apiKeystringYour RAVN API key, if you have one — raises your rate limit

ravn_btc_prepare_send Prepare a signable Bitcoin transaction for a RAVN DEPOSIT

Turns a DEPOSIT-type ravn_execute result (deposit.address + deposit.amount) into a ready-to-sign PSBT, so you don't have to write your own UTXO selection and fee-estimation code. If that result also has a `fee` (an integrator fee RAVN collects beside the deposit), pass its fee.address as feeAddress and fee.amount as feeAmountSats: the PSBT then pays it as a second output of the same transaction, which is the only place RAVN looks for it. Fetches your UTXOs and the current network fee rate from mempool.space (public, no auth). RAVN never sees or touches a private key — sign the returned PSBT…

ParameterTypeDescription
amountSats *stringdeposit.amount from the ravn_execute DEPOSIT result, in satoshis
fromAddress *stringYour Bitcoin address holding the UTXOs to spend — native SegWit (bc1q…) or Taproot (bc1p…) only
toAddress *stringdeposit.address from the ravn_execute DEPOSIT result
feeAddressstringfee.address from the ravn_execute DEPOSIT result — REQUIRED whenever that result has a `fee`. RAVN's fee is paid as an extra output of this same transaction; leave it out and the fee is never paid
feeAmountSatsstringfee.amount from the ravn_execute DEPOSIT result, in satoshis — pass together with feeAddress
feeRateSatsPerVbnumberOmit to use mempool.space's current halfHourFee estimate
networkstringDefaults to mainnet