Balancer V2

Below is the list of tokens we currently support for the mentioned endpoints. We are happy to add support for additional tokens upon request.

Supported Mainnet Token Pairs (For add & remove liquidity)
  1. WETH/DAI 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0x6B175474E89094C44Da98b954EedeAC495271d0F

  2. wstETH/WETH - Composable Stable 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

  3. ezETH/WETH 0x596192bb6e41802428ac943d2f1476c1af25cc0e, 0xbf5495efe5db9ce00f80364c8b423567e58d2110, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

  4. wstETH/WETH - Stable 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

  5. rETH/WETH 0xae78736Cd615f374D3085123A210448E74Fc6393, 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

  6. AAVE/wstETH 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9

  7. weETH/ezETH/rswETH 0x848a5564158d84b8a8fb68ab5d004fae11619a54, 0xbf5495efe5db9ce00f80364c8b423567e58d2110, 0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee, 0xfae103dc9cf190ed75350761e95403b7b8afa6c0

  8. osETH/wETH 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0xdacf5fa19b1f720111609043ac67a9818262850c, 0xf1c9acdc66974dfb6decb12aa385b9cd01190e38

  9. Gyroscope ECLP GYD/sDAI 0x83f20f44975d03b1b09e64809b757c47f942beea, 0xe07f9d810a48ab5c3c914ba3ca53af14e4491e8a

  10. weETH/rETH 0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee, 0xae78736cd615f374d3085123a210448e74fc6393

  11. wstETH-rETH-sfrxETH-BPT 0x42ed016f826165c2e5976fe5bc3df540c5ad0af7, 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0xac3e018457b222d93114458476f3e3416abbe38f, 0xae78736cd615f374d3085123a210448e74fc6393

  12. RDNT/WETH 0x137ddb47ee24eaa998a535ab00378d6bfa84f893, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

  13. 20WETH-80PSP 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0xcafe001067cdef266afb7eb5a286dcfd277f3de5

  14. STG/USDC 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xaf5191b0de278c7286d6c7cc6ab6bb8a73ba2cd6

  15. 20WETH-80ALCX 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0xdbdb4d16eda451d0503b854cf79d55697f90c8df

  16. GHO/USDT/USDC 0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f, 0x8353157092ed8be69a9df8f95af097bbf33cb2af, 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7

  17. COW/GNO 0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB, 0x6810e776880C02933D47DB1b9fc05908e5386b96

  18. ankrETH/wstETH 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0xdfe6e7e18f6cc65fa13c8d8966013d4fda74b6ba, 0xe95a203b1a91a908f9b9ce46459d101078c2c3cb

  19. 50wstETH-ACX 0x44108f0223a3c3028f5fe7aec7f9bb2e66bef82f, 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0

  20. rsETH / ETHx 0x7761b6e0daa04e70637d81f1da7d186c205c2ade, 0xa1290d69c65a6fe4df752f95823fae25cb99e5a7, 0xa35b1b31ce002fbf2058d22f30f95d405200a15b

  21. Gyroscope ECLP wstETH/wETH 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

  22. 20 WETH 80 LIT 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0xfd0205066521550d7d7ab19da8f72bb004b4c341

  23. 50rETH-50RPL 0xae78736cd615f374d3085123a210448e74fc6393, 0xd33526068d116ce69f19a9ee46f0bd304f21a51f

  24. wstETH-rETH-sfrxETH 0x5aee1e99fe86960377de9f88689616916d5dcabe, 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0xac3e018457b222d93114458476f3e3416abbe38f, 0xae78736cd615f374d3085123a210448e74fc6393

  25. 50KNC-25WETH-25USDC 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202

Supported Testnet Token Pairs (For add & remove liquidity)
  1. USDC/WETH 0xe0C9275E44Ea80eF17579d33c55136b7DA269aEb, 0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1

  2. wstETH/WETH 0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f, 0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1

/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=1400&path=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,0x6B175474E89094C44Da98b954EedeAC495271d0F&amountIn=10000000000000000000

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

tokenC

String

Address of token.

tokenD

String

Address of token.

https://api.expand.network/dex/getuserliquidity?tokenA=0x848a5564158d84b8a8fb68ab5d004fae11619a54&tokenB=0xbf5495efe5db9ce00f80364c8b423567e58d2110&address=0xBA12222222228d8Ba445958a75a0704d566BF2C8&dexId=1400&tokenC=0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee&tokenD=0xfae103dc9cf190ed75350761e95403b7b8afa6c0

/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=1400&poolAddress=0x25Accb7943Fd73Dda5E23bA6329085a3C24bfb6a

/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=1400&poolAddress=0x25Accb7943Fd73Dda5E23bA6329085a3C24bfb6a

/getliquidityholders

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

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=1400&poolAddress=0x1b65fe4881800B91d4277ba738b567CbB200A60d

/getindividualposition

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

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

address*

String

The public address of the liquidity holder.

dexId*

String

poolAddresses

String

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

https://api.expand.network/dex/getindividualposition?address=0xc29562b045D80fD77c69Bec09541F5c16fe20d9d&dexId=1400&poolAddresses=0xc29562b045D80fD77c69Bec09541F5c16fe20d9d

/gethistoricalpoolchartdata

Get the data the OHCLV (Open, High, Close, Low, and Volume) within the specified time interval for pool on Balancer V2. Available on Ethereum only.

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

Query Parameter

Name
Type
Description

dexId*

String

interval

String

15 mins(by default), 30 mins, 60 mins, and 90 mins.

limit

String

No of iteration. Start limit is 100 and maximum limit is 500.

poolAddress*

String

rpc

String

Remote procedural call URL.

https://api.expand.network/dex/gethistoricalpoolchartdata?dexId=1400&poolAddress=0x3de27efa2f1aa663ae5d458857e731c129069f29&interval=15m&limit=100

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

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.

swapKind*

String

The type of batch swap we want to perform.

deadline*

String

Deadline for the transaction to be executed (UNIX Timestamp).

gasPriority

String

low, medium, or high.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 100

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 .

{
    "dexId": "1400",
    "swapKind": "0",
    "path": [
        "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
        "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
    ],
    "amountIn": "100000",
    "gas": "800000",
    "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
    "deadline": "1668973383"
}

With gasPriority:

{
    "dexId": "1400",
    "swapKind": "0",
    "path": [
        "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
        "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
    ],
    "amountIn": "100000",
    "gas": "800000",
    "gasPriority": "medium",
    "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
    "deadline": "1668973383"
}

With slippage:

{
    "dexId": "1400",
    "swapKind": "0",
    "path": [
        "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
        "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
    ],
    "amountIn": "100000",
    "gas": "800000",
    "slippage": "1",
    "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
    "deadline": "1668973383"
}

/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

path*

Array

Comma separated values of token addresses.

amountIn*

Array

Amount of tokens to add liquidity.

amountOut*

String

Amount of tokens accepted as a result of the transaction.

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.

fromInternalBalance*

Boolean

True if sending from internal token balances. False if sending ERC20.

to*

String

Address of the recipient of the token.

gasPriority

String

low, medium, or high.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 100

{
    "dexId": "1400",
    "path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x6B175474E89094C44Da98b954EedeAC495271d0F"],
    "amountIn": ["0","100000000"],
    "amountOut": "2331262690208301876",
    "fromInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}

With gasPriority:

{
    "dexId": "1400",
    "amountIn": [
        "1000000000000000000",
        "1000000000000000000"
    ],
    "amountOut": "0",
    "path": [
        "0x6B175474E89094C44Da98b954EedeAC495271d0F",
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
    ],
    "to": "0xDeBB1a42a27051FD18d6d6C2055A44d330A4D80a",
    "deadline": "1710209834351",
    "from": "0xDeBB1a42a27051FD18d6d6C2055A44d330A4D80a",
    "gas": "273376",
    "fromInternalBalance": false,
    "gasPriority": "low"
}

With slippage:

{
    "dexId": "1400",
    "path": [
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "amountIn": [
        "0",
        "100000000"
    ],
    "amountOut": "2331262690208301876",
    "fromInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "slippage": "7.02"
}

/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

path*

Array

Comma separated values of token addresses.

amountIn*

String

Amount of tokens to add liquidity.

amountOut*

Array

Amount of tokens accepted as a result of the transaction.

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.

toInternalBalance*

Boolean

True if you receiving tokens as internal token balances. False if receiving as ERC20.

to*

String

Address of the recipient of the token.

gasPriority

String

low, medium, or high.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 100

{
    "dexId": "1400",
    "path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x6B175474E89094C44Da98b954EedeAC495271d0F"],
    "amountOut": ["0","100000000"],
    "amountIn": "2427326557218525461",
    "toInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}

With gasPriority (medium):

{
    "dexId": "1400",
    "path": [
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "amountOut": [
        "0",
        "100000000"
    ],
    "amountIn": "2427326557218525461",
    "toInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gasPriority": "medium"
}

With Slippage:

{
    "dexId": "1400",
    "path": [
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "amountOut": [
        "100",
        "100000000"
    ],
    "amountIn": "2427326557218525461",
    "toInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "slippage": "6.01"
}

Last updated