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
  • /getliquidityholders
  • /getindividualposition
  • /getpoolindividualliquidity
  • /gethistoricaltimeseries
  • /gethistoricaltransactions
  • /swap
  • /addliquidity
  • /removeliquidity
  1. INTEGRATIONS
  2. DEX & DEX Aggregators

PancakeSwap V2

PreviousSushiswap V2NextPancakeSwap V3

Last updated 1 month ago

Supported Chains

Available on Aptos, Binance Mainnet, and Binance Testnet.

Available Endpoints:

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.

DEX IDs

Many endpoints have a parameter where you can provide a DEX ID.

DEX Name
Chain
DEX ID

PancakeSwap V2

Binance Smart Chain

1200

PancakeSwap V2

Binance Smart Chain Testnet

1201

PancakeSwap V2

Aptos

2900

PancakeSwap V2

Aptos Testnet

2901

Endpoint Details

/getprice

Returns the swap quotation for the given token pair.

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.

https://api.expand.network/dex/getprice?dexId=1200&path=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c,0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82&amountIn=10000000000000000000
{
    "status": 200,
    "msg": "success",
    "data": {
        "amountIn": "10000000000000000000",
        "path": [
            "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
            "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82"
        ],
        "amountsOut": [
            "10000000000000000000",
            "771915564765835452853"
        ]
    }
}

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

tokenA*

String

Address of token.

address*

String

Public address of liquidity provider.

dexId*

String

tokenB*

String

Address of token

https://api.expand.network/dex/getuserliquidity?address=0x6fb447ae94f5180254d436a693907a1f57696900&dexId=1200&tokenA=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c&tokenB=0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82
{
    "status": 200,
    "msg": "success",
    "data": {
        "pairAddress": "0x0eD7e52944161450477ee417DE9Cd3a859b14fD0",
        "liquidity": "0",
        "tokenA": "0",
        "tokenB": "0"
    }
}

Query Parameters for APTOS

Name
Type
Description

rpc

String

Remote procedural call URL.

poolAddress*

String

Address of token.

address*

String

Public address of liquidity provider.

dexId*

String

https://api.expand.network/dex/getuserliquidity?dexId=2901&poolAddress=0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa%3A%3Aswap%3A%3ALPToken%3C0x1%3A%3Aaptos_coin%3A%3AAptosCoin%2C0x8c805723ebc0a7fc5b7d3e7b75d567918e806b3461cb9fa21941a9edc0220bf%3A%3Adevnet_coins%3A%3ADevnetBNB%3E&address=0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b
{
    "status": 200,
    "msg": "success",
    "data": {
        "pairAddress": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa::swap::LPToken<0x1::aptos_coin::AptosCoin,0x8c805723ebc0a7fc5b7d3e7b75d567918e806b3461cb9fa21941a9edc0220bf::devnet_coins::DevnetBNB>",
        "liquidity": "3000",
        "tokenA": "2138066",
        "tokenB": "20"
    }
}

/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=1200&poolAddress=0x460b4193Ec4C1a17372Aa5FDcd44c520ba658646
{
    "status": 200,
    "msg": "success",
    "data": {
        "totalLiquidity": "2790235114583215"
    }
}

/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=1200&poolAddress=0x460b4193Ec4C1a17372Aa5FDcd44c520ba658646
{
    "status": 200,
    "msg": "success",
    "data": {
        "CTK": "73040589498",
        "WBNB": "163589136764841979343"
    }
}

/getliquidityholders

Returns the total number of liquidity holders in the specified pool. Currently Available on Binance.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

poolAddress*

String

The pool address.

dexId*

String

https://api.expand.network/dex/getliquidityholders?dexId=1200&poolAddress=0x460b4193Ec4C1a17372Aa5FDcd44c520ba658646
{
    "status": 200,
    "msg": "success",
    "data": {
        "totalTokenHolders": "40"
    }
}

/getindividualposition

Returns the liquidity position for a specified user address across all the pools for the DEX. Currently available on Binance

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

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)

https://api.expand.network/dex/getindividualposition?poolAddresses=0xC05654C66756eBB82c518598c5f1ea1a0199a563&address=0x8f295a22a4a5ef346192d2b2d4c483d9f76b2a67&poolSize=1000&dexId=1200
{
    "status": 200,
    "msg": "success",
    "data": {
        "aggregatedLiquidity": "0",
        "poolAddresses": {
            "USTmAMZN": {
                "0xC05654C66756eBB82c518598c5f1ea1a0199a563": "0"
            }
        }
    }
}

/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=0xc736ca3d9b1e90af4230bd8f9626528b3d4e0ee0&dexId=1200&startBlock=44752009&endBlock=44753009
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "userAddress": "0x24397a020cc26ba3084e3f8106f3e597f962c034",
            "liquidityData": [
                {
                    "blockNumber": "44753009",
                    "transactionHash": "0x7f4353626685cd1d13f3f6add484eacc2cc8c6fea64cb6c28937a7d2975fa586",
                    "assets": {
                        "WBNB": "3729419725858309",
                        "BabyDoge": "445796452803705450"
                    }
                }
            ]
        },
        {
            "userAddress": "0xf4c21a1cb819e5f7abe6defde3d118d8f3d61fa7",
            "liquidityData": [
                {
                    "blockNumber": "44752833",
                    "transactionHash": "0xb854f4a4ba18144d9f6d485ddaae36f4441882a4fb6dca646c6d8bdfcb367983",
                    "assets": {
                        "WBNB": "997500000028",
                        "BabyDoge": "118695543460105"
                    }
                }
            ]
        }
    ]
}

/gethistoricaltimeseries

Get the historical time series transactions for a specific pool address. Currently available on Binance

GET https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries

Query Parameters

Name
Type
Description

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.

https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries?dexId=1200&poolAddress=0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae&startBlock=18675000&endBlock=18675639
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "USDT/WBNB",
        "priceData": [
            {
                "hash": "0xa4e7be3c64891136a667454270401c96862b530242a8b66d2935512d26eea240",
                "timestamp": 1655192852,
                "price": "0.004358852942015572"
            },
            {
                "hash": "0xfc445916adc369b5a7717808b2d2380407aa707d7b81bcda9705b9ac0cc43caf",
                "timestamp": 1655192852,
                "price": "0.004337034359420212"
            },
            {
                "hash": "0x05c2f77bc5157eba0db611c967955be3e54c15abf61a6e655010449336291651",
                "timestamp": 1655192852,
                "price": "0.004337047750174369"
            },
            {
                "hash": "0x91adb38cf7f98fc03960c26ec4085c771561475788990af71dfa9012975a4d4d",
                "timestamp": 1655192852,
                "price": "0.004337070125743882"
            },
            {
                "hash": "0xd0e91cd038b18db3ea774d25375143e920613e18229cc6f1a41255b276c54eff",
                "timestamp": 1655192852,
                "price": "0.004358845309343015"
            },
            {
                "hash": "0xbcbd869b9279b615fe448cceb49658effd9a200e277edeb2739744b93f65f23d",
                "timestamp": 1655192849,
                "price": "0.0043588399027473515"
            },
            {
                "hash": "0x454ebac31c3be6ea198b44a50ae2ca51ee6e5c944a2de0602a67b9ec08bcdbd2",
                "timestamp": 1655192849,
                "price": "0.004358806972252251"
            },
            {
                "hash": "0xdf459434fd3742280d7974148d081f6299574b5157f84f157b21c10085fcf8e5",
                "timestamp": 1655192849,
                "price": "0.004358688622314105"
            },
            {
                "hash": "0x8361faaf2587cdec84f2a0ea41242d001b5f929d890051b602d7de4eeb9a497c",
                "timestamp": 1655192849,
                "price": "0.0043368340207808895"
            },
            {
                "hash": "0x0be5699c728432639245b5a6c4695438bfe3224e4eec2b327dab1c45eee6710f",
                "timestamp": 1655192849,
                "price": "0.004336857766910803"
            },
            {
                "hash": "0xc848656fe95f61858d8ff8c4910bc5b69e198653ebc21034b2ae045d65ac0521",
                "timestamp": 1655192846,
                "price": "0.004358629672082426"
            },
            {
                "hash": "0x791aae590fefadb4fb3422a216aed0e55b271df12062291aebc3e53745388f23",
                "timestamp": 1655192846,
                "price": "0.004336885209614627"
            },
            {
                "hash": "0xf948b7e4479f12509de652876faa6ad6ff80e9b93ed7c13d30bb879dbce71095",
                "timestamp": 1655192846,
                "price": "0.00433692364846471"
            },
            {
                "hash": "0x2d15e55b576aa93dc56e2c0cb40f39603ba3bfea7fd8f8127f3703ef19037dbf",
                "timestamp": 1655192846,
                "price": "0.004336941452759448"
            },
            {
                "hash": "0xda519c4ad1ac81eef91d811070c2ce7aaaf73c26130fff0c2d75e4060320219c",
                "timestamp": 1655192846,
                "price": "0.0043369887652104176"
            },
            {
                "hash": "0x23aff53216899aa1487850ea5f5bf612809a0e54f9249038a59d22df5b3479d0",
                "timestamp": 1655192843,
                "price": "0.004337022248686662"
            },
            {
                "hash": "0x6578930cb092f99ebc02e0d953c7af541376bdd032b9ba0f451836c14ae9a052",
                "timestamp": 1655192843,
                "price": "0.004358738297104802"
            },
            {
                "hash": "0x4f7f69ece57edb492c9bc3843b937e5738e6c28b24a2932b7587a2900b2cdb4d",
                "timestamp": 1655192843,
                "price": "0.004358637548123467"
            },
            {
                "hash": "0xd6569ff1abc750321dd683d2b9ce0d7b6f0d1dae7905e206a1d9b75315f425ac",
                "timestamp": 1655192831,
                "price": "0.00435856778887612"
            },
            {
                "hash": "0x798aa48de7896143e1626e60150c67692792f0b55667e697af6df4fdb8f505ab",
                "timestamp": 1655192831,
                "price": "0.004336801456985259"
            },
            {
                "hash": "0x798aa48de7896143e1626e60150c67692792f0b55667e697af6df4fdb8f505ab",
                "timestamp": 1655192831,
                "price": "0.004336801501292449"
            },
            {
                "hash": "0xbb9864acf695370b923afc0129311e66b8acf069bddcd8e9c33b32cefa793a11",
                "timestamp": 1655192831,
                "price": "0.0043368030469385695"
            },
            {
                "hash": "0x1d2889468b253063a8064379b449d4c832dd711643822e00b77c1a7faa6ee12d",
                "timestamp": 1655192831,
                "price": "0.004358566285450221"
            },
            {
                "hash": "0x11c01dafcd48e5dda30fc69a49ec88432a891b195227c32506e9748f7d3bff72",
                "timestamp": 1655192831,
                "price": "0.004336847740684698"
            },
            {
                "hash": "0x487ec3d3d56d518067fe0389bb10ab94f378e78f97919c5d6598a6a68eed8d25",
                "timestamp": 1655192831,
                "price": "0.0043608408925375165"
            },
            {
                "hash": "0xf4ebb66455d4a7cad46aec25fc8685e7910494d46ff6bda3a1951182d879194b",
                "timestamp": 1655192831,
                "price": "0.004336938355279746"
            },
            {
                "hash": "0xdb3670b569d0a9ee510cbcdf7aabc88b600503c094770204ae67e3c3e3b7114a",
                "timestamp": 1655192828,
                "price": "0.0043587619240398195"
            },
            {
                "hash": "0xe127e43a7a0bf909779bf022f271cbce881bde0b91cbec2e2a45580f086c8d17",
                "timestamp": 1655192828,
                "price": "0.004337185440945262"
            },
            {
                "hash": "0xb7e91a51e4e4dbaac8e9c5020a55573b34733d58f94c75c0b558d329553920de",
                "timestamp": 1655192828,
                "price": "0.004337380650207665"
            },
            {
                "hash": "0x239065c70237bdf70c71d8c9f32507ccffd7b8ae6f1307d1767a8f3e5f1c6594",
                "timestamp": 1655192828,
                "price": "0.004337441760628281"
            },
            {
                "hash": "0x485528434a50577fb8edb887581d53a4a31b359cf1b20a8048381911e053608d",
                "timestamp": 1655192828,
                "price": "0.004359260988922678"
            },
            {
                "hash": "0xf44680d3d3dcd9abbeec85d595ba14bb67b79f6c2f72b2fe38e708f756efa81d",
                "timestamp": 1655192828,
                "price": "0.004359242173012291"
            },
            {
                "hash": "0x8c3555fd7abad3acb109716ce549e328693ce357da69e9a54c7a37a0f7c7e927",
                "timestamp": 1655192828,
                "price": "0.004337469152200651"
            },
            {
                "hash": "0x8557537d52021cb4e2ebf0389de962f2affbbd1578e9e9d91674596de84a8b13",
                "timestamp": 1655192825,
                "price": "0.0043374792948373915"
            },
            {
                "hash": "0xd4b5151b9a5a07e49024186dacff0b7a8d23198f917c093cf583c4771ec9d422",
                "timestamp": 1655192825,
                "price": "0.004359240929032785"
            },
            {
                "hash": "0x67604272ca2b8b89e33b1e6a1b9c89db75635e1d78f5cf2c8e49b9f3a21c1b2f",
                "timestamp": 1655192825,
                "price": "0.004337933190955034"
            },
            {
                "hash": "0x865fb5fcb394c48fd40557768f08f3d69bd7c87f607ec44f13b0b2eeada11c80",
                "timestamp": 1655192822,
                "price": "0.004360170392030563"
            },
            {
                "hash": "0xffd100d86343e20788a8abb48660d40b6714b8b20ef1d47a98b8cc99b8257231",
                "timestamp": 1655192822,
                "price": "0.004360163275274439"
            },
            {
                "hash": "0x494090254f82033f54aa5308e5d9a83e3d78a2408eb2538e03ff46397341afd4",
                "timestamp": 1655192822,
                "price": "0.004338392721513588"
            },
            {
                "hash": "0xe6e38a577cef9a729697c8ad08e14de932fd12bc896821d13f5dbb6c6dbf1f33",
                "timestamp": 1655192822,
                "price": "0.004338399897695004"
            },
            {
                "hash": "0x2a649227209c1016e18c5c01019578ae79f00c64aff230fe1e2fcd855662c3f9",
                "timestamp": 1655192822,
                "price": "0.004360024464759858"
            },
            {
                "hash": "0x51bf4d9c11fd14e26ddd84e918dcb015cdc98da31f707ed4ecab24ad0a057da0",
                "timestamp": 1655192822,
                "price": "0.004359871750374781"
            }
        ]
    }
}

/gethistoricaltransactions

Get the historical transactions focusing on swaps associated with a specific pool address. Currently available on Binance

GET https://historicaltrade.api.expand.network/dex/gethistoricaltransactions

Query Parameters

Name
Type
Description

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.

https://historicaltrade.api.expand.network/dex/gethistoricaltransactions?poolAddress=0x05616b7b6da03fb4c773b76663816b360ccaede4&dexId=1200&startBlock=34544519&endBlock=34548560
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "TOKEN/WBNB",
        "transactions": [
            {
                "transactionHash": "0x0e0333c6bcdcf9a09841e815bdaffc55b1a069f78c33541918f8aa800ce5327a",
                "transactionDetails": {
                    "blockHash": "0x3a9f5de42cdaddbeea0f6c40ed4d991dd9fd3aaf0831dfa08719c552c60ba1cf",
                    "blockNumber": "34548096",
                    "from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
                    "gas": "1827825",
                    "gasPrice": "3150000000",
                    "hash": "0x0e0333c6bcdcf9a09841e815bdaffc55b1a069f78c33541918f8aa800ce5327a",
                    "input": "0x5c11d7950000000000000000000000000000000000000000000000000000085413a733ff0000000000000000000000000000000000000000000000000f5980b344c4c06400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d67066000000000000000000000000000000000000000000000000000000006584352500000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
                    "nonce": "435338",
                    "to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
                    "transactionIndex": "99",
                    "value": "0",
                    "type": "0",
                    "chainId": "56",
                    "v": "0x94",
                    "r": "0x9c5367e8276ca0c88cd100418d73a4c04adf8e4718a88ee29fac96b695cd504b",
                    "s": "0x664a7ddf2587ec3ea192682053a2502280be34ff5088dce30621655aa27d965f"
                }
            },
            {
                "transactionHash": "0x110647ed390ad69b08e40d1432aa4c402df4506ae5f9f897860ea4e241c78dd6",
                "transactionDetails": {
                    "blockHash": "0xfdc0e116f2a20e13cca8be61c46ee1ad214ae628aca4cbff508f5d6bcf5a663d",
                    "blockNumber": "34548119",
                    "from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
                    "gas": "1827825",
                    "gasPrice": "3150000000",
                    "hash": "0x110647ed390ad69b08e40d1432aa4c402df4506ae5f9f897860ea4e241c78dd6",
                    "input": "0x5c11d795000000000000000000000000000000000000000000000000000007b28e1f777f0000000000000000000000000000000000000000000000000e28e19e4a923e9200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d67066000000000000000000000000000000000000000000000000000000006584356d00000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
                    "nonce": "435345",
                    "to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
                    "transactionIndex": "73",
                    "value": "0",
                    "type": "0",
                    "chainId": "56",
                    "v": "0x93",
                    "r": "0x7477029e608e4d564193bb46c7a4044d4ef1a0c3bf7687433fbd181a2131b245",
                    "s": "0x5767ce7bf8f51df4c456045d909af1742d2d0df4d6163a78c4430d1129c9ff26"
                }
            },
            {
                "transactionHash": "0xe769eff1adc2a66523b3d6a05cfd1b21dd94868fdb8877211a885d80bd7bf08b",
                "transactionDetails": {
                    "blockHash": "0xd1a4f2635e456989f625a79c6bff75a4a40820141b66f12f0300764360e24795",
                    "blockNumber": "34548323",
                    "from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
                    "gas": "1827825",
                    "gasPrice": "3150000000",
                    "hash": "0xe769eff1adc2a66523b3d6a05cfd1b21dd94868fdb8877211a885d80bd7bf08b",
                    "input": "0x5c11d795000000000000000000000000000000000000000000000000000012a0a5755eff00000000000000000000000000000000000000000000000022132516d135029700000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d6706600000000000000000000000000000000000000000000000000000000658437d100000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
                    "nonce": "435378",
                    "to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
                    "transactionIndex": "57",
                    "value": "0",
                    "type": "0",
                    "chainId": "56",
                    "v": "0x94",
                    "r": "0xf6c95a653ee9dd9f04728440793c74b6e3ca49eee205995962b80de99f006e8e",
                    "s": "0x5b635a90c526104ad6d3b472337c0dc44e36318bb51cbd87b918c276e484de5a"
                }
            },
            {
                "transactionHash": "0xa08b6126adc8fdf526282c08c7598cca0d9660cf032bf7e2625dd1d3c3c02646",
                "transactionDetails": {
                    "blockHash": "0x011eb51371dc7fab04aec4747e39f1b19157cedaf7aa46ea359f2b81bc139056",
                    "blockNumber": "34548078",
                    "from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
                    "gas": "1827825",
                    "gasPrice": "3150000000",
                    "hash": "0xa08b6126adc8fdf526282c08c7598cca0d9660cf032bf7e2625dd1d3c3c02646",
                    "input": "0x5c11d7950000000000000000000000000000000000000000000000000000071f616e4fff0000000000000000000000000000000000000000000000000d1d45cca8f0270100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d6706600000000000000000000000000000000000000000000000000000000658434f200000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
                    "nonce": "435333",
                    "to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
                    "transactionIndex": "89",
                    "value": "0",
                    "type": "0",
                    "chainId": "56",
                    "v": "0x93",
                    "r": "0xd47769d5b84274a60e08883f55134123c07ba0b49ab6633e6ead301bbfbe3de7",
                    "s": "0x4fae3d9c98bbef24a76cb8827f08fae2d1ea3c647a8f9416cca379e463d0957c"
                }
            },
            {
                "transactionHash": "0x8b8c30a219f64ab57b08795bb42cc31b92e6abb9af1f8f553cbfda629f95643e",
                "transactionDetails": {
                    "blockHash": "0x6f4462177d6bddbc9983699e8c47428378a076a6ac5dd18b991c806361197dad",
                    "blockNumber": "34548558",
                    "from": "0x05d99efbc49b74751521234ce0509c9ffcc6d2b7",
                    "gas": "600000",
                    "gasPrice": "3000000001",
                    "hash": "0x8b8c30a219f64ab57b08795bb42cc31b92e6abb9af1f8f553cbfda629f95643e",
                    "input": "0x95435ac9000000000000000000000000000000000000000000000000000005b0462445570000000000000000000000000000000000000171007ac8f660d8c2f3a24076f60000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b5280000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000001847000000000000000000000000005616b7b6da03fb4c773b76663816b360ccaede40000000000000000000000000000000000000000000000000000000065843a88",
                    "nonce": "9739",
                    "to": "0x802b65b5d9016621e66003aed0b16615093f328b",
                    "transactionIndex": "97",
                    "value": "0",
                    "type": "0",
                    "chainId": "56",
                    "v": "0x94",
                    "r": "0x5999271baa6c0d69f286aca11f07f58f1f5d82a4b583a03f705813bba2a4cec0",
                    "s": "0x679efd2ccddd7c6e123062129a2b4f1536a160b506e701282a5b4550fdff61e7"
                }
            }
        ]
    }
}

