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.

Handling Quote Errors

Interpret and recover from quote errors in your integration

When calling the /quote/v2 endpoint, various errors may be returned depending on request conditions, user input, or internal routing logic. This guide outlines the possible error codes, their meanings, and how to handle them.

[!TIP] Looking for errors that occur after a request is submitted? See Handling Execution Errors for fill and refund failure reasons.

Expected Errors

These are known validation and routing issues that developers should gracefully handle in their integrations:

Error CodeDescription
AMOUNT_TOO_HIGHThe requested quote amount exceeds the maximum configured for the selected token pair. Reduce the amount (or split into smaller quotes) and retry.
AMOUNT_TOO_LOWThe amount provided is below the minimum threshold required for a quote.
BLOCKED_WALLET_ADDRESSAn address in the quote (sender, recipient, refundTo, recoveryAddress, or an app fee recipient) failed wallet screening, so no quote is returned. Distinct from the fill-time `BLOCKED_WALLET` failure.
CHAIN_DISABLEDThe origin or destination chain is currently disabled or unsupported.
EXTRA_TXS_NOT_SUPPORTEDExtra transactions are not supported for this trade type.
FORBIDDENUser does not have the required role or permission.
INSUFFICIENT_FUNDSThe user's wallet does not have enough balance to perform the swap.
INSUFFICIENT_LIQUIDITYThere is not enough liquidity available to complete the swap.
INVALID_ADDRESSThe provided user or recipient address is not valid for the target chain.
INVALID_EXTRA_TXSThe total value of extra transactions exceeds the intended output.
INVALID_GAS_LIMIT_FOR_DEPOSIT_SPECIFIED_TXSDeposit-specified transactions require a supported trade type and a configured gas limit. See the call execution guide.
INVALID_INPUT_CURRENCYThe provided input currency address is invalid or not supported.
INVALID_OUTPUT_CURRENCYThe provided output currency address is invalid or not supported.
INVALID_RECIPIENTThe provided recipient resolves to a supported token contract and cannot receive funds. Use a wallet address.
INVALID_SLIPPAGE_TOLERANCEslippageTolerance (or latePaymentSlippageTolerance) is not an integer string in the range 0–10000 basis points.
NO_INTERNAL_SWAP_ROUTES_FOUNDNo valid swap route exists internally for the selected token pair.
NO_QUOTESNo available quotes for the given parameters.
NO_SWAP_ROUTES_FOUNDNo route was found to fulfill the quote request with the given parameters.
PRICE_FETCH_FAILEDThe upstream price feed is temporarily unavailable. Retry with backoff.
REQUEST_TIMED_OUTAn upstream RPC provider timed out before returning a result.
ROUTE_TEMPORARILY_RESTRICTEDThis route is temporarily restricted due to high traffic or throttling.
RPC_HTTP_ERRORAn upstream RPC provider returned a transient infrastructure error.
SANCTIONED_CURRENCYThe token involved in the transaction is on a sanctions list.
SANCTIONED_WALLET_ADDRESSThe sender or recipient wallet address is sanctioned or blacklisted.
SERVICE_UNAVAILABLERelay is experiencing a transient infrastructure issue. Retry with backoff.
SOLANA_TX_TOO_LARGEThe compiled Solana deposit transaction exceeds Solana's 1232-byte wire limit and cannot be signed or broadcast. The response message reports the measured size and how many bytes it lands over. For ways to reduce this error, see Solana Support.
SWAP_IMPACT_TOO_HIGHThe swap's price impact exceeds acceptable thresholds. See Overriding Price Impact Protection.
UNAUTHORIZEDThe user is not authenticated or lacks valid authorization.
UNAUTHORIZED_QUOTEThe quote request includes a referrer but no valid x-api-key header.
UNSUPPORTED_CHAINThe specified chain is not supported by the platform.
UNSUPPORTED_CURRENCYThe specified currency is not supported for input or output, or the token pair cannot be priced.
UNSUPPORTED_EXECUTION_TYPEThe execution type used is not supported for fee estimation or execution.
UNSUPPORTED_ROUTEThe swap route combination is not supported.
USER_RECIPIENT_MISMATCHUser and recipient addresses must match for this type of swap.
[!TIP] PRICE_FETCH_FAILED, REQUEST_TIMED_OUT, RPC_HTTP_ERROR, and SERVICE_UNAVAILABLE all indicate transient upstream infrastructure issues, not problems with your request. PRICE_FETCH_FAILED and SERVICE_UNAVAILABLE are returned with HTTP 503; REQUEST_TIMED_OUT and RPC_HTTP_ERROR are returned when upstream RPCs are classified as transient. Retry with backoff before surfacing a failure to the user.

Overriding Price Impact Protection

Relay rejects a quote with SWAP_IMPACT_TOO_HIGH when the swap's price impact exceeds its protection threshold. The guard protects users from receiving far less than the reference value of their input, but it also blocks swaps where high impact is genuine and expected — most commonly newly launched or thin-liquidity tokens.

To accept the impact and receive the quote anyway, pass `overridePriceImpact` in the quote request:

{
  "user": "0x03508bB71268BBA25ECaCC8F620e01866650532c",
  "originChainId": 8453,
  "originCurrency": "0x0000000000000000000000000000000000000000",
  "destinationChainId": 8453,
  "destinationCurrency": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "tradeType": "EXACT_INPUT",
  "amount": "10000000000000000",
  "overridePriceImpact": true
}
[!WARNING] With the override enabled, the quoted output can be far below the reference value of the input. Surface `details.totalImpact` from the quote response in your UI and require explicit user confirmation before execution. The override only bypasses the impact check — it does not help when no route is returned at all (NO_SWAP_ROUTES_FOUND).

Unexpected Errors

These indicate infrastructure or downstream failures and are not common:

Error CodeDescription
DESTINATION_TX_FAILEDThe relay transaction reverted on the destination chain.
ERC20_ROUTER_ADDRESS_NOT_FOUNDThe router contract for a token could not be located.
UNKNOWN_ERRORAn unclassified or unexpected error occurred.
SWAP_QUOTE_FAILEDFailed to calculate a quote, possibly due to third-party pricing failure.
PERMIT_FAILEDPermit signature validation failed for token approvals.

Example Error Responses

Invalid Input Currency

{
  "message": "Invalid input or output currency",
  "errorCode": "INVALID_INPUT_CURRENCY"
}

No Routes Found

{
  "message": "No routes found",
  "errorCode": "NO_SWAP_ROUTES_FOUND"
}

Destination Transaction Failed

{
  "message": "Destination transaction failed",
  "errorCode": "DESTINATION_TX_FAILED",
  "errorData": "execution reverted"
}

Solana Transaction Too Large

{
  "message": "Generated Solana transaction is 1416 bytes, 184 over Solana's 1232 byte limit, so it cannot be signed or broadcast.",
  "errorCode": "SOLANA_TX_TOO_LARGE"
}

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

PreviousSurplus & ShortageNextHandling Rate Limits
Relay© 2026 Uneven Labs, Inc. All rights reserved.XGitHubSupport