Skip to main content

getPoolId

Returns the PoolKey for identifying a pool given two token addresses.

warning

This method is only available through the data endpoint.

Parameters

ParameterTypeDescription
token0stringHex string token0 of the pool
token1stringHex string token1 of the pool
block_numbernumber?(optional) Block height to fetch the configuration at (defaults to latest)

Result

PoolId — A B256 value representing to keccak encoded Uniswap PoolKey

Request

curl "https://api.data.angstrom.xyz" \
-X POST -H "Content-Type: application/json" -d '
{
"jsonrpc":"2.0",
"id":1,
"method":"angstrom_poolId",
"params":[
"0xToken0Address",
"0xToken1Address"
]
}
'
``` ```