/swap

Initiate a swap transaction on a specified DEX.

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

Request Body

Name
Type
Description

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

{
    "dexId": "1200",
    "amountIn": "120000000",
    "amountOutMin": "0",
    "path": ["0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "0xCC42724C6683B7E57334c4E856f4c9965ED682bD"],
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1664529286",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "29880"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "29880",
        "data": "0x38ed17390000000000000000000000000000000000000000000000000000000007270e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006336b3860000000000000000000000000000000000000000000000000000000000000002000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd",
        "estimationCheck": true,
        "referenceId": "48d6003c0aad431aa571e798bfe102ba"
    }
}

With gasPriority:

{
    "dexId": "1200",
    "amountIn": "120000000",
    "amountOutMin": "0",
    "path": [
        "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
        "0xCC42724C6683B7E57334c4E856f4c9965ED682bD"
    ],
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1704529286",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "298800",
    "gasPriority": "medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "298800",
        "data": "0x38ed17390000000000000000000000000000000000000000000000000000000007270e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000065990d860000000000000000000000000000000000000000000000000000000000000002000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd",
        "gasPrice": "1200000000",
        "estimationCheck": true,
        "referenceId": "d5b4b5fd364e4b39b0f442d50a02981f"
    }
}

With slippage:

{
    "dexId": "1200",
    "amountIn": "120000000",
    "amountOutMin": "0",
    "path": [
        "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
        "0xCC42724C6683B7E57334c4E856f4c9965ED682bD"
    ],
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1664529286",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "29880",
    "slippage": "8.033543322"
}

