🪙Bitcoin
LI.FI is live on Bitcoin!
LI.FI REST API offers seamless integration for native Bitcoin bridging and swaps through Thorswap.
NOTE: Thorswap is only supported for Bitcoin <> Ethereum, Avalanche, or BSC transfers
In this documentation, we will explore how to use the API for Bitcoin related requests, executing transactions, getting routes, and checking the status of transactions.
Currently only native SegWit addresses are supported which are addresses that start with “bc1q”
Requesting Bitcoin-specific information via the API
Chains
Tools
Tokens
Token details
Requesting a Quote
Bitcoin to Ethereum
To request a quote for a transaction between Bitcoin and Ethereum, Avalanche, or BSC, you can use the provided guide. Below is an example of a request to get a quote for transferring 0.5 BTC to USDC on Ethereum:
Ethereum to Bitcoin
To request a quote for a transaction between Ethereum and Bitcoin, you can use the provided guide. Below is an example of a request to get a quote for transferring 50 USDC on Ethereum to native BTC:
Executing the transaction
Transaction Data
BTC to Ethereum, Avalanche, or BNB Smart Chain (BSC)
After retrieving the quote, the funds need to be sent to the BTC vault address provided in the response, along with a memo.
Memo Functionality: Similar to Thorchain, LI.FI uses memos for BTC to EVM swaps. The memo in the BTC transaction specifies the swap's destination address and chain.
Transaction Handling: The transaction that leaves BTC and goes to EVM needs to be sent to an EVM address. The memo ensures that the swap details are correctly processed by the validators.
NOTE: Only send tx n a timely manner (30min), it is always recommended to request an up-to-date quote to ensure to get the latest information.
The following is an example of transaction data.
Ethereum, Avalance, or BSC to BTC
EVM to native BTC transfers use the standard format specified here.
Last updated