Getting balances of liquidity pools

For the LPs of liquidity pools (Bancor, Balancer, Uniswap) balances are not available by default in getBalances() function. Balances for these protocols must be fetched by calling getAdapterBalance() function with a list of pools passed as a function parameter. If you call

    0x42b9dF65B219B3dD36FF330A4dD8f327A6Ada990, // account address
    0x581Ae5AF7afa6f8171Bbf40d1981779F168A9523, // balancer adapter address
        0x987D7Cc04652710b74Fff380403f5c02f82e290a] // balancer pools addresses 

you will obtain Balancer balances for given pools. The response from the smart-contract will contain information about each of the pools

1.3 ETH + 552.4 DAI // 30% WETH + 70% DAI pool
4.2 MKR + 2.5 WETH // 75% MKR + 25% WETH pool

Last updated