PancakeSwap V3
Supported Chains
Available on Arbitrum, Base, Binance Smart Chain.
Available Endpoints:
Click on the endpoint to jump to the section with full details
/getprice
GET
- Returns the swap quotation for a given token pair on PancakeSwap V3./getuserliquidity
GET
- Returns the balance of a particular token pair of accounts./getpoolliquidity
GET
- Returns the total liquidity for a specified pool./gettokenliquidity
GET
- Returns the individual token liquidity within the specified liquidity pool./getindividualposition
GET
- Returns the liquidity position for a specified user address across all the pools for a given DEX./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 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 PancakeSwap V3
GET
https://api.expand.network/dex/getprice
Query Parameters
https://api.expand.network/dex/getprice?path=0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82,0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c&amountIn=100000000&dexId=2800&poolFees=10000
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "100000000",
"path": [
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82",
"0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"
],
"amountsOut": [
"100000000",
"306601"
]
}
}
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameters
https://api.expand.network/dex/getuserliquidity?dexId=2800&tokenId=1312988
{
"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
https://api.expand.network/dex/getpoolliquidity?dexId=2800&poolAddress=0xd710DaC10B7255fCc0eC929a0e742A18F25b6395
{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "18515830179681481351"
}
}
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameters
https://api.expand.network/dex/gettokenliquidity?dexId=2800&poolAddress=0xd710DaC10B7255fCc0eC929a0e742A18F25b6395
{
"status": 200,
"msg": "success",
"data": {
"Cake": "590637823886899595162",
"WBNB": "866859192915598532"
}
}
/getindividualposition
Returns the liquidity position for a specified user address across all the pools for a given DEX.
GET
https://api.expand.network/dex/getindividualposition
Query Parameters
https://api.expand.network/dex/getindividualposition?dexId=2800&address=0x1782ceA0D026430ad4b410697c2df05a104EFA9b
{
"status": 200,
"msg": "success",
"data": {
"aggregatedLiquidity": "72444604462753293596618",
"poolResponse": {
"TONCOINWBNB": {
"0x43bEB5b09ac912c4288dB731FE7c30507e252C2A": "15779353064773789"
},
"USDTCake-LP": {
"0xE210A02C2ec1455b2FCcC44DdeC7350069fe82bd": "6297850996707074851911"
},
"ETHWBNB": {
"0x62Fcb3C1794FB95BD8B1A97f6Ad5D8a7e4943a1e": "2493746513801523617"
},
"USDTTONCOIN": {
"0x0C908dd60E9fe25b22fF27a708764b8539f827Ee": "62084827588607788"
},
"CakemCake": {
"0xa9AE342B34f3aB5fF41c6790Cc483B3529DFEFbB": "21419819327158619681573"
},
"WBNBPOSEIDON": {
"0x17D8F66a21646143f409668c73Ee98859F7D7cb7": "956368188650006020443"
},
"WBNBTHE": {
"0x2E2DcA75BBD1a4CE87F59F52f22fd252963eeA03": "30772500373629930566"
},
"CakeWBNB": {
"0xAfB2Da14056725E3BA3a30dD846B6BBbd7886c56": "47259662655317815919"
},
"ZROWBNB": {
"0xC241e8fb314bc3799BE2Db94dCE4d070c29b425d": "252928787577262072535"
},
"KASUSDT": {
"0x92FB8463ac6BC0f700b20cD67CdEE7C753947f66": "6802786118907420"
},
"USDTZRO": {
"0x1437A1f1112E1C342c24E83194A4b2eD06c15794": "524873430052127267391"
},
"ULTIUSDT": {
"0x468Be8C177849E698AF38a153CAb6E7e2684a612": "936065694612754763411"
},
"USDTFRAX": {
"0x062E5A0E976878755311E9254bE65821CEB25adF": "41976087461485927380255"
}
}
}
}
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
{
"dexId": "2800",
"path": ["0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "0x55d398326f99059fF775485246999027B3197955"],
"amountIn":"1000000000000",
"gas": "100000",
"to": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"amountOutMin": "100",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"poolFees": "10000",
"involveBaseToken": "1",
"deadline": "19999999999999"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"to": "0x1b81D678ffb9C0263b24A97847620C99d213eB14",
"value": "1000000000000",
"gas": "100000",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000104414bf389000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000000000000000000000000000000000000000002710000000000000000000000000f67d5d28614f26f56a73e635197534871d4acf14000000000000000000000000000000000000000000000000000012309ce53fff000000000000000000000000000000000000000000000000000000e8d4a510000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"estimationCheck": true,
"referenceId": "29b6e3b2db4c473faf81a91ff2262071"
}
}
With gasPriority (medium):
{
"dexId": "2800",
"path": ["0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "0x55d398326f99059fF775485246999027B3197955"],
"amountIn":"1000000000000",
"gas": "100000",
"to": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"amountOutMin": "100",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"poolFees": "10000",
"involveBaseToken": "1",
"deadline": "19999999999999",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"to": "0x1b81D678ffb9C0263b24A97847620C99d213eB14",
"value": "1000000000000",
"gas": "100000",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000104414bf389000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000000000000000000000000000000000000000002710000000000000000000000000f67d5d28614f26f56a73e635197534871d4acf14000000000000000000000000000000000000000000000000000012309ce53fff000000000000000000000000000000000000000000000000000000e8d4a510000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"gasPrice": "1200000000",
"estimationCheck": true,
"referenceId": "25a2c29b527d429997702dffb45e06c5"
}
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
{
"dexId": "2800",
"tokenA": "0x55d398326f99059fF775485246999027B3197955",
"tokenB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"amountADesired":"1000",
"amountBDesired": "10",
"amountAMin": "0",
"amountBMin": "0",
"deadline": "19999999999",
"gas": "10000",
"to": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"amountOutMin": "100",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"poolFees": "10000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"to": "0x46A15B0b27311cedF172AB29E4f4766fbE7F4364",
"value": "0",
"gas": "10000",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000001648831645600000000000000000000000055d398326f99059ff775485246999027b3197955000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c0000000000000000000000000000000000000000000000000000000000002710ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0ab0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0dd000000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f67d5d28614f26f56a73e635197534871d4acf1400000000000000000000000000000000000000000000000000000004a817c7ff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"estimationCheck": true,
"referenceId": "5cc0e39341854b10bffb78b52738e3c2"
}
}
With gasPriority (medium):
{
"dexId": "2800",
"tokenA": "0x55d398326f99059fF775485246999027B3197955",
"tokenB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"amountADesired": "1000",
"amountBDesired": "10",
"amountAMin": "0",
"amountBMin": "0",
"deadline": "19999999999",
"gas": "10000",
"to": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"amountOutMin": "100",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"poolFees": "10000",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
"to": "0x46A15B0b27311cedF172AB29E4f4766fbE7F4364",
"value": "0",
"gas": "10000",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000001648831645600000000000000000000000055d398326f99059ff775485246999027b3197955000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c0000000000000000000000000000000000000000000000000000000000002710ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0ab0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0dd000000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f67d5d28614f26f56a73e635197534871d4acf1400000000000000000000000000000000000000000000000000000004a817c7ff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"gasPrice": "1200000000",
"estimationCheck": true,
"referenceId": "57755b589ac14a23a8a006b83da04eb6"
}
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
{
"dexId": "2800",
"tokenA": "0x55d398326f99059fF775485246999027B3197955",
"tokenB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"amountAMax": "1000",
"amountBMax": "10",
"amountAMin": "0",
"amountBMin": "0",
"deadline": "19999999999",
"liquidity": "10000",
"gas": "10000",
"amountOutMin": "100",
"from": "0x176a7FCF400d3af85909e5A16ea9D04b4717C529",
"tokenId": "1312988"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x176a7FCF400d3af85909e5A16ea9D04b4717C529",
"to": "0x46A15B0b27311cedF172AB29E4f4766fbE7F4364",
"value": "0",
"gas": "10000",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe00000000000000000000000000000000000000000000000000000000001408dc00000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004a817c7ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f786500000000000000000000000000000000000000000000000000000000001408dc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000176a7fcf400d3af85909e5a16ea9d04b4717c529000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb00000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000176a7fcf400d3af85909e5a16ea9d04b4717c52900000000000000000000000000000000000000000000000000000000",
"estimationCheck": true,
"referenceId": "1d38812d15d749f4834dab14733c502c"
}
}
With gasPriority:
{
"dexId": "2800",
"tokenA": "0x55d398326f99059fF775485246999027B3197955",
"tokenB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"amountAMax": "1000",
"amountBMax": "10",
"amountAMin": "0",
"amountBMin": "0",
"deadline": "19999999999",
"liquidity": "10000",
"gas": "10000",
"amountOutMin": "100",
"from": "0x176a7FCF400d3af85909e5A16ea9D04b4717C529",
"tokenId": "1312988",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x176a7FCF400d3af85909e5A16ea9D04b4717C529",
"to": "0x46A15B0b27311cedF172AB29E4f4766fbE7F4364",
"value": "0",
"gas": "10000",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe00000000000000000000000000000000000000000000000000000000001408dc00000000000000000000000000000000000000000000000000000000000027100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004a817c7ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f786500000000000000000000000000000000000000000000000000000000001408dc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000176a7fcf400d3af85909e5a16ea9d04b4717c529000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb00000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000176a7fcf400d3af85909e5a16ea9d04b4717c52900000000000000000000000000000000000000000000000000000000",
"gasPrice": "1200000000",
"estimationCheck": true,
"referenceId": "0f1162e935ed446baa99cf7f12dfdd03"
}
}
Last updated