Native Bitcoin Swap
This document provides an overview of the Unizen API for native Bitcoin trade via the Unizen DEX aggregator and Thorchain.
For native Bitcoin trade, currently we only support trading from native Bitcoin to Ethereum on the Ethereum mainnet or Avax on the Avax network.
Available Endpoints
The Unizen API for cross-chain transactions also includes native Bitcoin trade, but it differs from EVM cross-chain trade.
GET /trade/v1/{chainId}/quote/cross
: Fetches the native Bitcoin trade data.
GET /trade/v1/{chainId}/swap/cross
: Generates transaction data for a native BTC trade via Thorchain.
Using the Unizen API for native Bitcoin trade
Call
GET /trade/v1/{chainId}/quote/cross
to retrieve all available quotes for a cross-chain trade via the Unizen DEX aggregator.Call
GET /trade/v1/{chainId}/swap/cross
to generate transaction data for a cross-chain trade via the Unizen DEX aggregator.Send the transaction with the user fund to the Thorchain inbound address.
You can test it here: https://github.com/unizen-io/unizen-dex-aggregator-example. This example project also includes all steps for the integration.
Last updated