Relay
SupportGet in TouchTry Relay
Relay PlatformAPI ReferenceRelayKitRelay ProtocolChangelog

Getting Started

What is Relay?How Relay Works

Solutions

Payment Service ProvidersWallets & Wallet ProvidersMultichain AppsChainsCommerce & Payments

Use Cases

Bridging & OnboardingSwapsCall Execution

Features

App FeesFee SponsorshipDeposit AddressesGas Top-UpGasless ExecutionFast FillGasless SwapsPrice StabilizationRouting Integration Models

Security

Transaction ScreeningUnsupported ExchangesBug Bounty ProgramMEV protectionCommunity SupportContract Audits

Resources

Supported ChainsIntegrating using AISupportBrand Assets

API Reference

API OverviewQuickstartApps, API keys, and Rate LimitsAccess TokensUnderstanding Step ExecutionWallet DetectionCost & Fee StructureRefundsInput ValidationTrade TypesSurplus & ShortageHandling Quote ErrorsHandling Rate LimitsHandling Execution ErrorsContract CompatibilityBridging Integration GuideCall Execution Integration GuideTransaction IndexingBase Builder CodesSmart Accounts in RelayTestnet SupportSolana SupportBitcoin SupportHyperliquid SupportLighter SupportDeep LinkingWebsocketsWebhooksMigrating to Requests v3Migrating to Currencies v2Migrating to Token Price v2Supported ChainsContract AddressesSupported Tokens & RoutesTroubleshootingGet QuoteSubmit PermitGet StatusGet RequestsGet Published RequestsGet ChainsGet Chains LiquidityGet CurrenciesGet Currency ClassificationsGet Token PriceTransactions IndexTransactions SingleDeposit Address ReindexGet App Fee BalancesGet Balance EventsClaim App FeesGet UsageFast FillGet Swap SourcesCreate Access TokenExecute Gasless TxsAttest DepositGet Recovery BalancesRequest WithdrawalGet Withdrawal StatusGet Requests (v2)Get PriceGet ConfigGet Execution StatusGet Currencies (v1)Get Token Price (v1)Get Quote

RelayKit

OverviewInstallationcreateClientgetQuoteexecutegetAppFeesclaimAppFeesfastFillexecuteGaslessBatchAdaptersTypescript API TypingsChain UtilsInstallationuseQuoteuseRelayChainsuseRequestsuseTokenListuseTokenPriceuseExecutionStatusInstallationRelayKitProviderSwapWidgetThemingTroubleshooting

Protocol

Relay ProtocolHow It WorksThe Relay ChainDepositoryDeposit AddressesOracleHubAllocatorSecurity CouncilSecurity & AuditsFor AppsProgrammatic WithdrawalsWithdrawing with a SafeOperate a Third-Party Relay OracleAddressesEVM Depository ReferenceSVM Depository ReferenceOverviewArchitectureSecurityRelay Vaults BackendBridgingInteracting with Relay VaultsWithdrawing from Relay VaultsRelayPoolFactoryRelayPoolRelayPoolNativeGatewayRelayBridgeFactoryRelayBridge

Changelog

Changelog
## Documentation Index Fetch the complete documentation index at: https://docs.relay.link/llms.txt Use this file to discover all available pages before exploring further.
## Agent Instructions To quote bridges and swaps, look up chains and tokens, or track Relay transactions from an agent, use the Relay MCP server: npx -y @relayprotocol/relay-mcp. It is read-only and does not sign or broadcast transactions. Setup: https://docs.relay.link/resources/developing-with-ai.md For Relay Protocol's trust model, security architecture, and audits, see https://docs.relay.link/references/protocol/security.md. For address screening, see https://docs.relay.link/security/transaction-screening.md.

getQuote

Get a quote for a cross-chain relay (bridge, swap, call, etc)

Arguments

PropertyDescriptionRequired
parametersQuote parameters defined below✅
includeDefaultParametersSetting this to true will include default parameters, which include user and recipient. These parameters are based on the wallet and fallback to the dead address if the wallet is missing.❌
headersCustom headers to pass along with the quote request, such as x-api-key for authentication.❌
[!WARNING] Warning: Never pass x-api-key in headers from client-side code. Only use the headers parameter with API keys when calling getQuote entirely on the server.
[!WARNING] Starting October 2, 2026, POST /quote/v2 will require a valid API key on every request. Pass your key in the x-api-key header — see API keys and Rate Limits. Requests that include a referrer already require the key today. quote/v2 remains fully supported for authenticated requests.

Quote Parameters