With slippage:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "29880",
        "data": "0x38ed17390000000000000000000000000000000000000000000000000000000007270e000000000000000000000000000000000000000000000000000000001d4cfff6d600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006336b3860000000000000000000000000000000000000000000000000000000000000002000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd",
        "estimationCheck": true,
        "referenceId": "3e1edd8eab9647d2805d390ce581446a"
    }
}

With ofacCheck:

{
    "dexId": "1200",
    "amountIn": "120000000",
    "amountOutMin": "0",
    "path": [
        "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
        "0xCC42724C6683B7E57334c4E856f4c9965ED682bD"
    ],
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1664529286",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "29880",
    "slippage": "8.033543322",
    "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"
    }
}

Request Body for APTOS

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.

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

{
    "amountIn": "100000000",
    "from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
    "path": [
        "0x1::aptos_coin::AptosCoin",
        "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
    ],
    "slippage": "100",
    "dexId": "2900",
    "gas": "1000"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1400",
        "from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
        "to": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa",
        "data": "HDJm7KON+HAmJViEGStZeerCTPDax6M8+nrw0nZR+0x0mwAAAAAAAALH77QHbb4UPLzZjPqqkp7PyPKZID3/9juVzLa/4ZhQ+gZyb3V0ZXIQc3dhcF9leGFjdF9pbnB1dAIHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKYXB0b3NfY29pbglBcHRvc0NvaW4AB/Ir7eI3oH4SG1bZGkket7zf0fWQeSap5YM4+WSgGxf6BWFzc2V0BFVTREMAAggA4fUFAAAAAAgAAAAAAAAAAOgDAAAAAAAAZAAAAAAAAADXZCpnAAAAAAE=",
        "referenceId": "ad8bf08874b74aa3ab28e07d08817833"
    }
}

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

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

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "amountADesired": "50000000000000000",
    "amountBDesired": "77926115",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1663181575",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "2307200"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "2307200",
        "data": "0xe8e33700000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000004a50ee30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000063222307",
        "estimationCheck": true,
        "referenceId": "a2e6a4c61ef14fcc9edfe40b28866b2e"
    }
}

