getPoolId
Returns the PoolKey
for identifying a pool given two token addresses.
warning
This method is only available through the data endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
token0 | string | Hex string token0 of the pool |
token1 | string | Hex string token1 of the pool |
block_number | number? | (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"
]
}
'
``` ```