Skip to content

Instantly share code, notes, and snippets.

@jar-o
Last active April 21, 2022 15:55
Show Gist options
  • Save jar-o/0cef66e01adcc39790163cd223b98951 to your computer and use it in GitHub Desktop.
Save jar-o/0cef66e01adcc39790163cd223b98951 to your computer and use it in GitHub Desktop.

Go here https://thegraph.com/hosted-service/subgraph/uniswap/uniswap-v3

and enter

{
  pool(id: "0xf56d08221b5942c428acc5de8f78489a97fc5599") {
    tick
    token0 {
      symbol
      id
      decimals
    }
    token1 {
      symbol
      id
      decimals
    }
    feeTier
    sqrtPrice
    liquidity
  }
}

Should return something like

{
  "data": {
    "pool": {
      "tick": "-21803",
      "token0": {
        "symbol": "GNO",
        "id": "0x6810e776880c02933d47db1b9fc05908e5386b96",
        "decimals": "18"
      },
      "token1": {
        "symbol": "WETH",
        "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "decimals": "18"
      },
      "feeTier": "3000",
      "sqrtPrice": "26635670155149758630884171588",
      "liquidity": "125957005143888430847966"
    }
  }
}

References:

https://geckoterminal.com/eth/pools/0xf56d08221b5942c428acc5de8f78489a97fc5599?utm_source=coingecko&utm_medium=referral&utm_campaign=livechart

The pool contract used above

https://etherscan.io/address/0xf56d08221b5942c428acc5de8f78489a97fc5599#code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment