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
  • /gettokenlist
  • /getpools
  • /gethistoricalpoolchartdata
  • /quoteaggregator
  • /getwalletposition
  • /swapaggregator
  • /swapwithapproval
  • /getliquiditybytick
  • /getusertokenids
  1. INTEGRATIONS

DEX & DEX Aggregators

Provides connectivity across the various decentralized exchanges available on the EVM and Non-EVM chains.

Below are descriptions of the endpoints we support for DEXs and DEX Aggregators:

Name
Description

getprice GET

Returns the swap quotation for the given token pairs for the specified DEX.

getuserliquidity GET

Returns the balance of a particular token pair of an account.

getpoolliquidity GET

Returns the total liquidity for a specified pool.

gettokenliquidity GET

Returns the individual token liquidity within the specified liquidity pool.

Source details for the 100 most recently minted tokens, including token address, symbol, name, logo url, and supported DEXs.

getliquidityholders GET

Returns the total number of liquidity holders in the specified pool.

getindividualposition GET

Returns the liquidity position for a specified user address across all the pools for a specified DEX.

getliquiditysources GET

Get the liquidity sources for the specified dex aggregator(on the basis of chain), supported by expand.network.

Returns a list of all the quotes for a pool on different DEXs.

gethistoricaltimeseries GET

Get the historical time series transactions for a specific pool address.

gethistoricaltransactions GET

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

getpooltradedata GET

Get the trade data from the pool within a specified block range, for the specified event type.

getpoolindividualliquidity GET

Get all user addresses, block numbers, and token position details for a specified pool address. Available for Uniswap V2,V3 and Sushiswap only.

Get detailed information for user transactions on various DEXs, including transaction type, block-related details, decoded parameters and many more.

Retrieves quotes from various DEXs & aggregators in a unified manner. For a specified pair address, this endpoint will return the respective quotes for each DEX in which the pair address is present.

swap POST

Initiate a swap transaction on a specified DEX.

addliquidity POST

Add liquidity to a specified pool in a specified DEX.

removeliquidity POST

Remove liquidity from a specified pool for a specified DEX.

Returns the aggregated prepared swap quotes for every DEX, in which the pair address is present.

This endpoint provides data on top activity pools across multiple DEXs (Uni V2, Uni V3, and Sushiswap V2) on Ethereum, offering key metrics like transactions, makers, buyers, sellers, volume, market cap, and liquidity with time intervals from 5 minutes to 24 hours.

Returns the approve and swap transaction on a DEX supported by Expand.

This endpoint provides the amount of liquidity distributed across different ticks for UniswapV3, TraderJoe and PancakeswapV3. Currently available for Ethereum,Avalanche, Binance and Polygon

getusertokenids

This endpoint provides the token IDs of all the active position NFTs the user holds.

/gettokenlist

Retrieves the details of token mapping for the top 100 trending tokens by default or retrieves the detail of specific token mapping by token address.Available for Uniswap V2, Uniswap V3, SushiSwap V2

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

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

tokenAddress

String

Address of the token.

https://api.expand.network/dex/gettokenlist
{
  "status": 200,
  "msg": "success",
  "data": {
    "tokenList": [
      {
        "contract_address": "0x99411eb6c3ff2a37a0e8c48d0c44b900e13710b4",
        "token_name": "Disdainful The Bear",
        "token_symbol": "DISDAIN",
        "decimals": "9",
        "logo_url": "https://assetlogo.expand.network/ethereum/DISDAIN.png",
        "availableDex": {
          "uniswapV2": [
            "0xc4201bfeefd9a08f58c5e2d0877f788167e07666"
          ]
        }
      },
      {
        "contract_address": "0x7ce0b3878bc54bfc989d2b3f9583a39ce7ad1b27",
        "token_name": "Megadeth by 𝓜𝓪𝓽𝓽 𝓕𝓾𝓻𝓲𝓮",
        "token_symbol": "MEGADETH",
        "decimals": "9",
        "logo_url": "https://assetlogo.expand.network/ethereum/MEGADETH.png",
        "availableDex": {
          "uniswapV2": [
            "0x18aa074ca80ffaf28aa0353a6dd2e528c9d6fc6b"
          ]
        }
      },
      {
        "contract_address": "0x63c5b611ee5b1f24a64aa0c423bc57eedc46a194",
        "token_name": "Pecky",
        "token_symbol": "PECKY",
        "decimals": "9",
        "logo_url": "https://assetlogo.expand.network/ethereum/PECKY.png",
        "availableDex": {
          "uniswapV2": [
            "0x8e07824021b06956f7bfb224bd3b11fb7c38c57b"
          ]
        }
      }
    ]
  }
}

/getpools

Returns a list of all the quotes for a pool on different DEXs.

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

Query Parameters

Name
Type
Description

dexId*

String

path*

String

Comma-separated values of token pair.

amountIn*

String

Amount of token.

https://api.expand.network/dex/getpools?dexId=1500,1400,1300&path=0x6b175474e89094c44da98b954eedeac495271d0f,0xdac17f958d2ee523a2206206994597c13d831ec7&amountIn=100000000000000000
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "dexId": "1300",
            "value": "99431"
        },
        {
            "dexId": "1400",
            "value": "130999"
        },
        {
            "dexId": "1500",
            "value": "99977"
        }
    ]
}

/gethistoricalpoolchartdata

/quoteaggregator

Returns a list of all the quotes for a pool on different DEXs. Available on EVM chains

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

Query Parameters

Name
Type
Description

chainId

String

path*

String

Comma-separated values of token pair.

amountIn*

String

Amount of token.

chainSymbol

String

excludedDexes

String

Comma-separated values of dexes to exclude.

poolFees

String

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

https://api.expand.network/dex/quoteaggregator?amountIn=1000000000000000000&chainId=56&path=0xa2b726b1145a4773f68593cf171187d8ebe4d495%2C0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c&poolFees=10000
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "dexId": "2201",
            "dexName": "Kyberswap",
            "amountIn": "1000000000000000000",
            "path": [
                "0xa2b726b1145a4773f68593cf171187d8ebe4d495",
                "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
            ],
            "amountsOut": [
                "1000000000000000000",
                "14798692142552944"
            ]
        },
        {
            "dexId": "1200",
            "dexName": "PancakeV2",
            "amountIn": "1000000000000000000",
            "path": [
                "0xa2b726b1145a4773f68593cf171187d8ebe4d495",
                "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
            ],
            "amountsOut": [
                "1000000000000000000",
                "14798544157111373"
            ]
        },
        {
            "bridgeId": "600",
            "bridgeName": "SquidRouterV2",
            "path": [
                "0xa2b726b1145a4773f68593cf171187d8ebe4d495",
                "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
            ],
            "amountIn": "1000000000000000000",
            "amountsOut": [
                "1000000000000000000",
                "14798544157111373"
            ]
        },
        {
            "dexId": "1604",
            "dexName": "0x",
            "amountIn": "1000000000000000000",
            "path": [
                "0xa2b726b1145a4773f68593cf171187d8ebe4d495",
                "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
            ],
            "amountsOut": [
                "1000000000000000000",
                "14776346340875706"
            ]
        },
        {
            "dexId": "1306",
            "dexName": "UniswapV3",
            "amountIn": "1000000000000000000",
            "path": [
                "0xa2b726b1145a4773f68593cf171187d8ebe4d495",
                "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
            ],
            "amountsOut": [
                "1000000000000000000",
                "14668717523072865"
            ]
        },
        {
            "dexId": "2800",
            "dexName": "PancakeV3",
            "amountIn": "1000000000000000000",
            "path": [
                "0xa2b726b1145a4773f68593cf171187d8ebe4d495",
                "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
            ],
            "amountsOut": [
                "1000000000000000000",
                "14620841622715545"
            ]
        }
    ]
}

/getwalletposition

Get the detailed DEXs positions for a wallet address. Available for Uniswap V2, Uniswap V3, Pancakeswap V2, Pancakeswap V3 and SushiSwap V2. Available on Ethereum only.

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

Query Parameters

Name
Type
Description

address*

String

Public address of the user.

