I started getting into the crypto scene and I read about liquidity pools but I am not sure how to get exchange rates into my javascript code, I looked for API's and SDK's but couldn't find any for the big DEX platforms (uniswap, pancakeswap, sushiswap, etc...). i read somewhere about how liquidity is calculated from the equation x*y = k or something along those lines but I am still unsure of how it is calculated. Thanks.