Bitcoin Intents
Squid Intents support for Bitcoin enables fast, solver-driven cross-chain swaps from Bitcoin (BTC) to any supported EVM chain.
Settlement Times
Bitcoin settlement times vary based on the transaction amount:
1 block
3 blocks
5 blocks
Prerequisites
Integrator ID: Squid Intents must be enabled for your integrator ID. Contact the Squid team to get this set up.
Bitcoin Wallet Address: The source wallet must be a Native SegWit (Bech32) address (starting with
bc1q).
Step 1: Request Route
Request a route using the standard /v2/route endpoint (via API or SDK) with Bitcoin parameters:
fromChain:"bitcoin"fromToken:"satoshi"fromAddress: Native SegWit address of the user (e.g.bc1q...)
const params = {
fromAddress: "bc1qzea6nfdfmztwjcn8htqn4tk9j3v2uawf4rck0g",
fromChain: "bitcoin",
fromToken: "satoshi",
fromAmount: "70000", // Amount in satoshis
toChain: "42161", // Arbitrum
toToken: "0xaf88d065e77c8cc2239327c5edb3a432268e5831", // USDC
toAddress: "0xC601C9100f8420417A94F6D63e5712C21029525e",
quoteOnly: false
};
// API:
// const routeResult = await axios.post("https://v2.api.squidrouter.com/v2/route", params, { headers: { "x-integrator-id": integratorId } });
// const route = routeResult.data.route;
// const quoteId = route.quoteId;
// SDK:
// const { route, requestId } = await squid.getRoute(params);
// const quoteId = route.estimate.quoteId || route.quoteId;[!IMPORTANT] Save the
quoteIdreturned in the route response. It is mandatory for tracking transaction status.
Step 2: Sign the PSBT
The transactionRequest object returned in the route response contains the transaction payload. Check the transaction_request_type (or type) field. For Squid Intents, this will be:
DEPOSIT_ADDRESS_CALLDATA
The transactionRequest.data field contains a hex-encoded Partially Signed Bitcoin Transaction (PSBT). You must prompt the user's wallet to sign this PSBT.
Browser Wallet Example (UniSat Wallet)
Node.js / Backend Example (bitcoinjs-lib)
Step 3: Broadcast Transaction
Submit the raw transaction hex to the Bitcoin network. If using a browser extension wallet like UniSat, this is done automatically using pushPsbt. For backend scripts, you can broadcast using a public block explorer API (e.g. Blockstream):
Step 4: Status Polling
You must poll the status API to confirm the completion of the swap.
[!WARNING] For all Squid Intent transactions, you must include the
quoteIdin the status query parameters. IfquoteIdis omitted, the transaction cannot be correlated with the Intent and will be automatically refunded on the Bitcoin chain after 15 minutes.
API Status Polling
SDK Status Polling
Complete Examples
Ready-to-run integration examples are available in our GitHub repository:
API Example: Bitcoin to EVM Intents API Sample
SDK Example: Bitcoin to EVM Intents SDK Sample
Last updated