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
  • Why choose the Unizen Trade API?
  • How does it work?
  • Under the Hood: Using the Unizen Trade Aggregator API

Was this helpful?

  1. API - Introduction

Introduction

Empowering Web3 Builders with Unbeatable Token Swaps

PreviousTokenomicsNextBefore you get started

Last updated 2 months ago

Was this helpful?

Request an API key by filling out this form:

Integrating the Unizen Trade API into your platform unlocks unparalleled value for your users, thanks to our groundbreaking innovations like and . As a proven solution that consistently outperforms leading DEX aggregators, the Unizen Trade API is the go-to choice for Web3 builders offering token swaps in their products.

Why choose the Unizen Trade API?

Enable the most cost efficient, most accessible and seamless omni-chain enabled decentralized swaps for the users of your product or platform.

Superior Performance

This superior performance can be accredited to ULDM, an in-house innovation developed in conjunction with top research institutions. ULDM addresses the problem of slippage by combining two key elements: Smart Liquidity Routing and a custom "trade splitting" algorithm.

Seamless Interoperability

Instant Access

The moment decentralized liquidity is provisioned on any of the supported blockchains, digital assets immediately become accessible on the Unizen Trade API. Unizen Trade Engine holds access to millions of digital assets across multiple blockchains, including native Bitcoin.

Flexible Fee Structure

Partners who integrate with Unizen through the Unizen Trade API can opt to charge a fee to their users, with flexibility in the fee structure. The API agreement allows partners to determine the fee to be charged, with Unizen retaining a percentage of the fee or positive slippage based on specific conditions. This ensures a fair and balanced relationship between Unizen and its partners.

How does it work?

Unizen Trade API is a superior-grade DEX aggregation and intelligent order routing API. By leveraging this API, developers can effortlessly and dependably access aggregated omni-chain DEX liquidity.

Unizen Trade API secures the most optimal execution price across more than 150 liquidity sources, including public Automated Market Makers (AMMs) and private professional market makers, spread across eight diverse blockchains.

The process of making a trade on Unizen involves a number of steps.

  1. Integrators request a quote from the Unizen API.

  2. Once the request data is received, the Unizen API proceeds to call the Unizen Trade Engine, which retrieves a quote from all supported DEX (AMM CDEX).

  3. The Unizen Trade Engine then returns the requested data to the Unizen API.

  4. The Unizen API then takes over and handles the data based on Integrator requirements. Afterwards, it returns all supported DEX for this trade, with the best trade on top. This stage is crucial because it helps Integrators make an informed decision on the best trade to make.

  5. Once Integrators have made a decision, they send a request to the Unizen API to generate data for a transaction with the selected DEX.

  6. The Unizen API then generates transaction data, estimates gas, and returns it to the Integrators. This stage is important as it helps Integrators plan ahead and avoid any unforeseen issues that may arise.

  7. Once Integrators have received the data, they use it to send the transaction to the Unizen trade contract. This is the final step of the trade.

After that, the Unizen API continues to support the API to track the transaction status, ensuring that Integrators remain updated on the status of their trades.

Under the Hood: Using the Unizen Trade Aggregator API

To execute trades using the Unizen Trade Aggregator API, follow these steps:

  1. Request a quote from the Unizen API by calling the /quote/single or /quote/cross API. The /quote/single API is used for single-chain trades, while the /quote/cross API is used for cross-chain trades.

  2. The Unizen API will handle the request data and call the Unizen Trade Engine to retrieve a quote from all supported DEXs.

  3. The Unizen API will return the requested data to you, allowing you to make an informed decision on the best trade to execute.

  4. Once you have decided on the trade you want to execute, call the /trade/v1/{chainId}/swap/single or /trade/v1/{chainId}/swap/cross API to generate transaction data for the selected DEX.

    1. You can avoid calling the swap endpoint by using the quote endpoint instead. Simply pass the user's wallet address as the sender parameter and set disableEstimate to true. This way, you'll receive the same information as you would from the swap endpoint, saving one transaction in the process. However, this approach only works for the best quote. If you wish to select a different quote, you'll need to call the swap endpoint with the details of that specific quote.

  5. The Unizen API will generate the transaction data, estimate gas, and return it to you.

  6. Send the transaction to the Unizen trade contract using the data generated by the Unizen API.

  7. The Unizen API will continue to support the API to track the transaction status, ensuring that you remain updated on the status of your trades.

By following these steps, you can easily execute trades across multiple DEXs without having to interact with each one individually. This provides a seamless user experience for multi-chain trading and asset management.

In a worth $10k each, Unizen Trade provided approximately $238,073 more value in total compared to the two leading DEX Aggregators.

enables the fastest, seamless, zero-touch cross-chain interactions at the lowest cost possible for all assets. This groundbreaking technology further sets Unizen Trade apart from the competition, providing users with an unmatched trading experience.

Learn more about Unizen's revenue share model .

study of 37 randomly selected single-chain trades
Unizen Interoperability Protocol
here
https://www.unizen.io/api-application
Unizen Liquidity Distribution Mechanism
Unizen Interoperability Protocol
Unizen Liquidity Distribution Mechanism (ULDM)
Unizen Interoperability Protocol (UIP)