Hi I am making a DEX and I am stuck with a problem, I want to Sort total liquidity by top liquidity available for a token paired with BNB or native token. I am using 0x API but there is nothing to do with liquidity, Is there any API that gives liquidy or liquidity provider info?

for e.g.

I want to liquidity of BNB and this address 0x21381e026ad6d8266244f2a583b35f9e4413fa2a

  • Could you bring some precision on what you mean by "Liquidity", like what are you trying to quantify exactly ? The term is rather broad (LP token total supply ? BNB balance ? Number of LP ? Uni V3 ?) Commented Nov 21, 2021 at 20:45
  • @DrGorilla.eth LP token total supply and Number of LP or maybe we can also check if the liquidity of Token is locked.
    – Mohit
    Commented Nov 22, 2021 at 5:11
  • @DrGorilla.eth Total supply with respect to value-based tokens such as BNB, USDT, USDC, etc.
    – Mohit
    Commented Nov 22, 2021 at 5:25

1 Answer 1


First of all, you want to get liquidity of 0x21381e026ad6d8266244f2a583b35f9e4413fa2a in pancakeswap. But this token in Ethereum. You cannot do that.

Secondly, let's get liquidity on bnb-cake liquidity for example.

  1. Go to PancakeSwap Factory V2
  2. Call getPair function with addresses of cake and bnb (you can't enter bnb's address, you have to enter wbnb).
  3. And the function returns: 0x0eD7e52944161450477ee417DE9Cd3a859b14fD0
  4. Go to that address from in bscscan.
  5. You can get all reserves in the bottom.
  6. If you want to get total supply of LP token, you can go to token tracker from here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.