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 Returns the swap quotation for the given token pairs for the specified DEX.
Returns the balance of a particular token pair of an account.
Returns the total liquidity for a specified pool.
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.
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.
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.
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 .
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.
Initiate a swap transaction on a specified DEX.
Add liquidity to a specified pool in a specified DEX.
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
This endpoint provides the token IDs of all the active position NFTs the user holds.
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 Remote procedural call URL.
Sample Request Sample Response
Copy https://api.expand.network/dex/gettokenlist
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"tokenList" : [
{
"contract_address" : "0x99411eb6c3ff2a37a0e8c48d0c44b900e13710b4" ,
"token_name" : "Disdainful The Bear" ,
"token_symbol" : "DISDAIN" ,
"decimals" : "9" ,
"logo_url" : "https://assetlogo.expand.network/ethereum/DISDAIN.png" ,
"availableDex" : {
"uniswapV2" : [
"0xc4201bfeefd9a08f58c5e2d0877f788167e07666"
]
}
} ,
{
"contract_address" : "0x7ce0b3878bc54bfc989d2b3f9583a39ce7ad1b27" ,
"token_name" : "Megadeth by 𝓜𝓪𝓽𝓽 𝓕𝓾𝓻𝓲𝓮" ,
"token_symbol" : "MEGADETH" ,
"decimals" : "9" ,
"logo_url" : "https://assetlogo.expand.network/ethereum/MEGADETH.png" ,
"availableDex" : {
"uniswapV2" : [
"0x18aa074ca80ffaf28aa0353a6dd2e528c9d6fc6b"
]
}
} ,
{
"contract_address" : "0x63c5b611ee5b1f24a64aa0c423bc57eedc46a194" ,
"token_name" : "Pecky" ,
"token_symbol" : "PECKY" ,
"decimals" : "9" ,
"logo_url" : "https://assetlogo.expand.network/ethereum/PECKY.png" ,
"availableDex" : {
"uniswapV2" : [
"0x8e07824021b06956f7bfb224bd3b11fb7c38c57b"
]
}
}
]
}
}
/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 Comma-separated values of Dex Id. Refer to the DEX ID page for details.
Comma-separated values of token pair.
Sample Request Sample Response
Copy https://api.expand.network/dex/getpools?dexId=1500,1400,1300&path=0x6b175474e89094c44da98b954eedeac495271d0f,0xdac17f958d2ee523a2206206994597c13d831ec7&amountIn=100000000000000000
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : [
{
"dexId" : "1300" ,
"value" : "99431"
} ,
{
"dexId" : "1400" ,
"value" : "130999"
} ,
{
"dexId" : "1500" ,
"value" : "99977"
}
]
}
/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 Comma-separated values of token pair.
Comma-separated values of dexes to exclude.
Sample Request Sample Response
Copy https://api.expand.network/dex/quoteaggregator?path=0xdac17f958d2ee523a2206206994597c13d831ec7%2C0x6B175474E89094C44Da98b954EedeAC495271d0F&amountIn=1000000&chainId=1&excludedDexes=1000,1100,1400
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : [
{
"dexName" : "UniswapV3" ,
"dexId" : "1300" ,
"amountIn" : "1000000" ,
"path" : [
"0xdac17f958d2ee523a2206206994597c13d831ec7" ,
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
] ,
"amountsOut" : [
"1000000" ,
"992453714315716405"
]
} ,
{
"dexName" : "CurveV2" ,
"dexId" : "1500" ,
"amountIn" : "1000000" ,
"path" : [
"0xdac17f958d2ee523a2206206994597c13d831ec7" ,
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
] ,
"amountsOut" : [
"1000000" ,
"1000311335077777268"
]
} ,
{
"dexName" : "0x" ,
"dexId" : "1600" ,
"amountIn" : "1000000" ,
"path" : [
"0xdac17f958d2ee523a2206206994597c13d831ec7" ,
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
] ,
"amountsOut" : [
"1000000" ,
"1015039771697507808"
]
} ,
{
"dexName" : "1inch" ,
"dexId" : "1700" ,
"amountIn" : "1000000" ,
"path" : [
"0xdac17f958d2ee523a2206206994597c13d831ec7" ,
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
] ,
"amountsOut" : [
"1000000" ,
"994152586419056980"
]
}
]
}
/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 The page number that the user wants to fetch.
By default, 1.
Public address of the user.
Sample Request Sample Response
Copy https://historicallp.api.expand.network/dex/getwalletposition?address=0xEf1B32354C3d8A273331Cd532D1576bB819B6E36&pageToken=3
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"currentPage" : "3" ,
"totalPages" : "3" ,
"transactions" : {
"UniswapV3" : [
{
"block_signed_at" : "2024-02-18T14:02:11Z" ,
"block_height" : 19255151 ,
"tx_offset" : 249 ,
"log_offset" : 402 ,
"tx_hash" : "0x98ff38d750c787d0c34d7aa51051be6034943659a575e55d088ed0c3ad255a9e" ,
"raw_log_topics" : [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" ,
"0x00000000000000000000000073ea3d8ba3d7380201b270ec504b33ed5e478542" ,
"0x000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd09"
] ,
"sender_contract_decimals" : 6 ,
"sender_name" : "USD Coin" ,
"sender_contract_ticker_symbol" : "USDC" ,
"sender_address" : "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" ,
"sender_address_label" : null ,
"raw_log_data" : "0x000000000000000000000000000000000000000000000000000000023a5e3b6f" ,
"decoded" : {
"name" : "Transfer" ,
"signature" : "Transfer(indexed address from, indexed address to, uint256 value)" ,
"params" : [
{
"name" : "from" ,
"type" : "address" ,
"indexed" : true ,
"decoded" : true ,
"value" : "0x73ea3d8ba3d7380201b270ec504b33ed5e478542"
} ,
{
"name" : "to" ,
"type" : "address" ,
"indexed" : true ,
"decoded" : true ,
"value" : "0xe37e799d5077682fa0a244d46e5649f71457bd09"
} ,
{
"name" : "value" ,
"type" : "uint256" ,
"indexed" : false ,
"decoded" : true ,
"value" : "9569188719"
}
]
}
}
] ,
"UniswapV2" : [
{
"block_signed_at" : "2024-01-14T12:17:47Z" ,
"block_height" : 19005074 ,
"tx_offset" : 79 ,
"log_offset" : 1167 ,
"tx_hash" : "0xbea1249137babc68449502e14c293fc02bd4679711231a241e4475c53261624f" ,
"raw_log_topics" : [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" ,
"0x000000000000000000000000de0b295669a9fd93d5f28d9ec85e40f4cb697bae" ,
"0x00000000000000000000000052e2e6b3ba385ed9690eef11f72b2fe27ba1f8ca"
] ,
"sender_contract_decimals" : 0 ,
"sender_name" : "# UsdcLB.com" ,
"sender_contract_ticker_symbol" : "# UsdcLB.com - Visit to claim bonus" ,
"sender_address" : "0xbbac5b019876534c3c399f56e150684c5015f670" ,
"sender_address_label" : null ,
"raw_log_data" : "0x000000000000000000000000000000000000000000000000000000000000204f" ,
"decoded" : {
"name" : "Transfer" ,
"signature" : "Transfer(indexed address from, indexed address to, uint256 value)" ,
"params" : [
{
"name" : "from" ,
"type" : "address" ,
"indexed" : true ,
"decoded" : true ,
"value" : "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"
} ,
{
"name" : "to" ,
"type" : "address" ,
"indexed" : true ,
"decoded" : true ,
"value" : "0x52e2e6b3ba385ed9690eef11f72b2fe27ba1f8ca"
} ,
{
"name" : "value" ,
"type" : "uint256" ,
"indexed" : false ,
"decoded" : true ,
"value" : "8271"
}
]
}
}
] ,
"SushiSwapV2" : [
{
"block_signed_at" : "2024-01-14T12:17:47Z" ,
"block_height" : 19005074 ,
"tx_offset" : 79 ,
"log_offset" : 1264 ,
"tx_hash" : "0xbea1249137babc68449502e14c293fc02bd4679711231a241e4475c53261624f" ,
"raw_log_topics" : [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" ,
"0x000000000000000000000000de0b295669a9fd93d5f28d9ec85e40f4cb697bae" ,
"0x0000000000000000000000001e888882d0f291dd88c5605108c72d414f29d460"
] ,
"sender_contract_decimals" : 0 ,
"sender_name" : "# UsdcLB.com" ,
"sender_contract_ticker_symbol" : "# UsdcLB.com - Visit to claim bonus" ,
"sender_address" : "0xbbac5b019876534c3c399f56e150684c5015f670" ,
"sender_address_label" : null ,
"raw_log_data" : "0x000000000000000000000000000000000000000000000000000000000000204f" ,
"decoded" : {
"name" : "Transfer" ,
"signature" : "Transfer(indexed address from, indexed address to, uint256 value)" ,
"params" : [
{
"name" : "from" ,
"type" : "address" ,
"indexed" : true ,
"decoded" : true ,
"value" : "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"
} ,
{
"name" : "to" ,
"type" : "address" ,
"indexed" : true ,
"decoded" : true ,
"value" : "0x1e888882d0f291dd88c5605108c72d414f29d460"
} ,
{
"name" : "value" ,
"type" : "uint256" ,
"indexed" : false ,
"decoded" : true ,
"value" : "8271"
}
]
}
}
] ,
"BalancerV2" : [] ,
"PancakeV2" : [] ,
"CurveV2" : [] ,
"extraTransactions" : []
}
}
}
/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 Comma-separated values of token pair.
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
Comma-separated values of dexes to exclude.
If true, the endpoint will sort the prepared transactions by amountsOut (the best quote) in descending order
Note: If you select "true" for both the "bestSwap" and "cheapestSwap" parameters, the "cheapestSwap" parameter will apply.
If true, the endpoint will sort the prepared transactions by amount of gas in ascending order
Note: If you select "true" for both the "bestSwap" and "cheapestSwap" parameters, the "cheapestSwap" parameter will apply.
Address of the recipient of the token.
Sample Request Sample Response
Copy {
"path" : [
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" ,
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
] ,
"amountIn" : "1000000" ,
"gas" : "800000" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"cheapestSwap" : true ,
"bestSwap" : true ,
"chainId" : "1"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : [
{
"dexName" : "1inch" ,
"amountsOut" : "2729153702" ,
"from" : "0xdae2f6eddda6fb4fb60cc02633de27e2b431b402" ,
"to" : "0x1111111254eeb25477b68fb85ed929f73a960582" ,
"data": "0x0502b1c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a1e3e3cb0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d034060a26d69263ef43e9a68964ba141263f19d71d51caefa361",
"value" : "1000000" ,
"gas" : "135556" ,
"estimationCheck" : true ,
"referenceId" : "4a6ed6907daa46caa17153f1c697db72"
} ,
{
"dexName" : "UniswapV2" ,
"amountsOut" : "2735900139" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" ,
"value" : "1000000" ,
"gas" : "152672" ,
"data": "0x7ff36ab500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000191509281000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
"estimationCheck" : true ,
"referenceId" : "4a6ed6907daa46caa17153f1c697db72"
} ,
{
"dexName" : "SushiswapV2" ,
"amountsOut" : "2735900094" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F" ,
"value" : "1000000" ,
"gas" : "153832" ,
"data": "0x7ff36ab500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000191509281000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
"estimationCheck" : true ,
"referenceId" : "4a6ed6907daa46caa17153f1c697db72"
} ,
{
"dexName" : "UniswapV3" ,
"amountsOut" : "2736011386" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45" ,
"value" : "1000000" ,
"gas" : "156302" ,
"data": "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"estimationCheck" : true ,
"referenceId" : "4a6ed6907daa46caa17153f1c697db72"
} ,
{
"dexName" : "0x" ,
"amountsOut" : "2731837328" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdef1c0ded9bec7f1a1670819833240f027b25eff" ,
"value" : "1000000" ,
"gas" : "332502" ,
"data": "0x415565b0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a133107600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000002556e697377617056320000000000000000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a1710ed1000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f164fc0ec4e93095b804a4795bbe1e041497b92a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000003dfe5b000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd000000000000000000000000100000000000000000000000000000000000001100000000000000000000000000000000000000007f61021dd0350024dd8b7904",
"estimationCheck" : true ,
"referenceId" : "4a6ed6907daa46caa17153f1c697db72"
}
]
}
Sample Request Sample Response
With gasPriority:
Copy {
"path" : [
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" ,
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
] ,
"amountIn" : "1000000" ,
"gas" : "800000" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"cheapestSwap" : true ,
"bestSwap" : true ,
"chainId" : "1" ,
"gasPriority" : "medium"
}
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : [
{
"dexName" : "1inch" ,
"amountsOut" : "2722973476" ,
"from" : "0xdae2f6eddda6fb4fb60cc02633de27e2b431b402" ,
"to" : "0x1111111254eeb25477b68fb85ed929f73a960582" ,
"data": "0x0502b1c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a1e3e3cb0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d034060a26d69263ef43e9a68964ba141263f19d71d51caefa361",
"value" : "1000000" ,
"gas" : "135556" ,
"gasPrice" : "2537407307" ,
"estimationCheck" : true ,
"referenceId" : "7e54a22466b34205895563f636a5e59a"
} ,
{
"dexName" : "SushiswapV2" ,
"amountsOut" : "2727068499" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F" ,
"value" : "1000000" ,
"gas" : "140987" ,
"data": "0x7ff36ab500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000191509586350000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
"gasPrice" : "2533607308" ,
"estimationCheck" : true ,
"referenceId" : "7e54a22466b34205895563f636a5e59a"
} ,
{
"dexName" : "UniswapV2" ,
"amountsOut" : "2727068867" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" ,
"value" : "1000000" ,
"gas" : "152687" ,
"data": "0x7ff36ab500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000191509586350000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
"gasPrice" : "2533607308" ,
"estimationCheck" : true ,
"referenceId" : "7e54a22466b34205895563f636a5e59a"
} ,
{
"dexName" : "UniswapV3" ,
"amountsOut" : "2727666213" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45" ,
"value" : "1000000" ,
"gas" : "157484" ,
"data": "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"gasPrice" : "2533607308" ,
"estimationCheck" : true ,
"referenceId" : "7e54a22466b34205895563f636a5e59a"
} ,
{
"dexName" : "0x" ,
"amountsOut" : "2723019170" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdef1c0ded9bec7f1a1670819833240f027b25eff" ,
"value" : "1000000" ,
"gas" : "332516" ,
"data": "0x415565b0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a0addb8100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000002556e697377617056320000000000000000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a0eba6a2000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f164fc0ec4e93095b804a4795bbe1e041497b92a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000003dcb21000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd000000000000000000000000100000000000000000000000000000000000001100000000000000000000000000000000000000000d1887adb5ec883592cc6d8e",
"gasPrice" : "2533607308" ,
"estimationCheck" : true ,
"referenceId" : "7e54a22466b34205895563f636a5e59a"
}
]
}
/dex/screen
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. By default, this endpoint supports top 30 pools ranked by TVL, but the set can be customized.
GET
https://historicallp.api.expand.network/dex/screen
Query Parameters
Name Type Description Uniswap V2, Uniswap V3 and SushiSwap V2.
Liquidity of Pools greater than or equals to
Liquidity of Pools less than or equals to
Volume of Pools greater than or equals to
Volume of Pools less than or equals to
Market cap of Pools greater than or equals to
Market cap of Pools less than or equals to
Makers of Pools greater than or equals to
Makers of Pools less than or equals to
Transactions of Pools greater than or equals to
Transactions of Pools less than or equals to
FDV of Pools greater than or equals to
FDV of Pools less than or equals to
PairAge of Pools greater than or equals to
PairAge of Pools less than or equals to
Sample Request Sample Response
Copy https://historicallp.api.expand.network/dex/screen
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : [
{
"dex" : "sushiswapV2" ,
"chain" : "1" ,
"poolAddress" : "0xfb3cd0b8a5371fe93ef92e3988d30df7931e2820" ,
"pool" : "WETH/INJ" ,
"txns" : {
"m15" : {
"sells" : 0 ,
"buys" : 0
} ,
"m5" : {
"sells" : 0 ,
"buys" : 0
} ,
"h1" : {
"sells" : 0 ,
"buys" : 1
} ,
"h24" : {
"sells" : 37 ,
"buys" : 44
} ,
"m30" : {
"sells" : 0 ,
"buys" : 1
} ,
"h4" : {
"sells" : 2 ,
"buys" : 5
} ,
"h6" : {
"sells" : 3 ,
"buys" : 6
}
} ,
"makers" : {
"m15" : 0 ,
"m5" : 0 ,
"h1" : 1 ,
"h24" : 32 ,
"m30" : 0 ,
"h4" : 1 ,
"h6" : 6
} ,
"buyers" : {
"m15" : 0 ,
"m5" : 0 ,
"h1" : 1 ,
"h24" : 21 ,
"m30" : 1 ,
"h4" : 5 ,
"h6" : 6
} ,
"sellers" : {
"m15" : 0 ,
"m5" : 0 ,
"h1" : 0 ,
"h24" : 15 ,
"m30" : 0 ,
"h4" : 1 ,
"h6" : 1
} ,
"volume" : {
"m15" : {
"sell_vol" : "0.00" ,
"buy_vol" : "0.00"
} ,
"m5" : {
"sell_vol" : "0.00" ,
"buy_vol" : "0.00"
} ,
"h1" : {
"sell_vol" : "0.00" ,
"buy_vol" : "29.10"
} ,
"h24" : {
"sell_vol" : "11.91" ,
"buy_vol" : "1610.16"
} ,
"m30" : {
"sell_vol" : "0.00" ,
"buy_vol" : "29.10"
} ,
"h4" : {
"sell_vol" : "0.55" ,
"buy_vol" : "50.73"
} ,
"h6" : {
"sell_vol" : "0.72" ,
"buy_vol" : "94.88"
}
} ,
"avg_buy_size" : "36.594545454545454" ,
"avg_sell_size" : "0.3218918918918919" ,
"pair_age" : "1608184117" ,
"liquidity" : {
"INJ" : "16593.04" ,
"WETH" : "109.68"
} ,
"poolLiquidity" : "808559948466546211397" ,
"price" : "149.4748031907699" ,
"marketCap" : "2847630.82" ,
"holders" : "null" ,
"fdv" : "2847630.82"
}
........and many more
]
}
/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 Comma-separated values of token pair.
Address of the sender of the token.
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
Sample Request Sample Response
Copy {
"dexId" : "1000" ,
"amountIn" : "1000000000000000" ,
"amountOutMin" : "0" ,
"path" : [ "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" , "0x6B175474E89094C44Da98b954EedeAC495271d0F" ] ,
"to" : "0x63056E00436Da25BcF48A40dfBbDcc7089351006" ,
"deadline" : "1665990894" ,
"from" : "0x63056E00436Da25BcF48A40dfBbDcc7089351006" ,
"gas" : "173376"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : [
{
"chainId" : "1" ,
"from" : "0x63056E00436Da25BcF48A40dfBbDcc7089351006" ,
"to" : "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" ,
"value" : "0" ,
"gas" : "173376" ,
"data": "0x095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000000000000000000000000000000038d7ea4c68000",
"nonce" : 0 ,
"referenceId" : "497ef8cb1f224ab3ac8ee68211237298"
} ,
{
"chainId" : "1" ,
"from" : "0x63056E00436Da25BcF48A40dfBbDcc7089351006" ,
"to" : "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" ,
"value" : "0" ,
"gas" : "173376" ,
"data": "0x38ed173900000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000634d00ee0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
"nonce" : 1 ,
"referenceId" : "497ef8cb1f224ab3ac8ee68211237298"
}
]
}
/getliquiditybytick
This endpoint provides the amount of liquidity distributed across different ticks for UniswapV3, TraderJoe, and PancakeswapV3. Currently available for Ethereum,Avalanche, Binance and Polygon. The response includes the liquidity for the ticks.
GET
https://api.expand.network/dex/getliquiditybytick
Request Body
Name Type Description Refer to the DexID page for details.
Range of tick from 0 to 10. By default 10
Sample Request Sample Response
Copy https://api.expand.network/dex/getliquiditybytick?dexId=1300&poolAddress=0xCBCdF9626bC03E24f779434178A73a0B4bad62eD&tickRange=10
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : [
{
"tick" : "261660" ,
"statePrice" : "23.07710169474025" ,
"liquidityGross" : "2088991794836583" ,
"liquidityNet" : "-2042224526402287"
} ,
{
"tick" : "261720" ,
"statePrice" : "23.21597356043368" ,
"liquidityGross" : "6974876750931033" ,
"liquidityNet" : "-6409350811824255"
} ,
{
"tick" : "261780" ,
"statePrice" : "23.355681120112255" ,
"liquidityGross" : "17871875557359149" ,
"liquidityNet" : "8050121886876293"
} ,
{
"tick" : "261840" ,
"statePrice" : "23.49622940276033" ,
"liquidityGross" : "7449619978944243" ,
"liquidityNet" : "-2807424305176141"
} ,
{
"tick" : "261900" ,
"statePrice" : "23.637623467625318" ,
"liquidityGross" : "4306574319379346" ,
"liquidityNet" : "-133236027504128"
} ,
{
"tick" : "261960" ,
"statePrice" : "23.779868404399853" ,
"liquidityGross" : "61382057256100049" ,
"liquidityNet" : "-61356936216172091"
} ,
{
"tick" : "262020" ,
"statePrice" : "23.922969333404982" ,
"liquidityGross" : "6853452663474539" ,
"liquidityNet" : "-6851833245620381"
} ,
{
"tick" : "262080" ,
"statePrice" : "24.066931405774483" ,
"liquidityGross" : "5194197044038903" ,
"liquidityNet" : "496182904817303"
} ,
{
"tick" : "262140" ,
"statePrice" : "24.211759803640295" ,
"liquidityGross" : "65313806222184665" ,
"liquidityNet" : "-51791915298023631"
} ,
{
"tick" : "262200" ,
"statePrice" : "24.35745974031904" ,
"liquidityGross" : "17658403088342035" ,
"liquidityNet" : "10701533324826677"
} ,
{
"tick" : "262260" ,
"statePrice" : "24.504036460499695" ,
"liquidityGross" : "93295807752567938" ,
"liquidityNet" : "-26007256525835326"
} ,
{
"tick" : "262320" ,
"statePrice" : "24.6514952404324" ,
"liquidityGross" : "50177483835798246" ,
"liquidityNet" : "-50177483835798246"
} ,
{
"tick" : "262380" ,
"statePrice" : "24.79984138811834" ,
"liquidityGross" : "8414397923715812" ,
"liquidityNet" : "-8414397923715812"
} ,
{
"tick" : "262440" ,
"statePrice" : "24.949080243500863" ,
"liquidityGross" : "13082790306573556" ,
"liquidityNet" : "-13082790306573556"
} ,
{
"tick" : "262500" ,
"statePrice" : "25.09921717865765" ,
"liquidityGross" : "9792211900358146" ,
"liquidityNet" : "-9792211900358146"
} ,
{
"tick" : "262560" ,
"statePrice" : "25.250257597994153" ,
"liquidityGross" : "5972517694145393" ,
"liquidityNet" : "-5972517694145393"
} ,
{
"tick" : "262620" ,
"statePrice" : "25.40220693843807" ,
"liquidityGross" : "1488673159010214" ,
"liquidityNet" : "-1488673159010214"
} ,
{
"tick" : "262680" ,
"statePrice" : "25.555070669635104" ,
"liquidityGross" : "1178498774422354" ,
"liquidityNet" : "-1178498774422354"
} ,
{
"tick" : "262740" ,
"statePrice" : "25.70885429414582" ,
"liquidityGross" : "6812295667100567" ,
"liquidityNet" : "-6812295667100567"
} ,
{
"tick" : "262800" ,
"statePrice" : "25.86356334764374" ,
"liquidityGross" : "138040237635655" ,
"liquidityNet" : "-138040237635655"
} ,
{
"tick" : "262860" ,
"statePrice" : "26.019203399114584" ,
"liquidityGross" : "1644971628284598" ,
"liquidityNet" : "-1644971628284598"
}
]
}
/getusertokenids
This endpoint provides the token IDs of all current positional NFTs held by a given wallet.
Currently Available on :
Dex Name Chain Name DEX ID
GET
https://api.expand.network/dex/getusertokenids
Request Body
Name Type Description Refer to the DexID page for details.
Sample Request Sample Response
Copy https://api.expand.network/dex/getusertokenids?dexId=1300&address=0xF802993d29eA093E062658C1B5EC2727DE8a3247
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"tokens" : [
{
"tokenId" : "818396" ,
"liquidity" : "42704482896171366122"
}
]
}
}
Following is a sequence diagram for swap() process:-
Following is a sequence diagram for addLiquidity() process:-
Following is a sequence diagram for removeLiquidity() process:-