Liquidity on DEX

Hi,

Need a sample query to fetch Liquidity of wlt token on ‘Pancake’ exchange.

What is liquidity?? - Its a collection of funds locked in a smart contract.
Defi is different from the traditional order-book (trading) (buyer- bids and seller- bids), here the seller can sell the tokens against the liquidity locked by the token owners
let’s say a token( wlt) - the owners have pooled 9004 token in a pool against BNB, (so pooled WLT is 9004 and pooled BNB - 508) (this is a pair now)

please share a sample query to fetch these two values - pooled wlt and pooled BnB

Edit: Just observed that this liquidity is the pair of Pancake-WLT (0xcdff007f71e6986397bdb099160d37c3f194b642) - amount(its in wlt)

I think balance APIs can you give you liquidity, check this topic

https://community.bitquery.io/t/pancakeswap-liquidity-price-ath-and-atl/24/5

1 Like

Hello, How to fetch 24h liquidity? i.e., the total balance of total BOG and total BNB
{
ethereum(network: bsc) {
address(address: {is: “0xB09FE1613fE03E7361319d2a43eDc17422f36B09”}) {
balances {
currency {
symbol
}
value
}
}
}
}

For that, you need to check balance history, however you need to process this data

{
  ethereum(network: bsc) {
    address(address: {is: "0xB09FE1613fE03E7361319d2a43eDc17422f36B09"}) {
      balances (time: {till: "2021-06-19T00:00:00+00:00"}) {
        currency {
          symbol
        }
        value
        history{
          value
          block
          timestamp
        }
      }
    }
  }
}