Fetching Pair Reserves
Fetching live reserves is useful for knowing the liquidity on each side of the pair before you trade. The snippet below re-uses the wallet client you created in Quick Start, so no extra setup is needed.
- If you are following our example using Avalanche Fuji, you can use the Address
0x237591AaF2FCCb34464Ceae9EeA1eb6f375843AF. - If you are trying to swap in a mainnet chain, you can check out Find all available Pairs
1. Pick a pair address
In order to query the reserves from the contract, we’ll call the methods reserve0 and reserve1
2. Helper to read raw reserves
3. Run the query
This is the value stored by the contract. In order to convert these units to human readable values, we’ll need to divide the output by the ERC20 token decimals.

