Uniswap Subgraph – Volume and Liquidity numbers off?
I'm using the python graphql client lib to pull some basic token data from Uniswap.
Docs here: https://thegraph.com/explorer/subgraph/uniswap/uniswap-v2?query=Example%20query
My query:
query = """
query($contract: String!) {
token(id:$contract) {
symbol
name
decimals
tradeVolume
totalLiquidity
derivedETH
}
}
"""
What's strange is that on Uniswap frontend it lists BAT having:
Total Liquidity: $5,478,617
24H Volume: $1,592,080
However the data returned from that query looks like this:
'name': 'Basic Attention Token',
'symbol': 'BAT',
'totalLiquidity': '3451749.888732987018538912',
'tradeVolume': '359698970.546531556838535503'}}}
I cannot figure out what the heck units these are supposed to be. I've tried calculating as ETH and BAT and can't seem to come up with dollar figures even close to the frontend.
Anyone know what I'm missing?
submitted by /u/OopsSudoBangBang
[link] [comments]