https://historicallp.api.expand.network/dex/getwalletposition?address=0x28A5eC068ae7500cbf21B989D62C7a81e2665B18
{
  "status": 200,
  "msg": "success",
  "data": [
    {
      "protocol_name": "Uniswap v2",
      "protocol_id": "uniswap-v2",
      "protocol_url": "https://app.uniswap.org/pools/v2",
      "account_data": {},
      "total_projected_earnings_usd": {
        "daily": null,
        "weekly": null,
        "monthly": null,
        "yearly": null
      },
      "position": {
        "label": "liquidity",
        "tokens": [
          {
            "token_type": "supplied",
            "name": "Ocean Token",
            "symbol": "OCEAN",
            "contract_address": "0x7afebbb46fdb47ed17b22ed075cde2447694fb9e",
            "decimals": "18",
            "balance": "1.6081842334083308815902940220990230780999386e+23",
            "usd_price": 0.3606446348915287
          },
          {
            "token_type": "supplied",
            "name": "Wrapped Ether",
            "symbol": "WETH",
            "contract_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "decimals": "18",
            "balance": "164740674239285818005.81690560285198009496",
            "usd_price": 3711.793202043769
          },
          {
            "token_type": "defi-token",
            "name": "Uniswap V2",
            "symbol": "UNI-V2",
            "contract_address": "0xf063806d07fe742b031a543145fb46d1bc670fe8",
            "decimals": "18",
            "balance": "4814188687222267334774",
            "usd_price": null
          }
        ],
        "address": "0xf063806d07fe742b031a543145fb46d1bc670fe8",
        "balance_usd": 669481.6163110741,
        "total_unclaimed_usd_value": null,
        "position_details": {
          "reserve0": "160818.42334083308815902940220990230780999386",
          "reserve1": "164.74067423928581800581690560285198009496",
          "factory": "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",
          "pair": "0xf063806d07fe742b031a543145fb46d1bc670fe8",
          "share_of_pool": 26.97033761448816
        }
      }
    },
    {
      "protocol_name": "Uniswap v3",
      "protocol_id": "uniswap-v3",
      "protocol_url": "https://app.uniswap.org",
      "account_data": {},
      "total_projected_earnings_usd": {
        "daily": null,
        "weekly": null,
        "monthly": null,
        "yearly": null
      },
      "position": {
        "label": "Liquidity",
        "balance_usd": 92.79077171190019,
        "total_unclaimed_usd_value": 0,
        "tokens": [
          {
            "token_type": "supplied",
            "name": "USD Coin",
            "symbol": "USDC",
            "contract_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "decimals": "6",
            "balance": "0",
            "usd_price": 0.9984084045632092
          },
          {
            "token_type": "supplied",
            "name": "Wrapped Ether",
            "symbol": "WETH",
            "contract_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "decimals": "18",
            "balance": "24998906636503404",
            "usd_price": 3711.793202043769
          },
          {
            "token_type": "reward",
            "name": "USD Coin",
            "symbol": "USDC",
            "contract_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "decimals": "6",
            "balance": "0",
            "usd_price": 0.9984084045632092
          },
          {
            "token_type": "reward",
            "name": "Wrapped Ether",
            "symbol": "WETH",
            "contract_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "decimals": "18",
            "balance": "0",
            "usd_price": 3711.793202043769
          }
        ]
      }
    }
  ]
}

/swapaggregator

Returns the aggregated prepared swap quotes for every DEX, in which the pair address is present. Available on EVM chains.

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

Request Body

Name
Type
Description

chainId

String

path*

String

Comma-separated values of token pair.

amountIn*

String

Amount of token.

chainSymbol

String

from*

String

Address of the sender of the token.

gas*

String

Maximum gas limit provided by the sender, for the transaction.

to*

String

Address of the recipient of the token.

poolFees

String

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

excludedDexes

String

Comma-separated values of dexes to exclude.

bestNetPrice

Boolean

If true, the endpoint will sort the prepared transactions by amountsOut minus the amount of gas in descending order. Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.

bestQuote

Boolean

If true, the endpoint will sort the prepared transactions by amountsOut (the best quote) in descending order Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.

lowestGas

Boolean

If true, the endpoint will sort the prepared transactions by amount of gas in ascending order Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.

