getPoolKeyByPoolId
Returns the PoolKey for all pools on Angstrom.
warning
This method is only available through the data endpoint.
Parameters
| Parameter | Type | Description |
|---|---|---|
pool_id | string | Hex string of the PoolId of the pool whose key you wish to fetch |
block_number | number? | (optional) Block height to fetch the configuration at (defaults to latest) |
Result
PoolKeyWithAngstromFee — Returns an object of PoolKeyWithAngstromFee, containing:
| Field | Type | Description |
|---|---|---|
pool_key | PoolKey | The uniswap PoolKey |
pool_fee_in_e6 | string | The Angstrom specific fee for this pool at this block (or latest block) |
--
Where PoolKey contains the fields:
| Field | Type | Description |
|---|---|---|
currency0 | string | The first token's address (numerically lower) |
currency1 | string | The second token's address (numerically higher) |
fee | number | The pool’s fee in pip; dynamic-fee pools replaced with actual batch trading fee |
tickSpacing | number | Tick spacing: positions must align on multiples of this value |
hooks | string | The Hooks contract address (implements IHooks) |
info
Angstrom pools use dynamic fees; in Uniswap v4 hooks that use a dynamic fee, the fee field is set to 0x800000 (see dynamic fee pools). To simplify, we replace the dynamic fee flag with the actual trading fee for batch trades.
warning
Angstrom charges different fees depending on whether a swap executes within the batch or in the unlocked pool state. The fee value returned here is the trading fee applied to swaps executed within the batch.
Request
curl "https://api.data.angstrom.xyz" \
-X POST -H "Content-Type: application/json" -d '
{
"jsonrpc":"2.0",
"id":1,
"method":"angstrom_poolKeyByPoolId",
"params":["0xPoolId"]
}
'