Comment on page
Cross-Chain Swap
Unizen API for Dex Aggregator Cross-Chain Transaction
This document provides an overview of the Unizen API for cross-chain transactions via the Unizen DEX aggregator. The API provides access to all available quotes for a trade from supported DEXes across different blockchains, as well as the ability to generate transaction data for a trade.
With Unizen's trading architecture, users can easily access and trade over 20,000 digital assets across 122 decentralized exchanges and 7 blockchains, making it a powerful tool for cross-chain trading and asset management.
The Unizen API for cross-chain transactions provides the following endpoints:
GET /trade/v1.0/{chainId}/quote/cross
: Find all available quotes for a cross-chain trade via the Unizen DEX aggregator.GET /trade/v1.0/{chainId}/swap/cross
: Generate transaction data for a cross-chain trade via the Unizen DEX aggregator.
Network | Quote Endpoint | Swap Endpoint |
Ethereum (Mainnet) | /trade/v1.0/1/quote/cross | /trade/v1.0/1/swap/cross |
Polygon | /trade/v1.0/137/quote/cross | /trade/v1.0/137/swap/cross |
Binance Smart Chain | /trade/v1.0/56/quote/cross | /trade/v1.0/56/swap/cross |
Optimism | /trade/v1.0/10/quote/cross | /trade/v1.0/10/swap/cross |
Fantom | /trade/v1.0/250/quote/cross | /trade/v1.0/250/swap/cross |
Avalanche | /trade/v1.0/43114/quote/cross | /trade/v1.0/43114/swap/cross |
Arbitrum | /trade/v1.0/42161/quote/cross | /trade/v1.0/42161/swap/cross |
- 1.Call
GET /trade/v1.0/{chainId}/quote/cross
to get all available quotes for a cross-chain trade via the Unizen DEX aggregator. - 2.Call
GET /trade/v1.0/{chainId}/swap/cross
to generate transaction data for a cross-chain trade via the Unizen DEX aggregator. - 3.Send the transaction to the DEX aggregator contract using the
sendTransaction
function, passing in thefrom
address,to
address,data
,gasPrice
,gasLimit
, andvalue
parameters.
Last modified 6mo ago