Required Information
Bitcoin transactions differ from EVM chains in several ways. The sections below highlight the Bitcoin-specific parameters and requirements for your integration.SDK Properties
Bitcoin Currency
PSBT Signing
Bitcoin transactions use Partially Signed Bitcoin Transactions (PSBT) for signing. When withdrawing from Bitcoin, the quote response returns a PSBT instead of standard EVM calldata. The Bitcoin wallet adapter handles PSBT parsing, finalization, and broadcasting. Provide asignPsbt
callback that signs the PSBT and returns the signed result in base64 format.
UTXOs and Bitcoin Balance
Unlike EVM chains that track account balances directly, Bitcoin uses a UTXO (Unspent Transaction Output) model. Each address balance equals the sum of unspent outputs it has received minus outputs it has spent. To calculate a Bitcoin address balance, query the mempool.space API and compute the difference between funded and spent transaction outputs:API
Params
Execution
Bitcoin uses the standard Relay API flow. Review the execution steps documentation, then use the Get Quote endpoint.For Bitcoin origin deposits, the request transitions to
pending as soon
as the deposit appears in the Bitcoin mempool — earlier than the
equivalent transition on EVM origins. Block-confirmation policy still
governs the move to submitted/success.Example: Withdraw from Bitcoin to Base
Example: Deposit to Bitcoin from Base
Amounts are specified in the smallest unit of the currency. For BTC,
this is satoshis (100000 satoshis = 0.001 BTC). For USDC, this is 6
decimal places (10000000 = 10 USDC).
SDK
To use the SDK with Bitcoin, install and configure the Bitcoin wallet adapter. The adapter handles PSBT signing and transaction broadcasting.Deposit Addresses (Optional)
Relay also supports the deposit address flow, which allows bridging without wallet connection or PSBT signing. When using deposit addresses, there are additional considerations:Block Confirmations
When using deposit addresses, Relay waits for 1 block confirmation before processing in the typical case. For high-value deposits — those whose origin amount exceeds a per-currency threshold — Relay waits for 2 block confirmations instead, to reduce the risk of a reorg invalidating the fill. Bitcoin’s block time averages ~10 minutes but varies significantly; blocks can arrive within minutes of each other or take 30-50 minutes. ThetimeEstimate field on the quote response reflects whichever rule applies — expect roughly one block of wait time for standard deposits and roughly two for high-value ones.
Manually Reindexing a Bitcoin Deposit
If a Bitcoin deposit is not picked up by automatic indexing, you can trigger a manual reindex by callingPOST /transactions/index with chainId: 8253038 and the Bitcoin txHash. Relay verifies the transaction is included in a block before reindexing — calls for transactions that have not yet been confirmed in a block return 404. See the Transaction Indexing guide for the full request shape.
Quote Requirements for Deposit Addresses
When usinguseDepositAddress: true with Bitcoin as origin:
- The
useraddress must be a valid Bitcoin address - The
useraddress balance must exceed the quoted amount (otherwise returnsINSUFFICIENT_FUNDS) - For indicative quotes, use a known high-balance address (“whale address”). The actual deposit can originate from any address.