PropertyDescriptionRequired
chainIdThe chain id to deposit funds on✅
toChainIdThe chain id to execute the txs on✅
currencyAddress for a supported native currency or valid erc20✅
toCurrencyAddress for a supported native currency or valid erc20✅
userThe address depositing funds on the origin chain. Must be a valid address for the origin chain's virtual machine (e.g. a Solana address for a Solana origin, an EVM address for an EVM origin). Required unless includeDefaultParameters is true.✅ (❌ if includeDefaultParameters is true)
recipientThe address receiving funds on the destination chain. Must be a valid address for the destination chain's virtual machine. Required unless includeDefaultParameters is true.✅ (❌ if includeDefaultParameters is true)
tradeTypeEither EXACT_INPUT for quoting via an input amount, or EXPECTED_OUTPUT/EXACT_OUTPUT for quoting via an output amount.✅
amountAmount in wei, in the supplied currency❌
walletA valid WalletClient from viem or an adapted wallet generated from an adapter that meets this interface.❌
txsAn array of either transaction objects (made up of a to, data and value properties) or viem request objects returned from viem's simulateContract function.❌
optionsAdditional options that map directly to the quote API.❌
disableCapabilitiesCheckSkip wallet.getCapabilities calls used for EIP-5792 atomic-batch detection and smart-wallet detection. Set this for wallets with a broken getCapabilities implementation that hangs or never resolves. When true, execution falls back to sequential transactions.❌
[!NOTE] On cross-virtual-machine routes, user and recipient live on different chains and use different formats. For example, a Solana → Base quote takes a Solana address as `user` and an EVM address as `recipient`. Supplying an address in the wrong format returns Invalid address <address> for chain <chainId>.

Native Bridge Example

import { getClient } from "@relayprotocol/relay-sdk";
import { useWalletClient } from "wagmi";

const { data: wallet } = useWalletClient();

const quote = await getClient()?.actions.getQuote({
  chainId: 1,
  toChainId: 10,
  currency: "0x0000000000000000000000000000000000000000",
  toCurrency: "0x0000000000000000000000000000000000000000",
  amount: "10000000000000000", // 0.01 ETH
  wallet,
  user: "WALLET_ADDRESS", //Replace with your wallet address
  recipient: "RECIPIENT_ADDRESS", //Replace with the recipient address
});

Cross-Chain Swap Example

// Cross-Chain Swap from USDC on Ethereum to DAI on Optimism
const quote = await getClient()?.actions.getQuote({
  chainId: 1,
  toChainId: 10,
  currency: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // USDC on Ethereum
  toCurrency: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1", // DAI on Optimism
  amount: "100000", // 100 USDC
  wallet,
  user: "WALLET_ADDRESS", //Replace with your wallet address
  recipient: "RECIPIENT_ADDRESS", //Replace with the recipient address
});

Wrap/Unwrap Example

// Unwrap ETH
const quote = await getClient()?.actions.getQuote({
  chainId: 1,
  toChainId: 1,
  currency: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // WETH
  toCurrency: "0x0000000000000000000000000000000000000000",
  amount: "10000000000000000", // 0.01 ETH
  wallet,
  user: "WALLET_ADDRESS", //Replace with your wallet address
  recipient: "RECIPIENT_ADDRESS", //Replace with the recipient address
});

Send Example

// Send ERC20 / Native Currency to another address on the same chain
// Note: The recipient address must be specified for send transactions and be different from the wallet address
const quote = await getClient()?.actions.getQuote({
  chainId: 1,
  toChainId: 1,
  currency: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // USDC
  toCurrency: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  amount: "100000", // 100 USDC
  wallet,
  user: "WALLET_ADDRESS", //Replace with your wallet address
  recipient: "0x0000c3caa36e2d9a8cd5269c976ede05018f0000",
});

Server-Side Example with API key

// Server-side only - pass API key via headers
const quote = await getClient()?.actions.getQuote(
  {
    chainId: 1,
    toChainId: 10,
    currency: "0x0000000000000000000000000000000000000000",
    toCurrency: "0x0000000000000000000000000000000000000000",
    amount: "10000000000000000", // 0.01 ETH
    user: "WALLET_ADDRESS",
    recipient: "RECIPIENT_ADDRESS",
  },
  false,
  { "x-api-key": process.env.RELAY_API_KEY }
);

Note - Quotes are revalidated when being filled, clients should regularly fetch fresh quotes so that users are always submitting up to date quotes. See Step Execution for more information on executing quotes through the platform.

This documentation is built and hosted on Mintlify, a developer documentation platform.

PreviouscreateClientNextexecute
Relay© 2026 Uneven Labs, Inc. All rights reserved.XGitHubSupport