LogoLogo
  • Introduction to Unizen
    • Unizen Overview
      • Unizen Liquidity Distribution Mechanism (ULDM)
        • ULDM Performance
      • Unizen Interoperability Protocol (UIP)
        • LayerZero
        • DeBridge
        • Stargate
        • Celer
        • Axelar
        • Thorchain
    • Unizen Dashboard
      • General
      • Portfolio
      • History
    • Unizen Trade
      • Fees
    • Unizen Explore
      • Unizen Omni-Chain Data Pool
    • Unizen Earn
  • ZCX
    • Token Utility
    • Tokenomics
  • API - Introduction
    • Introduction
    • Before you get started
      • Understanding Price Impact and Price Slippage in Token Swaps
      • Token Allowance Management for Non-updatable Allowance Tokens
      • Tokens with taxes
      • Wrapping and Unwrapping Native Tokens
      • Quote expiration deadline
    • Security Best Practices for Integrating Unizen
      • Why disable CORS
      • How to integrate with a reverse proxy
    • Version 2 of our smart contracts
      • Migration to smart contract v2
  • API - GET STARTED
    • QuickStart guide
    • Swagger
    • Information endpoints
      • GET /trade/v1/info/chains
      • GET /trade/v1/info/sources
      • GET/v1/info/cross-providers
      • GET /trade/v1/info/token/search
      • GET /v1/info/token/popular
      • GET /trade/v1/info/token/{chainId}/{tokenAddress}
      • GET /trade/v1/info/tokenLogo/{chainId}/{tokenAddress}
      • GET /info/thorchain-inbound-address
      • GET /trade/v1/info/tx/{txHash}
      • GET /trade/v1/info/trade/{chainId}/{txHash}
      • GET /trade/v1/info/trades
    • Approval
      • GET /trade/v1/{chainId}/approval/spender
      • GET /trade/v1/{chainId}/approval/transaction
      • GET /trade/v1/{chainId}/approval/allowance
    • Single-Chain Swap
      • GET /trade/v1/{chainId}/quote/single
      • GET /trade/v1/{chainId}/swap/single
      • Send transaction in evm chains
      • Send transaction in Solana
    • Cross-Chain Swap
      • GET /trade/v1/{chainId}/quote/cross
      • GET /trade/v1/{chainId}/swap/cross
      • Send transaction
    • Gasless orders
      • POST /trade/v1/gasless/typed-data
      • POST /v1/gasless/estimate
      • POST /v1/gasless/create
      • POST /v1/gasless/cancel
      • GET /trade/v1/gasless/status/{orderId}
      • GET /v1/gasless/orderByAddress/{address}
    • UTXO Assets and Cosmos Swap
      • GET /trade/v1/{chainId}/quote/cross 1
      • GET /trade/v1/{chainId}/swap/cross
      • Sending transactions
    • Efficient Quote Retrieval with Batch Processing
      • GET /trade/v1/{chainId}/batch_quote/single
    • Error Messages
  • GASLESS TRADES
    • Obtaining gasless quotes
    • Gas estimation
    • Executing the trade
    • Following the orders
  • On-Chain Contracts - Get Started
    • Integration with Unizen Contracts for Token Swapping
    • Registering Errors on Smart Contract Calls
  • PERMIT2
    • What is Permit2?
    • Usage in our api
  • WIDGET - Get Started
    • Embed the Unizen Widget
    • Playground
  • Other
    • Smart Contracts
    • Security Audits
    • Roadmap
  • links
    • Unizen
    • Marketing Website
    • Medium
    • Twitter
    • Discord
    • Telegram
Powered by GitBook
On this page

Was this helpful?

  1. API - GET STARTED

UTXO Assets and Cosmos Swap

Unizen extends support to UTXO-based assets like Bitcoin, Bitcoin Cash, Cosmos, and Dogecoin—a feature that sets Unizen apart from most DEX aggregators that typically focus on account-based assets.

UTXO vs. Account-Based Trading

  • UTXO Model: In a UTXO-based system (e.g., Bitcoin), the amount available for a transaction is derived from "unspent transaction outputs" rather than balances stored in accounts.

  • Account-Based Model: In systems like Ethereum, tokens are stored in accounts, making transactions simpler to manage.

This document provides an overview of the Unizen API for UTXO Assets and Cosmos trade via the Unizen DEX aggregator and Thorchain.

For UTXO Assets and Cosmos trade, currently we only support trading:

  • All currencies on Ethereum, Avax, Binance Smart Chain networks -> UTXO Assets and Cosmos

  • UTXO Assets and Cosmos -> Native Currency on Ethereum, Avax, Binance Smart Chain

  • UTXO Assets and Cosmos -> UTXO Assets and Cosmos

Available Endpoints

The Unizen API for cross-chain transactions also includes UTXO Assets and Cosmos trade, but it differs from EVM cross-chain trade.

GET /trade/v1/{chainId}/quote/cross: Fetches the UTXO Assets and Cosmos trade data.

GET /trade/v1/{chainId}/swap/cross: Generates transaction data for UTXO Assets and Cosmos trade via Thorchain.

How it works. Using the Unizen API for native UTXO assets and Cosmos trade

  1. Call GET /trade/v1/{chainId}/quote/cross to retrieve all available quotes for a cross-chain trade via the Unizen DEX aggregator.

  2. Call GET /trade/v1/{chainId}/swap/cross to generate transaction data for a cross-chain trade via the Unizen DEX aggregator.

  3. Send the transaction with the user fund to the Unizen DEX aggregator contract.

PreviousGET /v1/gasless/orderByAddress/{address}NextGET /trade/v1/{chainId}/quote/cross 1

Last updated 7 months ago

Was this helpful?

You can test it here: . This example project also includes all steps for the integration.

https://github.com/unizen-io/unizen-dex-aggregator-example