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:
getprice GET
Returns the swap quotation for the given token pairs for the specified DEX.
getuserliquidity GET
Returns the balance of a particular token pair of an account.
getpoolliquidity GET
Returns the total liquidity for a specified pool.
gettokenliquidity GET
Returns the individual token liquidity within the specified liquidity pool.
Source details for the 100 most recently minted tokens, including token address, symbol, name, logo url, and supported DEXs.
getliquidityholders GET
Returns the total number of liquidity holders in the specified pool.
getindividualposition GET
Returns the liquidity position for a specified user address across all the pools for a specified DEX.
getliquiditysources GET
Get the liquidity sources for the specified dex aggregator(on the basis of chain), supported by expand.network.
Returns a list of all the quotes for a pool on different DEXs.
gethistoricaltimeseries GET
Get the historical time series transactions for a specific pool address.
gethistoricaltransactions GET
Get the historical transactions focusing on swaps associated with a specific pool address.
getpooltradedata GET
Get the trade data from the pool within a specified block range, for the specified event type.
getpoolindividualliquidity GET
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.
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 POST
Initiate a swap transaction on a specified DEX.
addliquidity POST
Add liquidity to a specified pool in a specified DEX.
removeliquidity POST
Remove liquidity from a specified pool for a specified DEX.
Returns the aggregated prepared swap quotes for every DEX, in which the pair address is present.
This endpoint provides data on top activity pools across multiple DEXs (Uni V2, Uni V3, and Sushiswap V2) on Ethereum, offering key metrics like transactions, makers, buyers, sellers, volume, market cap, and liquidity with time intervals from 5 minutes to 24 hours.
Returns the approve and swap transaction on a DEX supported by Expand.
This endpoint provides the amount of liquidity distributed across different ticks for UniswapV3, TraderJoe and PancakeswapV3. Currently available for Ethereum,Avalanche, Binance and Polygon
getusertokenids
This endpoint provides the token IDs of all the active position NFTs the user holds.
/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
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
dexId*
String
path*
String
Comma-separated values of token pair.
amountIn*
String
Amount of token.
/gethistoricalpoolchartdata
/quoteaggregator
Returns a list of all the quotes for a pool on different DEXs. Available on EVM chains
GET
https://api.expand.network/dex/quoteaggregator
Query Parameters
chainId
String
path*
String
Comma-separated values of token pair.
amountIn*
String
Amount of token.
chainSymbol
String
excludedDexes
String
Comma-separated values of dexes to exclude.
poolFees
String
Different pool based on the fees. By default, it is selected as 3000.
/getwalletposition
Get the detailed DEXs positions for a wallet address. Available for Uniswap V2, Uniswap V3, Pancakeswap V2, Pancakeswap V3 and SushiSwap V2. Available on Ethereum only.
GET
https://historicallp.api.expand.network/dex/getwalletposition
Query Parameters
address*
String
Public address of the user.
/swapaggregator
Returns the aggregated prepared swap quotes for every DEX, in which the pair address is present. Available on EVM chains.
POST
https://api.expand.network/dex/swapaggregator
Request Body
chainId
String
path*
String
Comma-separated values of token pair.
amountIn*
String
Amount of token.
chainSymbol
String
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
to*
String
Address of the recipient of the token.
poolFees
String
Different pool based on the fees. By default, it is selected as 3000.
excludedDexes
String
Comma-separated values of dexes to exclude.
bestNetPrice
Boolean
If true, the endpoint will sort the prepared transactions by amountsOut minus the amount of gas in descending order. Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.
bestQuote
Boolean
If true, the endpoint will sort the prepared transactions by amountsOut (the best quote) in descending order Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.
lowestGas
Boolean
If true, the endpoint will sort the prepared transactions by amount of gas in ascending order Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.
gasPriority
String
low, medium, or high.
With gasPriority:
/swapwithapproval
Returns the approve and swap transaction on a DEX supported by Expand.
POST
https://api.expand.network/dex/swapwithapproval
Request Body
dexId
String
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
/getliquiditybytick
This endpoint provides the amount of liquidity distributed across different ticks for UniswapV3, TraderJoe, and PancakeswapV3. It is currently available for Ethereum, Avalanche, Binance, Base, and Polygon. The response includes the liquidity for the ticks.
GET
https://historicallp.api.expand.network/dex/getliquiditybytick
Request Body
dexId
String
poolAddress*
String
Address of Pool
tickRange
String
Range of tick from 0 to 10. By default 10
/getusertokenids
This endpoint provides the token IDs of all current positional NFTs held by a given wallet.
Currently Available on :
UniswapV3
Ethereum
1300
UniswapV3
Avalanche
1305
UniswapV3
Binance
1306
UniswapV3
Polygon
1307
UniswapV3
Arbitrum
1308
UniswapV3
Base
1309
PancakeswapV3
Binance
2800
PancakeswapV3
Arbitrum
2808
PancakeswapV3
Base
2809
GET
https://api.expand.network/dex/getusertokenids
Request Body
dexId
String
address*
String
Address of user
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