gasPriority

String

low, medium, or high.

{
    "path": [
        "0x3845badAde8e6dFF049820680d1F14bD3903a5d0",
        "0xD533a949740bb3306d119CC777fa900bA034cd52"
    ],
    "amountIn": "1000000000000000000",
    "gas": "800000",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "cheapestSwap": true,
    "gasPriority": "high",
    "bestSwap": true,
    "chainId": "1"
}
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "dexName": "0x",
            "amountsOut": "454801638754490972",
            "chainId": "1",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0x0d0e364aa7852291883c162b22d6d81f6355428f",
            "value": "0",
            "gas": "800000",
            "data": "0x1fff991f000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd520000000000000000000000000000000000000000000000000652f1e901757fa800000000000000000000000000000000000000000000000000000000000000a0899632752e346c5953838114a1a078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000aa000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000005e000000000000000000000000000000000000000000000000000000000000007a000000000000000000000000000000000000000000000000000000000000008a0000000000000000000000000000000000000000000000000000000000000094000000000000000000000000000000000000000000000000000000000000000c4103b48be0000000000000000000000000d0e364aa7852291883c162b22d6d81f6355428f0000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd740000000000000000000000000000000000000000000000000000000000001e0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c438c9c147000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000002710000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c800000000000000000000000000000000000000000000000000000000000001c400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e4945bcec90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000d0e364aa7852291883c162b22d6d81f6355428f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d0e364aa7852291883c162b22d6d81f6355428f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000068065e6100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020d4e2af4507b6b89333441c0c398edffb40f86f4d0001000000000000000002ab0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000009c571960824400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59900000000000000000000000000000000000000000000000000000000000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018438c9c1470000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000002710000000000000000000000000d51a44d3fae010294c616388b506acda1bfaae46000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a45b41b90800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c4103b48be0000000000000000000000000d0e364aa7852291883c162b22d6d81f6355428f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000027100000000000000000000000003eed0af1c5f350c6571525d9e3eeea7d2608af810000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064c876d21d000000000000000000000000f5c4f3dc02c3fb9279495a8fef7b0741da956157000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5200000000000000000000000000000000000000000000000007e22d73e992e52000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012438c9c147000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000ad01c20d5886137e056775af56915de824c8fce500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffc1fb425e0000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd740000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d00000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000006e898131631616b1779bad70bc0b0000000000000000000000000000000000000000000000000000000068065e6100000000000000000000000000000000000000000000000000000000000000c0",
            "gasPrice": "1842544458",
            "estimationCheck": true,
            "referenceId": "01cefc4e5022465db668aacd284a7556"
        },
        {
            "dexName": "Kyberswap",
            "amountsOut": "454005990268643116",
            "chainId": "1",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
            "value": "0",
            "gas": "800000",
            "data": "0x8af033fb0000000000000000000000000f4a1d7fdf4890be35e71f3e0bbc4a0ec377eca30000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000007c00000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d0000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd520000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000004fe1aac18cb03a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000520000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000680661e300000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd7400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000040593611990000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001000000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd740000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000004811c9384bc8447945806a2319159054b228fda70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000040593611990000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001000000000000000000000000004811c9384bc8447945806a2319159054b228fda7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd520000000000000000000000000f4a1d7fdf4890be35e71f3e0bbc4a0ec377eca30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000020000000000000000000000069b4dda37c0000000000000000064cf40aefdca72c00000000000000000000000000000000000000000000000000000000000002617b22536f75726365223a22657870616e64222c22416d6f756e74496e555344223a22302e32383231323337353035303836303235222c22416d6f756e744f7574555344223a22302e303134303034393235313134393531323635222c22526566657272616c223a22222c22466c616773223a302c22416d6f756e744f7574223a223232373030323939353133343332313932222c2254696d657374616d70223a313734353234373533392c22526f7574654944223a2263383139636533312d346461352d343338342d616334642d656462326533313736303837222c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a2248386b705a32725651386463415776706b32697a454b2b6d44614156574164472b633734414d71632b495a65552f464737702f367a5a536766562b414b384d4c7a57536d424c3376366b2b70476c33353457724c417532794a4c39585159694f73715367512b5330724861446e464c6833662f74793678527a4b7862504337352b5a416b73753534496164684c41792f6e413448355873752b6459737446615935614c64486d4c724d53713969722b6b50434d362f4a6f51696444485a79352f612f7a493241535634436d74697754544e64566f473561465070436e4e445463356c6835485979745451597166575a55684a38422b73614132725835766d4b5832664d784865547a326a7962524c6c38644250496a6d335939304d4c3330373837765a6d7a4d6a34566b6b3576664564797051734f72455344774a483564504f6c67794b776c57556377676578535442396e4c6d44773d3d227d7d00000000000000000000000000000000000000000000000000000000000000",
            "gasPrice": "1767093228",
            "estimationCheck": true,
            "referenceId": "01cefc4e5022465db668aacd284a7556"
        },
        {
            "bridgeName": "SquidRouterV2",
            "amountsOut": "450958152289981823",
            "chainId": "1",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0xce16F69375520ab01377ce7B88f5BA8C48F8D666",
            "value": "0",
            "gas": "800000",
            "data": "0x58181a800000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d00000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000004800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000082000000000000000000000000000000000000000000000000000000000000009a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000010438ed17390000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000009bbf02e7f9c800000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ad6cea45f98444a922a2b4fe96b8c90f0862d2f40000000000000000000000000000000000000000000000000000019658eb567200000000000000000000000000000000000000000000000000000000000000020000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000ad6cea45f98444a922a2b4fe96b8c90f0862d2f400000000000000000000000000000000000000000000000000009c57196082440000000000000000000000000000000000000000000000000000000000043eab0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd520000000000000000000000000000000000000000000000000000000000002710000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000000445570000000000000000000000000000000000000000000000000630ab23d13bed520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000425a473416484f5a441fb360166313286",
            "gasPrice": "1767093228",
            "estimationCheck": true,
            "referenceId": "01cefc4e5022465db668aacd284a7556"
        }
    ]
}

