Supported Chains
Available on Base
Available Endpoints:
Click on the endpoint to jump to the section with full details
GET
- Returns the swap quotation for a given token pair on Aerodrome.
GET
- Returns the balance of a particular token pair of accounts.
GET
- Returns the total liquidity for a specified pool.
GET
- Returns the individual token liquidity within the specified liquidity pool.
/g GET
- Returns poolAddress, tickSpacing, tokensLiquidity and liquidity data based on tokenA and tokenB
POST
- Initiate a swap transaction on a specified DEX.
POST
- Add liquidity to a specified pool in a specified DEX.
POST
- Remove liquidity from a specified pool in a specified DEX.
DEX IDs
Many endpoints have a parameter where you can provide a DEX ID.
Below is a list of DEX IDs related to PancakeSwap V3. Please see the DEX ID page for a complete DEX ID list and more information.
Endpoint Details
/getprice
Returns the swap quotation for a given token pair on Aerodrome
GET
https://api.expand.network/dex/getprice
Query Parameters
Remote procedural call URL.
Comma separated values of token addresses whose price is to be fetched.
Different pool based on the tick spacing. By default, it is selected as 100.
Sample Request Sample Response
Copy https://api.expand.network/dex/getprice?path=0x4200000000000000000000000000000000000006%2C0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf&tickSpacing=100&amountIn=10000000000000&dexId=3600
Copy {
"status": 200,
"msg": "success",
"data": {
"amountIn": "10000000000000",
"path": [
"0x4200000000000000000000000000000000000006",
"0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf"
],
"amountsOut": [
"10000000000000",
"5017892452668128"
]
}
}
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameters
Remote procedural call URL.
The token ID for Aerodrome liquidity position.
Sample Request Sample Response
Copy https://api.expand.network/dex/getuserliquidity?dexId=3600&tokenId=6402229
Copy {
"status": 200,
"msg": "success",
"data": {
"liquidity": "0",
"tokenV3": "0x55d398326f99059fF775485246999027B3197955"
}
}
/getpoolliquidity
Returns the total liquidity for a specified pool.
GET
https://api.expand.network/dex/getpoolliquidity
Query Parameters
Remote procedural call URL.
Pool address whose liquidity is to be fetched.
Sample Request Sample Response
Copy https://api.expand.network//dex/getpoolliquidity?dexId=3600&poolAddress=0x6446021F4E396dA3df4235C62537431372195D38
Copy {
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "3842613418337609306114460735"
}
}
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameters
Remote procedural call URL.
Sample Request Sample Response
Copy https://api.expand.network//dex/gettokenliquidity?dexId=3600&poolAddress=0xC96fa108B551E24609bA22F177a652FFAa05E3a5
Copy {
"status": 200,
"msg": "success",
"data": {
"WETH": "14793727084925305",
"B3": "48389790764073"
}
}
/getpool
Returns poolAddress, tickSpacing, tokensLiquidity and liquidity data based on tokenA and tokenB
GET
https://api.expand.network/dex/getpoolindividualliquidity
Query Parameters
Remote procedural call URL.
Sample Request Sample Response
Copy https://api.expand.network/dex/getpool?dexId=3600&tokenA=0x4200000000000000000000000000000000000006&tokenB=0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf
Copy {
"status": 200,
"msg": "success",
"data": [
{
"poolAddress": "0x7eC6C9D993D9832Aa654593f2Dbc21303650Bc6c",
"tickSpacing": "100",
"tokensLiquidity": {
"WETH": "48768555569924423019",
"VVV": "53838383560167152098431"
},
"liquidity": "17265977496275101973877"
},
{
"poolAddress": "0x46D398A5b33709877f50c8918A7eE96F1Be1d7dd",
"tickSpacing": "200",
"tokensLiquidity": {
"WETH": "20559058494109486027",
"VVV": "32656440862879438912554"
},
"liquidity": "53885788767252899437975"
}
]
}
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
Remote procedural call URL.
Comma-separated values of token addresses, inside an array, to swap.
Amount of token to be swapped.
Minimum amount accepted as a result of swap.
Address of the recipient of the token.
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
If a base token is involved in the swap;
0
for erc20 -> erc20,
1
for base -> erc20 ("from" address should be of equivalent wrapped token) ,
2
for erc20 -> base ("to" address should be of equivalent wrapped token) .
By default, 0.
Different pool based on the tick spacing. By default, it is selected as 100.
Percentage of total swap value.
By default, 1.
0 <= slippage value <= 100
Sample Request Sample Response
Copy {
"path": [
"0x4200000000000000000000000000000000000006",
"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf"
],
"amountIn": "1017533960529743",
"amountOutMin": "0",
"involveBaseToken": "2",
"gas": "100000",
"tickSpacing": "100",
"deadline": "1747703271",
"from": "0x6A00277E6F9E5b5773772BDE0f8F154f2875Dc26",
"to": "0x6A00277E6F9E5b5773772BDE0f8F154f2875Dc26",
"dexId": "3600"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"from": "0x6A00277E6F9E5b5773772BDE0f8F154f2875Dc26",
"to": "0xBE6D8f0d05cC4be24d5167a3eF062215bE6D18a5",
"value": "0",
"gas": "262173",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000104a026383e0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000be6d8f0d05cc4be24d5167a3ef062215be6d18a500000000000000000000000000000000000000000000000000000000682bd5e700000000000000000000000000000000000000000000000000039d711643a74f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a00277e6f9e5b5773772bde0f8f154f2875dc2600000000000000000000000000000000000000000000000000000000",
"estimationCheck": true,
"referenceId": "501d277a48f2437d91e239d762f4713c"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"path": [
"0x4200000000000000000000000000000000000006",
"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf"
],
"amountIn": "1017533960529743",
"amountOutMin": "0",
"involveBaseToken": "2",
"gas": "100000",
"tickSpacing": "100",
"deadline": "1747703271",
"from": "0x6A00277E6F9E5b5773772BDE0f8F154f2875Dc26",
"to": "0x6A00277E6F9E5b5773772BDE0f8F154f2875Dc26",
"dexId": "3600",
"gasPriority": "medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"from": "0x6A00277E6F9E5b5773772BDE0f8F154f2875Dc26",
"to": "0xBE6D8f0d05cC4be24d5167a3eF062215bE6D18a5",
"value": "0",
"gas": "267752",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000104a026383e0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000be6d8f0d05cc4be24d5167a3ef062215be6d18a500000000000000000000000000000000000000000000000000000000682bd5e700000000000000000000000000000000000000000000000000039d711643a74f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a00277e6f9e5b5773772bde0f8f154f2875dc2600000000000000000000000000000000000000000000000000000000",
"gasPrice": "5867623",
"estimationCheck": true,
"referenceId": "5a7a5eaf11bd49abb81c8d6af79b9964"
}
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
Address of the first token being added.
Address of the second token being added.
Different pool based on the tick spacing. By default, it is selected as 100.
Desired amount of token A.
Desired amount of token B.
Minimum amount of token A.
Minimum amount of token B.
Deadline for the transaction to be executed (UNIX Timestamp).
Address of the recipient of the token.
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
Remote procedural call URL.
The token ID for Aerodrome liquidity position.
Percentage of total value.
By default, 1.
0 <= slippage value <= 100
Sample Request Sample Response
Copy {
"tokenA": "0x4200000000000000000000000000000000000006",
"tokenB": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
"tickSpacing": "100",
"amountADesired": "10000000000000",
"amountBDesired": "24437",
"amountAMin": "0",
"amountBMin": "0",
"from": "0xDb8b672ce5aE1Cb537EEd31b2a61dFEef1feA65a",
"to": "0xDb8b672ce5aE1Cb537EEd31b2a61dFEef1feA65a",
"deadline": "1740727106",
"gas": "10000",
"dexId": "3600"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"from": "0xDb8b672ce5aE1Cb537EEd31b2a61dFEef1feA65a",
"to": "0x827922686190790b37229fd06084350E74485b72",
"value": "0",
"gas": "10000",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184b5007d1f0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf0000000000000000000000000000000000000000000000000000000000000064fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe27cfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe40c000000000000000000000000000000000000000000000000000009184e72a0000000000000000000000000000000000000000000000000000000000000005f7500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000db8b672ce5ae1cb537eed31b2a61dfeef1fea65a0000000000000000000000000000000000000000000000000000000067c16342000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"estimationCheck": true,
"referenceId": "79356a26d508445c9da3e57e7b6d6ebf"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"tokenA": "0x4200000000000000000000000000000000000006",
"tokenB": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
"tickSpacing": "100",
"amountADesired": "10000000000000",
"amountBDesired": "24437",
"amountAMin": "0",
"amountBMin": "0",
"from": "0xDb8b672ce5aE1Cb537EEd31b2a61dFEef1feA65a",
"to": "0xDb8b672ce5aE1Cb537EEd31b2a61dFEef1feA65a",
"deadline": "1740727106",
"gas": "10000",
"dexId": "3600",
"gasPriority": "medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"from": "0xDb8b672ce5aE1Cb537EEd31b2a61dFEef1feA65a",
"to": "0x827922686190790b37229fd06084350E74485b72",
"value": "0",
"gas": "10000",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000184b5007d1f0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf0000000000000000000000000000000000000000000000000000000000000064fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe27cfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbe40c000000000000000000000000000000000000000000000000000009184e72a0000000000000000000000000000000000000000000000000000000000000005f7500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000db8b672ce5ae1cb537eed31b2a61dfeef1fea65a0000000000000000000000000000000000000000000000000000000067c16342000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasPrice": "5712444",
"estimationCheck": "Returned error: execution reverted",
"referenceId": "4bae0cacf32548ceb1d037cd16668d73"
}
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
The token ID for Aerodrome liquidity position.
Minimum amount of Token A.
Maximum amount of Token A.
Maximum amount of Token B.
Recipient for sweep tokens.
Deadline for the transaction to be executed (UNIX Timestamp).
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
Remote procedural call URL.
Address of the first token being removed.
Address of the second token being removed.
The liquidity to be removed.
Minimum amount of Token B.
Percentage of total value.
By default, 1.
0 <= slippage value <= 100
Sample Request Sample Response
Copy {
"tokenA": "0x4200000000000000000000000000000000000006",
"tokenB": "0x4F9Fd6Be4a90f2620860d680c0d4d5Fb53d1A825",
"tickSpacing": "50",
"liquidity": "10000000000000",
"amountAMin": "0",
"amountBMin": "0",
"from": "0x67d12A43b726C58412Eb9CD1EaF3f4aC16381dEC",
"to": "0x67d12A43b726C58412Eb9CD1EaF3f4aC16381dEC",
"deadline": "1840727106",
"gas": "10000",
"tokenId": "6762916",
"dexId": "3600"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"from": "0x67d12A43b726C58412Eb9CD1EaF3f4aC16381dEC",
"to": "0x827922686190790b37229fd06084350E74485b72",
"value": "0",
"gas": "10000",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a40c49ccbe00000000000000000000000000000000000000000000000000000000006731a4000000000000000000000000000000000000000000000000000009184e72a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006db74442000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f786500000000000000000000000000000000000000000000000000000000006731a4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067d12a43b726c58412eb9cd1eaf3f4ac16381dec00000000000000000000000000000000000000000000000000000000",
"estimationCheck": true,
"referenceId": "2c05c202673b4d7993380467601cc8ce"
}
}
Sample Request Sample Response
With gasPriority:
Copy {
"tokenA": "0x4200000000000000000000000000000000000006",
"tokenB": "0x4F9Fd6Be4a90f2620860d680c0d4d5Fb53d1A825",
"tickSpacing": "50",
"liquidity": "10000000000000",
"amountAMin": "0",
"amountBMin": "0",
"from": "0x67d12A43b726C58412Eb9CD1EaF3f4aC16381dEC",
"to": "0x67d12A43b726C58412Eb9CD1EaF3f4aC16381dEC",
"deadline": "1840727106",
"gas": "10000",
"tokenId": "6762916",
"dexId": "3600",
"gasPriority": "medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "8453",
"from": "0x67d12A43b726C58412Eb9CD1EaF3f4aC16381dEC",
"to": "0x827922686190790b37229fd06084350E74485b72",
"value": "0",
"gas": "10000",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a40c49ccbe00000000000000000000000000000000000000000000000000000000006731a4000000000000000000000000000000000000000000000000000009184e72a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006db74442000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f786500000000000000000000000000000000000000000000000000000000006731a4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb0000000000000000000000004200000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067d12a43b726c58412eb9cd1eaf3f4ac16381dec00000000000000000000000000000000000000000000000000000000",
"gasPrice": "5999660",
"estimationCheck": true,
"referenceId": "dbf1a131feec4d85a15b5e0941e9260a"
}
}