Unizen Product Documentation
Ask or search…
K
Comment on page

Information endpoints

The information that you need to perform the best swaps.
Here's an example project built with Next.js. Its purpose is to demonstrate how to integrate the Unizen API for single-chain and cross-chain trade: https://github.com/unizen-io/unizen-dex-aggregator-example
A list of endpoints that returns information needed for other endpoints to perform a trade:
  1. 1.
    /trade/v1.0/info/chains: This endpoint provides a list of chains available within the API.
  2. 2.
    /trade/v1.0/info/sources: This endpoint returns a list of exchanges available for each chain.
  3. 3.
    /trade/v1.0/info/token/search: This endpoint allows users to perform search of tokens within the API. It typically accepts search parameters and returns results a list of tokens that match the specified criteria.
  4. 4.
    /trade/v1.0/info/token/{chainId}/{tokenAddress}: This endpoint returns the information of a concrete token given its contract address and chain id where it is deployed.
  5. 5.
    /trade/v1.0/info/trade/{txHash}: This endpoint returns the information of a cross chain trade given its transaction hash in the chain from.
These endpoints are interconnected, with /chains providing an overview of available chains, /sources identifying the exchanges available in our API on each chain, and /search enabling users to query and retrieve specific information of tokens based on their requirements. The combination of these endpoints helps users navigate and access the desired data efficiently.