With gasPriority:

{
  "path": [
    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
    "0x6B175474E89094C44Da98b954EedeAC495271d0F"
  ],
  "amountIn": "1000000",
  "gas": "800000",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "cheapestSwap": true,
  "bestSwap": true,
  "chainId": "1",
  "gasPriority": "medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "dexName": "1inch",
            "amountsOut": "2722973476",
            "from": "0xdae2f6eddda6fb4fb60cc02633de27e2b431b402",
            "to": "0x1111111254eeb25477b68fb85ed929f73a960582",
            "data": "0x0502b1c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a1e3e3cb0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d034060a26d69263ef43e9a68964ba141263f19d71d51caefa361",
            "value": "1000000",
            "gas": "135556",
            "gasPrice": "2537407307",
            "estimationCheck": true,
            "referenceId": "7e54a22466b34205895563f636a5e59a"
        },
        {
            "dexName": "SushiswapV2",
            "amountsOut": "2727068499",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
            "value": "1000000",
            "gas": "140987",
            "data": "0x7ff36ab500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000191509586350000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
            "gasPrice": "2533607308",
            "estimationCheck": true,
            "referenceId": "7e54a22466b34205895563f636a5e59a"
        },
        {
            "dexName": "UniswapV2",
            "amountsOut": "2727068867",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
            "value": "1000000",
            "gas": "152687",
            "data": "0x7ff36ab500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000191509586350000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
            "gasPrice": "2533607308",
            "estimationCheck": true,
            "referenceId": "7e54a22466b34205895563f636a5e59a"
        },
        {
            "dexName": "UniswapV3",
            "amountsOut": "2727666213",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
            "value": "1000000",
            "gas": "157484",
            "data": "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
            "gasPrice": "2533607308",
            "estimationCheck": true,
            "referenceId": "7e54a22466b34205895563f636a5e59a"
        },
        {
            "dexName": "0x",
            "amountsOut": "2723019170",
            "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
            "to": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
            "value": "1000000",
            "gas": "332516",
            "data": "0x415565b0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a0addb8100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000002556e697377617056320000000000000000000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000a0eba6a2000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f164fc0ec4e93095b804a4795bbe1e041497b92a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000003dcb21000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd000000000000000000000000100000000000000000000000000000000000001100000000000000000000000000000000000000000d1887adb5ec883592cc6d8e",
            "gasPrice": "2533607308",
            "estimationCheck": true,
            "referenceId": "7e54a22466b34205895563f636a5e59a"
        }
    ]
}

