Skip to main content

getPoolKeyByPoolId

Returns the PoolKey for all pools on Angstrom.

warning

This method is only available through the data endpoint.

Parameters

ParameterTypeDescription
pool_idstringHex string of the PoolId of the pool whose key you wish to fetch
block_numbernumber?(optional) Block height to fetch the configuration at (defaults to latest)

Result

PoolKeyWithAngstromFee — Returns an object of PoolKeyWithAngstromFee, containing:

FieldTypeDescription
pool_keyPoolKeyThe uniswap PoolKey
pool_fee_in_e6stringThe Angstrom specific fee for this pool at this block (or latest block)

-- Where PoolKey contains the fields:

FieldTypeDescription
currency0stringThe first token's address (numerically lower)
currency1stringThe second token's address (numerically higher)
feenumberThe pool’s fee in pip; dynamic-fee pools replaced with actual batch trading fee
tickSpacingnumberTick spacing: positions must align on multiples of this value
hooksstringThe 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"]
}
'