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.

Transaction Indexing

How to integrate Relay’s transaction indexing APIs

Overview

Relay provides two key APIs for transaction indexing:

  • transactions/single - For indexing same-chain transfers, wraps, and unwraps
  • transactions/index - For accelerating indexing of transactions with internal deposits

API 1: transactions/single

When to Use

Use this API for same-chain actions including:

  • Token transfers
  • Token wraps (e.g., ETH to WETH)
  • Token unwraps (e.g., WETH to ETH)

Note: This is not required for same-chain swaps.

Purpose

  • Ensures same-chain actions are properly indexed
  • Relay's indexer doesn't actively monitor same-chain actions by default
  • Critical for applications supporting same-chain token operations

API Reference

Documentation

Implementation Reference

Request Example

curl -X POST 'https://api.relay.link/transactions/single' \
  -H 'Content-Type: application/json' \
  -d '{
  "tx": "{\"from\":\"0x03508bB71268BBA25ECaCC8F620e01866650532c\",\"to\":\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\",\"data\":\"0xa9059cbb00000000000000000000000036329d1ff4b31ec85280a86e7cf58fca7c005ed000000000000000000000000000000000000000000000000000000000000f4240\",\"value\":\"0\",\"chainId\":137,\"gas\":\"94464\",\"maxFeePerGas\":\"34643644476\",\"maxPriorityFeePerGas\":\"34180692255\",\"txHash\":\"0x935be17e13f1dc4aee15e75cc9c119f2d639e58b061a54246843f2ddf1052f7c\"}",
  "chainId":"137",
  "requestId":"0xcb6bec4106d2bc6f692831e00445f843fa39239ca61bc304486b0c96e1d531a9"
}'

API 2: transactions/index

When to Use

Use this API for transactions that contain internal deposits that need to be detected through trace analysis. This is particularly important for teams using their own proxy contracts.

Purpose

  • Accelerates the indexing process by triggering indexing before transaction validation completes
  • Ensures Relay fetches transaction traces to detect internal deposits
  • Recommended for custom proxy contract implementations

API Reference

Documentation

Implementation Reference

Request Example

curl -X POST 'https://api.relay.link/transactions/index' \
  -H 'Content-Type: application/json' \
  -d '{
  "txHash": "0x9f2c5e8b1d4a7f0c3e6b9d2f5a8c1e4b7d0a3f6c9e2b5d8a1f4c7e0b3d6a9f2c",
  "chainId": 8453
}'

Integration

Call this API immediately after submitting a transaction, before waiting for confirmation.

[!TIP] If you receive a 404 for a freshly broadcast Bitcoin transaction, wait for at least one block confirmation and retry.

Decision Matrix

Transaction TypeAPI EndpointReason
Cross-chain transactionstransactions/indexAccelerates indexing before validation
Proxy contract transactionstransactions/indexDetects internal deposits via trace analysis
Same-chain swapstransactions/indexAccelerates indexing and detects internal deposits
Same-chain token transferstransactions/singleNot actively monitored by default indexer
ETH ↔ WETH wraps/unwrapstransactions/singleSame-chain operations need explicit indexing

Key Takeaways

  1. transactions/single is essential for same-chain operations that aren't automatically monitored
  2. transactions/index is for accelerating indexing of transactions with internal deposits
  3. Call these APIs immediately after transaction submission for optimal indexing performance
  4. Choose the appropriate API based on your transaction type using the decision matrix above

For detailed implementation examples, refer to the Relay SDK source code links provided above.

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

PreviousCall Execution Integration GuideNextBase Builder Codes
Relay© 2026 Uneven Labs, Inc. All rights reserved.XGitHubSupport