/swapwithapproval

Returns the approve and swap transaction on a DEX supported by Expand.

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

Request Body

Name
Type
Description

dexId

String

path*

String

Comma-separated values of token pair.

amountIn*

String

Amount of token.

from*

String

Address of the sender of the token.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

swap parameters for the dex specified

-

Refer specified dex swap page for parametes

{
    "dexId":"1000",
    "amountIn": "1000000000000000",
    "amountOutMin": "0",
    "path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0x6B175474E89094C44Da98b954EedeAC495271d0F"],
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1665990894",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "173376"
}
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "chainId": "1",
            "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
            "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "value": "0",
            "gas": "173376",
            "data": "0x095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000000000000000000000000000000038d7ea4c68000",
            "nonce": 0,
            "referenceId": "497ef8cb1f224ab3ac8ee68211237298"
        },
        {
            "chainId": "1",
            "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
            "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
            "value": "0",
            "gas": "173376",
            "data": "0x38ed173900000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000634d00ee0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
            "nonce": 1,
            "referenceId": "497ef8cb1f224ab3ac8ee68211237298"
        }
    ]
}

/getliquiditybytick

This endpoint provides the amount of liquidity distributed across different ticks for UniswapV3, TraderJoe, and PancakeswapV3. It is currently available for Ethereum, Avalanche, Binance, Base, and Polygon. The response includes the liquidity for the ticks.

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

Request Body

Name
Type
Description

dexId

String

poolAddress*

String

Address of Pool

tickRange

String

Range of tick from 0 to 10. By default 10

https://historicallp.api.expand.network/dex/getliquiditybytick?dexId=1300&poolAddress=0xCBCdF9626bC03E24f779434178A73a0B4bad62eD&tickRange=10
{
  "status": 200,
  "msg": "success",
  "data": [
    {
      "tick": "262560",
      "statePrice": "25.250257597994153",
      "liquidityGross": "2044167987239799",
      "liquidityNet": "1163227399916217"
    },
    {
      "tick": "262620",
      "statePrice": "25.40220693843807",
      "liquidityGross": "2411973804718984",
      "liquidityNet": "-2411973804718984"
    },
    {
      "tick": "262680",
      "statePrice": "25.555070669635104",
      "liquidityGross": "2022304232475786",
      "liquidityNet": "-2008684309586072"
    },
    {
      "tick": "262740",
      "statePrice": "25.70885429414582",
      "liquidityGross": "761547836646808",
      "liquidityNet": "-616354343979458"
    },
    {
      "tick": "262800",
      "statePrice": "25.86356334764374",
      "liquidityGross": "6751078345053776",
      "liquidityNet": "-5770617130112686"
    },
    {
      "tick": "262860",
      "statePrice": "26.019203399114584",
      "liquidityGross": "10654503170437388",
      "liquidityNet": "9856004978433476"
    },
    {
      "tick": "262920",
      "statePrice": "26.175780051056766",
      "liquidityGross": "1626629983560750",
      "liquidityNet": "-1157703736282660"
    },
    {
      "tick": "262980",
      "statePrice": "26.333298939683043",
      "liquidityGross": "9243301499770587",
      "liquidityNet": "-9243301499770587"
    },
    {
      "tick": "263040",
      "statePrice": "26.49176573512339",
      "liquidityGross": "51050167223971",
      "liquidityNet": "-30118033626473"
    },
    {
      "tick": "263100",
      "statePrice": "26.651186141629125",
      "liquidityGross": "356436151693028",
      "liquidityNet": "-356436151693028"
    },
    {
      "tick": "263160",
      "statePrice": "26.81156589777824",
      "liquidityGross": "2860950064302042",
      "liquidityNet": "1502877954331514"
    },
    {
      "tick": "263220",
      "statePrice": "26.972910776681964",
      "liquidityGross": "79578452045188695",
      "liquidityNet": "70503716513247725"
    },
    {
      "tick": "263280",
      "statePrice": "27.135226586192555",
      "liquidityGross": "77253816342785751",
      "liquidityNet": "76835065928144335"
    },
    {
      "tick": "263340",
      "statePrice": "27.298519169112417",
      "liquidityGross": "4558359682524738",
      "liquidityNet": "4503266701174838"
    },
    {
      "tick": "263400",
      "statePrice": "27.462794403404356",
      "liquidityGross": "4802857523418237",
      "liquidityNet": "4085134427468871"
    },
    {
      "tick": "263460",
      "statePrice": "27.62805820240321",
      "liquidityGross": "3793081726775488",
      "liquidityNet": "-3235086979619026"
    },
    {
      "tick": "263520",
      "statePrice": "27.7943165150287",
      "liquidityGross": "724722108326432",
      "liquidityNet": "-724722108326432"
    },
    {
      "tick": "263580",
      "statePrice": "27.961575325999544",
      "liquidityGross": "241718641241365",
      "liquidityNet": "-241718641241365"
    },
    {
      "tick": "263640",
      "statePrice": "28.129840656048927",
      "liquidityGross": "3332273190612355",
      "liquidityNet": "-1871247095585359"
    },
    {
      "tick": "263700",
      "statePrice": "28.299118562141224",
      "liquidityGross": "116198079424872",
      "liquidityNet": "-65857887407734"
    },
    {
      "tick": "263760",
      "statePrice": "28.46941513768995",
      "liquidityGross": "936122685327105",
      "liquidityNet": "-936122685327105"
    }
  ]
}

