Fetching Pair Reserves
Fetching live reserves is useful for knowing the liquidity on each side of the pair before you trade.
If you want to run this example, be sure that you have followed the steps here to configure your Wallet Client.
- If you are following our example using the Sepolia Explorer, you can use the CTK/AUSD pair address
0x1Aa8958Aa34cEC8096EF4381cb335effe977b0ae. - If you are trying to swap in a mainnet chain, you can check out Find all available Pairs
Pick a pair address
In order to query the reserves from the contract, we’ll call the methods reserve0 and reserve1
Helper function to read raw reserves
Example use of the helper function
Returned Data
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.