With gasPriority:

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "amountADesired": "50000000000000000",
    "amountBDesired": "77926115",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1663181575",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "2307200",
    "gasPriority": "medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "2307200",
        "data": "0xe8e33700000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000004a50ee30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000063222307",
        "gasPrice": "1200000000",
        "estimationCheck": true,
        "referenceId": "a156e92fdc4c46b083decc0d54f2d511"
    }
}

With slippage:

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "amountADesired": "50000000000000000",
    "amountBDesired": "77926115",
    "amountAMin": "10000000000000000",
    "amountBMin": "100000",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1663181575",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "2307200",
    "slippage": "5"
}

With slippage:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "2307200",
        "data": "0xe8e33700000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000004a50ee30000000000000000000000000000000000000000000000000021c0331d5dc000000000000000000000000000000000000000000000000000000000000001731800000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000063222307",
        "estimationCheck": true,
        "referenceId": "b0bede7098564f478dd175b0e469518e"
    }
}

With ofacCheck:

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "amountADesired": "50000000000000000",
    "amountBDesired": "77926115",
    "amountAMin": "10000000000000000",
    "amountBMin": "100000",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1663181575",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "2307200",
    "slippage": "5",
    "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"
    }
}

Request Body for APTOS

Name
Type
Description

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

{
    "amountIn": ["10000000","15299"],
    "from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
    "path": [
        "0x1::aptos_coin::AptosCoin",
        "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
    ],
    "slippage": "100",
    "dexId": "2900",
    "gas":"1000"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1400",
        "from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
        "to": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa",
        "data": "HDJm7KON+HAmJViEGStZeerCTPDax6M8+nrw0nZR+0x0mwAAAAAAAALH77QHbb4UPLzZjPqqkp7PyPKZID3/9juVzLa/4ZhQ+gZyb3V0ZXINYWRkX2xpcXVpZGl0eQIHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKYXB0b3NfY29pbglBcHRvc0NvaW4AB/Ir7eI3oH4SG1bZGkket7zf0fWQeSap5YM4+WSgGxf6BWFzc2V0BFVTREMABAiAlpgAAAAAAAjDOwAAAAAAAAgAAAAAAAAAAAgAAAAAAAAAAOgDAAAAAAAAZAAAAAAAAABGZypnAAAAAAE=",
        "referenceId": "5eda11210b804dceb98d5edc2b95d39f"
    }
}