/getusertokenids

This endpoint provides the token IDs of all current positional NFTs held by a given wallet.

Currently Available on :

Dex Name
Chain Name
DEX ID

UniswapV3

Ethereum

1300

UniswapV3

Avalanche

1305

UniswapV3

Binance

1306

UniswapV3

Polygon

1307

UniswapV3

Arbitrum

1308

UniswapV3

Base

1309

PancakeswapV3

Binance

2800

PancakeswapV3

Arbitrum

2808

PancakeswapV3

Base

2809

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

Request Body

Name
Type
Description

dexId

String

address*

String

Address of user

https://api.expand.network/dex/getusertokenids?dexId=1300&address=0xF802993d29eA093E062658C1B5EC2727DE8a3247
{
    "status": 200,
    "msg": "success",
    "data": {
        "tokens": [
            {
                "tokenId": "818396",
                "liquidity": "42704482896171366122"
            }
        ]
    }
}

Following is a sequence diagram for swap() process:-

Following is a sequence diagram for addLiquidity() process:-

Following is a sequence diagram for removeLiquidity() process:-

PreviousAllbridge CoreNextUniswap V2

Last updated 23 days ago

GET

GET

GET

Source OHCLV (Open, High, Close, Low, Volume) data for a specified pool address for a particular time interval (15, 30, 60, or 90 minutes). Available for Uniswap and , , , and .

GET

GET

POST

GET

POST

Please see the attached document for information about error messages you may encounter when transacting using these endpoints:

Comma-separated values of Dex Id. Refer to the page for details.

Source OHCLV (Open, High, Close, Low, Volume) data for a specified pool address for a particular time interval (15, 30, 60, or 90 minutes). Available for Uniswap and , , , and .

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.

Refer to the page for details.

⛓️
⚡
https://docs.google.com/document/d/1SuBJwPOmvJtUUf-9QJiBcTr0l2zbWlusMTUOGfC8S50/edit?usp=sharing
DEX ID
Chain ID
Chain ID
Chain ID
Chain ID
Dex ID
DexID
DexID
gettokenlist
getpools
gethistoricalpoolchartdata
getwalletposition
quoteaggregator
swapaggregator
dex/screen
swapwithapproval
getliquiditybytick
V3
V2
V3
V2
Sequence Diagram for swap
Sequence diagram for addLiquidity
Sequence diagram for removeLiquidity
Curve V2
Curve V2
Sushiswap
Balancer
Sushiswap
Balancer