PancakeSwap V2
Last updated
Last updated
Available on Aptos, Binance Mainnet, and Binance Testnet.
Click on the endpoint to jump to the section with full details
GET
- Returns the swap quotation for a given token pair.
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.
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance.
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance.
GET
- Returns all user addresses, block numbers, and token position details for a specified pool address. Currently Available on Binance.
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance.
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance.
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.
Many endpoints have a parameter where you can provide a DEX ID.
PancakeSwap V2
Binance Smart Chain
1200
PancakeSwap V2
Binance Smart Chain Testnet
1201
PancakeSwap V2
Aptos
2900
PancakeSwap V2
Aptos Testnet
2901
GET
https://api.expand.network/dex/getprice
rpc
String
Remote procedural call URL.
dexId*
String
path*
String
Comma separated values of token addresses whose price is to be fetched.
amountIn*
String
Amount of token.
GET
https://api.expand.network/dex/getuserliquidity
rpc
String
Remote procedural call URL.
tokenA*
String
Address of token.
address*
String
Public address of liquidity provider.
dexId*
String
tokenB*
String
Address of token
rpc
String
Remote procedural call URL.
poolAddress*
String
Address of token.
address*
String
Public address of liquidity provider.
dexId*
String
GET
https://api.expand.network/dex/getpoolliquidity
rpc
String
Remote procedural call URL.
poolAddress*
String
Pool address whose liquidity is to be fetched.
dexId*
String
GET
https://api.expand.network/dex/gettokenliquidity
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
dexId*
String
GET
https://api.expand.network/dex/getliquidityholders
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
dexId*
String
GET
https://api.expand.network/dex/getindividualposition
rpc
String
Remote procedural call URL.
address*
String
The public address of the liquidity holder.
dexId*
String
poolSize
String
The number of pools for which the user intends to fetch the individual position. By default: 50, Maximum: 9,950
poolAddresses
String
The pool Addresses whose liquidity is to be fetched. (Comma-separated vaules)
Returns all user addresses, block numbers, and token position details for a specified pool address.
GET
https://historicallp.api.expand.network/dex/getpoolindividualliquidity
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
dexId*
String
endBlock
String
Last block of the range.
startBlock
String
Starting block of the range.
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries
dexId*
String
endBlock
String
Last block of the range.
startBlock
String
Starting block of the range.
poolAddress*
String
Pool address whose time series is to be fetched.
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions
dexId*
String
endBlock
String
Last block of the range.
startBlock
String
Starting block of the range.
poolAddress*
String
Pool address whose transactions is to be fetched.
POST
https://api.expand.network/dex/swap
dexId*
String
path*
Array
Comma-separated values of token addresses, inside an array, to swap.
amountIn*
String
Amount of token to be swapped.
amountOutMin*
String
Minimum amount accepted as a result of swap.
to*
String
Address of the recipient of the token.
deadline*
String
Deadline for the transaction to be executed (UNIX Timestamp).
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
involveBaseToken
String
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
.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
gasPriority
String
low, medium, or high.
ofacCheck
Boolean
if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
With gasPriority:
With slippage:
With ofacCheck:
rpc
String
Remote procedural call URL.
dexId*
String
path*
Array
Comma-separated values of token addresses, inside an array, to swap.
amountIn*
String
Amount of token to be swapped.
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
POST
https://api.expand.network/dex/addliquidity
dexId*
String
tokenA*
String
Address of the first token being added.
tokenB*
String
Address of the second token being added.
amountADesired*
String
Desired amount of token A.
amountBDesired*
String
Desired amount of token B.
amountAMin*
String
Minimum amount of token A.
amountBMin*
String
Minimum amount of token B.
deadline*
String
Deadline for the transaction to be executed (UNIX Timestamp).
to*
String
Address of the recipient of the token.
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
gasPriority
String
low, medium, or high.
ofacCheck
Boolean
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
With gasPriority:
With slippage:
With ofacCheck:
dexId*
String
path*
String
Comma-separated values of token addresses, inside an array, to Add Liquidity.
amountIn*
String
Comma-separated values of amount for TokenA and TokenB, inside an array.
from*
String
Address of the user.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
POST
https://api.expand.network/dex/removeliquidity
dexId*
String
tokenA*
String
Address of the first token being removed.
tokenB*
String
Address of the second token being removed.
liquidity*
String
Total amount of liquidity to be removed from the given pool.
amountAMin*
String
Minimum amount of Token A.
amountBMin*
String
Minimum amount of Token B.
deadline*
String
Deadline for the transaction to be executed (UNIX Timestamp).
to*
String
Address of the recipient of the token.
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
gasPriority
String
low, medium, or high.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
ofacCheck
Boolean
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
With gasPriority:
With slippage:
With ofacCheck:
rpc
String
Remote procedural call URL.
dexId*
String
path*
String
Comma-separated values of token addresses, inside an array, to Remove Liquidity.
liquidity*
String
Total amount of liquidity to be removed from the given pool.
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
Below is a list of DEX IDs related to PancakeSwap V3. Please see the for a complete DEX ID list and more information.
Refer to the page for details.
Refer to the page for details.
Refer to the page for details.
Refer to page for details.
Refer to page for details.
Refer to page for details.
Refer to page for details.
Refer to page for details.
Refer to page for details.
Refer to page for details.
Refer to the page for details.
Refer to the page for details.
Refer to the page for details.
Refer to the page for details.
Refer to the page for details.
Refer to the page for details.