Unizen Product Documentation
Ask or search…
K
Comment on page

Introduction

Empowering Web3 Builders with Unbeatable Token Swaps
Request an API key by filling out this form: https://www.unizen.io/api-application
Integrating the Unizen Trade SDK into your platform unlocks unparalleled value for your users, thanks to our groundbreaking innovations like Unizen Liquidity Distribution Mechanism and Unizen Interoperability Protocol. As a proven solution that consistently outperforms leading DEX aggregators, the Unizen Trade SDK 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
In a study of 37 randomly selected single-chain trades worth $10k each, Unizen Trade provided approximately $238,073 more value in total compared to the two leading DEX Aggregators.
Unizen Liquidity Distribution Mechanism (ULDM)
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
Unizen Interoperability Protocol (UIP)
Unizen Interoperability Protocol 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.
Instant Access
The moment decentralized liquidity is provisioned on any of the supported blockchains, digital assets immediately become accessible on the Unizen Trade SDK. 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 SDK 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.
Learn more about Unizen's revenue share model here.

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. 1.
    Integrators request a quote from the Unizen API.
  2. 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. 3.
    The Unizen Trade Engine then returns the requested data to the Unizen API.
  4. 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. 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. 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. 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. 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. 2.
    The Unizen API will handle the request data and call the Unizen Trade Engine to retrieve a quote from all supported DEXs.
  3. 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. 4.
    Once you have decided on the trade you want to execute, call the /trade/v1.0/{chainId}/swap/single or /trade/v1.0/{chainId}/swap/cross API to generate transaction data for the selected DEX.
  5. 5.
    The Unizen API will generate the transaction data, estimate gas, and return it to you.
  6. 6.
    Send the transaction to the Unizen trade contract using the data generated by the Unizen API.
  7. 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.