uniswap_pool_id
Compute a Uniswap v4 poolId from a PoolKey by automatically sorting currencies to avoid pool lookup failures.
Instructions
Compute the Uniswap v4 poolId from a PoolKey. Currencies are sorted automatically — an unsorted key yields a different, non-existent poolId, which is the usual reason a pool 'cannot be found'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"currency0": "<currency0>",
"currency1": "<currency1>"
},
"name": "uniswap_pool_id"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | Fee in hundredths of a bip (3000 = 0.30%) | |
| hooks | No | 0x0000000000000000000000000000000000000000 | |
| currency0 | Yes | Token address, or 0x0 for native ETH | |
| currency1 | Yes | ||
| tickSpacing | No |