/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

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

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "liquidity": "163742355742154761",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1663231732",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "842720"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "842720",
        "data": "0xbaa2abde000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd0000000000000000000000000000000000000000000000000245bace14b260090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006322e6f4",
        "estimationCheck": true,
        "referenceId": "ae5c692da558439f957a79b02f643ff3"
    }
}

With gasPriority:

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "liquidity": "163742355742154761",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1703231732",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "842720",
    "gasPriority": "medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "842720",
        "data": "0xbaa2abde000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd0000000000000000000000000000000000000000000000000245bace14b260090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000658540f4",
        "gasPrice": "1200000000",
        "estimationCheck": true,
        "referenceId": "e26f31fe348b4e0f908d43a0bbee737b"
    }
}

With slippage:

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "liquidity": "163742355742154761",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1663231732",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "842720",
    "slippage": "5"
}

With slippage:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "56",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "value": "0",
        "gas": "842720",
        "data": "0xbaa2abde000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd0000000000000000000000000000000000000000000000000245bace14b260090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006322e6f4",
        "estimationCheck": true,
        "referenceId": "18db57819cea4d9d9fefa224e866c2a9"
    }
}

With ofacCheck:

{
    "dexId": "1200",
    "tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
    "tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
    "liquidity": "163742355742154761",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1663231732",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "842720",
    "slippage": "5",
    "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"
    }
}

Request Body for APTOS

Name
Type
Description

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

{
    "liquidity": "1000",
    "from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
    "path": [
        "0x1::aptos_coin::AptosCoin",
        "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
    ],
    "slippage": "10",
    "dexId": "2900",
    "gas":"1000"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1400",
        "from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
        "to": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa",
        "data": "HDJm7KON+HAmJViEGStZeerCTPDax6M8+nrw0nZR+0x1mwAAAAAAAALH77QHbb4UPLzZjPqqkp7PyPKZID3/9juVzLa/4ZhQ+gZyb3V0ZXIQcmVtb3ZlX2xpcXVpZGl0eQIHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKYXB0b3NfY29pbglBcHRvc0NvaW4AB/Ir7eI3oH4SG1bZGkket7zf0fWQeSap5YM4+WSgGxf6BWFzc2V0BFVTREMAAwjoAwAAAAAAAAgAAAAAAAAAAAgAAAAAAAAAAOgDAAAAAAAAZAAAAAAAAACnaCpnAAAAAAE=",
        "referenceId": "74b41523d0d74d21920f02974ece488a"
    }
}

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.

⛓️
⚡
DEX ID page
/getprice
/getuserliquidity
/getpoolliquidity
/gettokenliquidity
/
getliquidityholders
/
getindividualposition
/
getpoolindividualliquidity
/
gethistoricaltimeseries
/
gethistoricaltransactions
/
swap
/
addliquidity
/
removeliquidity
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID