expand.network
  • Overview
  • Getting Started
  • 🔑How do I get my API Key?
  • 📑List of All Endpoints
  • ⚙️SDK
    • Overview
    • Getting Started
  • ⛓️INTEGRATIONS
    • ⚡Blockchains
      • EVM based blockchains
        • Ethereum
        • Binance Smart Chain
        • Avalanche - C
        • Avalanche - P
        • Avalanche - X
        • Polygon
        • Cronos
        • Arbitrum
        • Fantom
        • Optimism
        • Base
        • zkSync Era
        • Mantle
      • Non-EVM based chains
        • Tron
        • Solana
        • Near
        • Algorand
        • Aptos
        • Sui
        • Starknet
        • TON
        • Cosmos Hub
        • Osmosis
        • Stacks
        • Bitcoin
        • Stellar
          • Stellar RWA
        • XRP Ledger
          • XRP Ledger RWA
    • ⚡Bridges
      • Stargate
      • Stargate V2
      • Squid Router
      • Squid Router V2
      • Allbridge Classic
      • Allbridge Core
    • ⚡DEX & DEX Aggregators
      • Uniswap V2
      • Uniswap V3
      • Uniswap X
      • Sushiswap V2
      • PancakeSwap V2
      • PancakeSwap V3
      • Aerodrome
      • Camelot V3
      • Curve V2
      • Balancer V2
      • STON.fi
      • Trader Joe
      • Orca
      • Raydium
      • SDEX
      • Cetus
      • REF Finance
      • Liquidswap
      • Sologenic
      • Alex
      • 0x (Aggregator)
      • 1inch (Aggregator)
      • Kyberswap (Aggregator)
        • Kyberswap ( Limit Order Endpoints )
      • Jupiter (Aggregator)
    • ⚡Derivatives
      • dYdX V4
    • ⚡Fungible Tokens
      • ERC20
      • WETH
    • ⚡Lending Protocols
      • Aave V2
      • Aave V3
      • Compound V2
      • Compound V3
      • Morpho
    • ⚡Yield Aggregators
      • Yearn Finance V2
      • Harvest Finance
      • Pendle
    • ⚡Liquid Staking
      • Chorus One
      • Lido V2
      • Stader
      • Benqi
      • Jito
      • EigenLayer
    • ⚡Non Fungible Tokens
      • ERC721
      • ERC1155
      • Metaplex
    • ⚡Oracles
      • ChainLink
      • WinkLink
      • Pyth Network
      • RedStone
    • ⚡Stablecoins
      • EVM
    • ⚡Synthetics
      • Synthetix
    • ⚡Supported Wallets
      • MPC Wallets
        • DFNS
        • FORDEFI
        • FIREBLOCKS
        • CIRCLE
      • HD Wallets
        • PHANTOM
        • COINBASE
        • TON Wallet
      • Wallet Connect v2
  • How To
    • Execute a Local Swap
    • Execute a Cross Chain Swap
    • Use Limit Orders
    • Lend and Borrow
    • Provision Liquidity
      • Adding Liquidity
      • Removing liquidity
    • Yield Farm
    • Use Our Transaction Decoder
    • Submit an RFQ
    • Subscribe to Events
    • Stream Data (WebSocket)
      • Stream Transaction
      • Stream Trade
      • Stream Gas
      • Stream Ticker Price
    • Source Pricing
    • Track Memecoins
    • Manage Token Approvals
  • Use Cases
    • Trade Reconciliation
    • Portfolio Management
    • Trading Features
    • On-Chain Data: DEX Liquidity Pool Forensics
    • Transaction and Pool Analysis
  • Account Abstraction
    • Overview
      • User Endpoints
      • Paymaster Endpoint
      • Bundler Endpoint
    • ⚙️SDK - Overview
  • Additional Info
    • Error Messages
    • Client-Side Security Essentials
    • Compute Unit Costs
    • API Metadata
    • Audit Certificate
    • Brand Assets
    • FAQs
    • Quicknode Marketplace
      • DEX
      • Lending Protocols
  • ID's
    • Chain IDs
    • Bridge IDs
      • Internal Chain IDs for Bridges
    • DEX IDs
    • Lending Protocol IDs
    • Yield Aggregator ID
    • Liquid Staking IDs
    • Oracle IDs
    • Stablecoin IDs
    • Derivatives IDs
    • Synthetics IDs
  • Mapping
    • Blockchains
    • DEXs
      • Uniswap V2
      • Uniswap V3
      • Sushiswap
      • PancakeSwap
      • Curve
      • Balancer
    • Lending Protocols
      • Aave
      • Compound
  • Protocol Spender
    • Spender list
Powered by GitBook
On this page
  • Supported Chains
  • Available Endpoints:
  • DEX IDs
  • Endpoint Details
  • /getprice
  • /getuserliquidity
  • /getpoolliquidity
  • /gettokenliquidity
  • /getpoolindividualliquidity
  • /getindividualposition
  • /swap
  • /addliquidity
  • /removeliquidity
  1. INTEGRATIONS
  2. DEX & DEX Aggregators

PancakeSwap V3

PreviousPancakeSwap V2NextAerodrome

Last updated 1 month ago

Supported Chains

Available on Arbitrum, Base, Binance Smart Chain, Ethereum and zkSync Era.

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 PancakeSwap V3.

  • 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 liquidity position for a specified user address across all the pools for a given DEX.

  • 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.

