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:
/trade/v1/info/chains
: This endpoint provides a list of chains available within the API./trade/v1/info/sources
: This endpoint returns a list of exchanges available for each chain./trade/v1/info/cross-providers
: It returns information of the different cross-providers enabled on our system./trade/v1/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./trade/v1/info/token/popular
: This endpoint returns a list of popular tokens. A chain id can be sent as optional param./trade/v1/info/token/{chainId}/{tokenAddress}
: This endpoint returns the information of a concrete token given its contract address and chain id where it is deployed./trade/v1/info/tokenLogo/{chainId}/{tokenAddress}
: This endpoint returns the token logo of a given token. It's an image./trade/v1/info/thorchain-inbound-address:
This endpoint returns the contract addresses of the smart contracts that involves BTC trading ./trade/v1/info/trade/{txHash}
: This endpoint returns the information of a cross chain trade given its transaction hash in the chain from./trade/v1/info/trade/{chainId}/{txHash}
This endpoint returns the information of a trade conducted using our API. It can be single or cross chain. For cross chain trades, the txHash has to be the on on the origin chain.
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.
Last updated