⚡DEX & DEX Aggregators
Provides connectivity across the various decentralized exchanges available on the EVM and Non-EVM chains.
Below are descriptions of the endpoints we support for DEXs and DEX Aggregators:
Name | Description |
---|---|
getprice | Returns the swap quotation for the given token pairs for the specified DEX. |
getuserliquidity | Returns the balance of a particular token pair of an account. |
getpoolliquidity | Returns the total liquidity for a specified pool. |
gettokenliquidity | Returns the individual token liquidity within the specified liquidity pool. |
gettokenlist | Source details for the 100 most recently minted tokens, including token address, symbol, name, logo url, and supported DEXs. |
getliquidityholders | Returns the total number of liquidity holders in the specified pool. |
getindividualposition | Returns the liquidity position for a specified user address across all the pools for a specified DEX. |
getliquiditysources | Get the liquidity sources for the specified dex aggregator(on the basis of chain), supported by expand.network. |
getpools | Returns a list of all the quotes for a pool on different DEXs. |
gethistoricaltimeseries | Get the historical time series transactions for a specific pool address. |
gethistoricaltransactions | Get the historical transactions focusing on swaps associated with a specific pool address. |
getpooltradedata | Get the trade data from the pool within a specified block range, for the specified event type. |
getpoolindividualliquidity | Get all user addresses, block numbers, and token position details for a specified pool address. Available for Uniswap V2,V3 and Sushiswap only. |
Get detailed information for user transactions on various DEXs, including transaction type, block-related details, decoded parameters and many more. | |
quoteaggregator | Retrieves quotes from various DEXs & aggregators in a unified manner. For a specified pair address, this endpoint will return the respective quotes for each DEX in which the pair address is present. |
swap | Initiate a swap transaction on a specified DEX. |
addliquidity | Add liquidity to a specified pool in a specified DEX. |
removeliquidity | Remove liquidity from a specified pool for a specified DEX. |
swapaggregator | Returns the aggregated prepared swap quotes for every DEX, in which the pair address is present. |
Dexscreener | Return the aggregated dex analyses on Ethereum network. Available for Uniswap V2, Uniswap V3 and SushiSwap V2. |
swapwithapproval | Returns the approve and swap transaction on a DEX supported by Expand. |
Please see the attached document for information about error messages you may encounter when transacting using these endpoints:https://docs.google.com/document/d/1SuBJwPOmvJtUUf-9QJiBcTr0l2zbWlusMTUOGfC8S50/edit?usp=sharing
/gettokenlist
Retrieves the details of token mapping for the top 100 trending tokens by default or retrieves the detail of specific token mapping by token address.Available for Uniswap V2, Uniswap V3, SushiSwap V2
GET
https://api.expand.network/dex/gettokenlist
Query Parameter
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
tokenAddress | String | Address of the token. |
/getpools
Returns a list of all the quotes for a pool on different DEXs.
GET
https://api.expand.network/dex/getpools
Query Parameters
Name | Type | Description |
---|---|---|
dexId* | String | Comma-separated values of Dex Id. Refer to the DEX ID page for details. |
path* | String | Comma-separated values of token pair. |
amountIn* | String | Amount of token. |
/gethistoricalpoolchartdata
Source OHCLV (Open, High, Close, Low, Volume) data for a specified pool address for a particular time interval (15, 30, 60, or 90 minutes). Available for Uniswap V2 and V3, Balancer, Curve V2, and Sushiswap.
/quoteaggregator
Returns a list of all the quotes for a pool on different DEXs.
GET
https://api.expand.network/dex/quoteaggregator
Query Parameters
Name | Type | Description |
---|---|---|
chainId | String | Refer to the Chain ID page for details. |
path* | String | Comma-separated values of token pair. |
amountIn* | String | Amount of token. |
chainSymbol | String | Refer to the Chain ID page for details. |
excludedDexes | String | Comma-separated values of dexes to exclude. |
/getwalletposition
Get detailed information for user transactions on various DEXs, including transaction type, block-related details, decoded parameters and more. Available for Uniswap V2, Uniswap V3, SushiSwap V2, Curve V2, and Balancer V2.
GET
https://historicallp.api.expand.network/dex/getwalletposition
Query Parameters
Name | Type | Description |
---|---|---|
pageToken | String | The page number that the user wants to fetch. By default, 1. |
address* | String | Public address of the user. |
/swapaggregator
Returns the aggregated prepared swap quotes for every DEX, in which the pair address is present.
POST
https://api.expand.network/dex/swapaggregator
Request Body
Name | Type | Description |
---|---|---|
chainId | String | Refer to the Chain ID page for details. |
path* | String | Comma-separated values of token pair. |
amountIn* | String | Amount of token. |
chainSymbol | String | Refer to the Chain ID page for details. |
from* | String | Address of the sender of the token. |
gas* | String | Maximum gas limit provided by the sender, for the transaction. |
excludedDexes | String | Comma-separated values of dexes to exclude. |
bestSwap | Boolean | If true, prepared transaction will be sorted by amountsOut in desc order |
cheapestSwap | Boolean | If true, prepared transaction will be sorted by amount of gas in asc order |
to* | String | Address of the recipient of the token. |
gasPriority | String | low, medium, or high. |
With gasPriority:
/dex/screen
This endpoint returns aggregated dex analyses on Ethereum network. Available for Uniswap V2, Uniswap V3 and SushiSwap V2.
GET
https://historicallp.api.expand.network/dex/screen
Query Parameters
Name | Type | Description |
---|---|---|
dex | String | Uniswap V2, Uniswap V3 and SushiSwap V2. |
liquiditygte | String | Liquidity of Pools greater than or equals to |
liquiditylte | String | Liquidity of Pools less than or equals to |
volumegte | String | Volume of Pools greater than or equals to |
volumelte | String | Volume of Pools less than or equals to |
marketCapgte | String | Market cap of Pools greater than or equals to |
marketCaplte | String | Market cap of Pools less than or equals to |
makersgte | String | Makers of Pools greater than or equals to |
makerslte | String | Makers of Pools less than or equals to |
transactionsgte | String | Transactions of Pools greater than or equals to |
transactionslte | String | Transactions of Pools less than or equals to |
fdvgte | String | FDV of Pools greater than or equals to |
fdvlte | String | FDV of Pools less than or equals to |
pairAgegte | String | PairAge of Pools greater than or equals to |
pairAgelte | String | PairAge of Pools less than or equals to |
/swapwithapproval
Returns the approve and swap transaction on a DEX supported by Expand.
POST
https://api.expand.network/dex/swapwithapproval
Request Body
Name | Type | Description |
---|---|---|
dexId | String | Refer to the Chain ID page for details. |
path* | String | Comma-separated values of token pair. |
amountIn* | String | Amount of token. |
from* | String | Address of the sender of the token. |
slippage | String | Percentage of total swap value. By default, 1. 0 <= slippage value <= 10 |
swap parameters for the dex specified | - | Refer specified dex swap page for parametes |
Following is a sequence diagram for swap() process:-
Following is a sequence diagram for addLiquidity() process:-
Following is a sequence diagram for removeLiquidity() process:-
Last updated