DEX Name
Chain
DEX ID

PancakeSwap V3

Arbitrum

2808

PancakeSwap V3

Base

2809

PancakeSwap V3

Binance Smart Chain

2800

PancakeSwap V3

Ethereum

2810

PancakeSwap V3

zkSync Era

2811

Endpoint Details

/getprice

Returns the swap quotation for a given token pair on PancakeSwap V3

GET https://api.expand.network/dex/getprice

Query Parameters

Name
Type
Description

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.

poolFees

String

Different pool based on the fees. By default, it is selected as 3000.

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

Name
Type
Description

rpc

String

Remote procedural call URL.

tokenId*

String

The token ID for PancakeSwap V3 liquidity position.

dexId*

String

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

Name
Type
Description

rpc

String

Remote procedural call URL.

poolAddress*

String

Pool address whose liquidity is to be fetched.

dexId*

String

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

Name
Type
Description

rpc

String

Remote procedural call URL.

poolAddress*

String

The pool address.

dexId*

String

https://api.expand.network/dex/gettokenliquidity?dexId=2800&poolAddress=0xd710DaC10B7255fCc0eC929a0e742A18F25b6395
{
    "status": 200,
    "msg": "success",
    "data": {
        "Cake": "590637823886899595162",
        "WBNB": "866859192915598532"
    }
}

/getpoolindividualliquidity

Returns all user addresses, block numbers, and token position details for a specified pool address.

GET https://historicallp.api.expand.network/dex/getpoolindividualliquidity

Query Parameters

Name
Type
Description

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.

https://historicallp.api.expand.network/dex/getpoolindividualliquidity?poolAddress=0x588d7cf062f4edd7c7c7f2d66fd770e03b1ea735&dexId=2800&startBlock=44738053&endBlock=44738153
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "userAddress": "0xb114dfcce738e7b753a9005a343bf9ca8686c2b4",
            "liquidityData": [
                {
                    "blockNumber": "44738153",
                    "transactionHash": "0x3963520633ef30a4ebb99cdf75e5c921e52cb909051d17efe359244dc8a5f85a",
                    "assets": {
                        "CAT": "2682843343703379432904002",
                        "WBNB": "1000000000000000000"
                    }
                }
            ]
        }
    ]
}

/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

Name
Type
Description

rpc

String

Remote procedural call URL.

address*

String

The public address of the liquidity holder.

dexId*

String

poolAddresses

String

The pool Addresses whose liquidity is to be fetched. (Comma-separated vaules)

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

Name
Type
Description

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.

amountOutMin*

String

Minimum amount accepted as a result of swap.

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.

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.

poolFees

String

Different pool based on the fees. By default, it is selected as 3000.

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

{
    "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"
    }
}

With ofacCheck:

{
    "dexId": "2800",
    "path": ["0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "0x55d398326f99059fF775485246999027B3197955"],
    "amountIn":"1000000000000",
    "gas": "100000",
    "to": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
    "amountOutMin": "100",
    "from": "0xf67d5d28614f26f56a73E635197534871D4ACf14",
    "poolFees": "10000",
    "involveBaseToken": "1",
    "deadline": "19999999999999",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "40000",
        "data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "gasPrice": "499498318",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "e9bfe6229a844227a92a2f6669aa1da0"
    }
}

/addliquidity

Add liquidity to a specified pool in a specified DEX.

POST https://api.expand.network/dex/addliquidity

Request Body

Name
Type
Description

dexId*

String

tokenA*

String

Address of the first token being added.

tokenB*

String

Address of the second token being added.

poolFees*

String

Different pool based on the fees.

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.

tokenId

String

The token ID for PancakeSwap V3 liquidity position.

gasPriority

String

low, medium, or high.

slippage

String

Percentage of total 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

{
    "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"
    }
}

With ofacCheck:

{
    "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",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "40000",
        "data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "gasPrice": "499498318",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "e9bfe6229a844227a92a2f6669aa1da0"
    }
}

/removeliquidity

Remove liquidity from a specified pool for a specified DEX.

POST https://api.expand.network/dex/removeliquidity

Request Body

Name
Type
Description

dexId*

String

tokenId*

String

The token ID for PancakeSwap V3 liquidity position.

amountAMin

String

Minimum amount of Token A.

amountAMax

String

Maximum amount of Token A.

amountBMax

String

Maximum amount of Token B.

recipient

String

Recipient for sweep tokens.

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.

tokenA*

String

Address of the first token being removed.

tokenB

String

Address of the second token being removed.

liquidity*

string

The liquidity to be removed.

amountBMin

String

Minimum amount of Token B.

gasPriority

String

low, medium, or high.

slippage

String

Percentage of total 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

{
    "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"
    }
}

With ofacCheck:

{
    "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",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "40000",
        "data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "gasPrice": "499498318",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "e9bfe6229a844227a92a2f6669aa1da0"
    }
}

See the page for a list of all DEX IDs.

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.

⛓️
⚡
/getprice
/getuserliquidity
/getpoolliquidity
/gettokenliquidity
/getindividualposition
/swap
/addliquidity
/removeliquidity
back to top
back to top
back to top
back to top
back to top
back to top
back to top
back to top
DexId
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID