Can you query available liquidity for a given ERC20 Token
What do you mean by “liquidity for a given ERC20 Token”?
Does it mean the total supply of the ERC20 token?
If yes, then please use this query - liquidity
Thank you for your time.
For a given Base token address - I want pools, all existed token pairs and their desposit($) in the pools
To get all the pools for a token - try this Get Pancake Pool's of a specific token - #11 by gaurav
And for liquidity on the pool, you need to check the balance of the pool.
Hey, it’s great to hear from you…!!! can I get the balance of the pool for given Token address?
If yes, Can you please provide that query ?
Please use this balance query as example
Thank you Gaurav, I’ll try it…
Liquidity means reserve value of that token in a Pool… If we want to get liquidity of a token pair, we need to retreive the reserve0 and reserve1 from the pairAddress.
reserve0 is the liquidity of token0 & reserve1 is the liquidity of token1.
Can you point me to token contract where you saw this?
In this, we have getReserves() method which can give us liquidity amount
If you look closely those reserve0 and reserve1 is balance of tokens of that pair token…
So use our balance apis to get the liquidity of any pool token…
Balance API example - balance api
What is the unit of liquidity reserve?
How are you?
I have a questions regarding this posting.
I want to get the size of liquidity pool for give token address.
Could you help me?