Skip to content

Hook API

The Hook API answers one question: what can this hook do to my swap or my liquidity? It covers every hook that has been attached to a Uniswap v4 pool on Robinhood Chain, indexed from the PoolManager’s Initialize events.

Endpoint What it does
GET /v1/hooks Registry of every hook used by a v4 pool
GET /v1/hooks/:address Full profile of one hook
GET /v1/hooks/:address/flags Pure decode of the permission bits in any address
GET /v1/hooks/flags The 14-flag table
Terminal window
curl "https://api.hookkit.dev/v1/hooks?sort=pools&limit=3"
Param Default Notes
sort pools pools (most pools first) or recent (latest pool first)
limit 25 1 to 100
offset 0 For pagination
{
"total": 4115,
"limit": 3,
"offset": 0,
"hooks": [
{
"address": "0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544",
"flags": "0x2544",
"enabled": ["beforeInitialize", "afterAddLiquidity", "afterRemoveLiquidity", "afterSwap", "afterSwapReturnDelta"],
"pools": 61273,
"firstSeenBlock": 734616,
"lastPoolBlock": 29508840,
"warnings": ["afterSwapReturnDelta"]
},
{
"address": "0x48B8F6AD3A1b4aA477314c9a23035b8F84dDe8cc",
"flags": "0x28cc",
"enabled": ["beforeInitialize", "beforeAddLiquidity", "beforeSwap", "afterSwap", "beforeSwapReturnDelta", "afterSwapReturnDelta"],
"pools": 14695,
"firstSeenBlock": 4576116,
"lastPoolBlock": 29503198,
"warnings": ["beforeSwapReturnDelta", "afterSwapReturnDelta"]
}
]
}

warnings lists the flags whose capability note is at warning level (see Reading a hook’s risk profile).

Terminal window
curl https://api.hookkit.dev/v1/hooks/0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544
{
"address": "0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544",
"flags": 9540,
"flagsHex": "0x2544",
"enabled": ["beforeInitialize", "afterAddLiquidity", "afterRemoveLiquidity", "afterSwap", "afterSwapReturnDelta"],
"permissions": {
"beforeInitialize": true,
"afterInitialize": false,
"beforeAddLiquidity": false,
"afterAddLiquidity": true,
"beforeRemoveLiquidity": false,
"afterRemoveLiquidity": true,
"beforeSwap": false,
"afterSwap": true,
"beforeDonate": false,
"afterDonate": false,
"beforeSwapReturnDelta": false,
"afterSwapReturnDelta": true,
"afterAddLiquidityReturnDelta": false,
"afterRemoveLiquidityReturnDelta": false
},
"errors": [],
"capabilities": [
{ "level": "warning", "flag": "afterSwapReturnDelta", "note": "Can charge or rebate tokens after each swap, e.g. a hook fee on top of the LP fee." },
{ "level": "info", "flag": "afterSwap", "note": "Runs after every swap: oracles, points, limit orders, rebalancing." },
{ "level": "info", "flag": "initialize", "note": "Runs when a pool is created with this hook (can restrict which pools use it)." }
],
"chain": "Robinhood Chain",
"explorer": "https://robinhoodchain.blockscout.com/address/0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544",
"code": {
"deployed": true,
"codeSize": 25533,
"codeHash": "0xc41a91106002f15bf70ae266824317f3f3ac638ac72ca5253bae395fa47ee631",
"proxy": null
},
"warnings": [],
"pools": {
"total": 61480,
"recent": [
{
"poolId": "0x5e91eba6ae1a8fecd58dd2a4d9184653c6712620e9564889ebc3ad80c404e855",
"key": {
"currency0": "0xc72b96e0E48ecd4DC75E1e45396e26300BC39681",
"currency1": "0xCa3dfb227a82fDD45fd8FEC78D4b5eb2fFa11ba3",
"fee": 8388608,
"tickSpacing": 200,
"hooks": "0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544"
},
"pair": "INTC/?",
"hooked": true,
"dynamicFee": true,
"createdBlock": 29633520,
"createdAt": "2026-08-06T20:24:01.000Z"
}
]
}
}
Field Meaning
flags, flagsHex, enabled, permissions The permission bits, decoded. See Hook permissions
errors Invalid flag combinations (a *ReturnDelta without its base flag). The PoolManager rejects such hooks
capabilities What each permission lets the hook do, at info, caution, or warning level
code.deployed, code.codeSize, code.codeHash Bytecode read from the chain
code.proxy null, or { kind: "eip1967" | "eip1167", implementation, admin, upgradeable }
warnings Address-level issues: invalid flags, no code, upgradeable proxy, zero flags
pools Total pools using this hook and the 25 most recent (null if the index is unavailable)

pools.recent[].pair uses token symbols where known and ? for tokens whose metadata has not been read yet.

Decoding is pure: it works for any address, deployed or not, and makes no chain call. Use it to check a planned hook address before deploying.

Terminal window
curl https://api.hookkit.dev/v1/hooks/0x48B8F6AD3A1b4aA477314c9a23035b8F84dDe8cc/flags
{
"address": "0x48B8F6AD3A1b4aA477314c9a23035b8F84dDe8cc",
"flags": 10444,
"flagsHex": "0x28cc",
"enabled": ["beforeInitialize", "beforeAddLiquidity", "beforeSwap", "afterSwap", "beforeSwapReturnDelta", "afterSwapReturnDelta"],
"permissions": { "beforeInitialize": true, "...": "..." },
"errors": [],
"capabilities": [
{ "level": "warning", "flag": "beforeSwapReturnDelta", "note": "Can take over swap pricing (custom curve / custom accounting): output may not follow the pool's liquidity." },
{ "level": "warning", "flag": "afterSwapReturnDelta", "note": "Can charge or rebate tokens after each swap, e.g. a hook fee on top of the LP fee." },
{ "level": "info", "flag": "beforeAddLiquidity", "note": "Can gate who adds liquidity or where." },
{ "level": "info", "flag": "beforeSwap", "note": "Runs before every swap: can revert, or override the LP fee on dynamic-fee pools." },
{ "level": "info", "flag": "afterSwap", "note": "Runs after every swap: oracles, points, limit orders, rebalancing." },
{ "level": "info", "flag": "initialize", "note": "Runs when a pool is created with this hook (can restrict which pools use it)." }
]
}

The SDK can also decode offline, with no request at all:

import { decodeHookAddress } from "@hookkit/sdk"
decodeHookAddress("0x48B8F6AD3A1b4aA477314c9a23035b8F84dDe8cc")
// { flags: 10444, enabled: ["beforeInitialize", "beforeAddLiquidity", ...], permissions: {...} }
Terminal window
curl https://api.hookkit.dev/v1/hooks/flags
{
"mask": "0x3fff",
"flags": [
{ "name": "beforeInitialize", "bit": 13, "value": 8192, "hex": "0x2000" },
{ "name": "afterInitialize", "bit": 12, "value": 4096, "hex": "0x1000" },
"...",
{ "name": "afterRemoveLiquidityReturnDelta", "bit": 0, "value": 1, "hex": "0x0001" }
]
}
import { HookKit } from "@hookkit/sdk"
const hookkit = new HookKit()
const { hooks, total } = await hookkit.hooks.list({ sort: "recent", limit: 50 })
const profile = await hookkit.hooks.get("0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544")
const decoded = await hookkit.hooks.decode("0x48B8F6AD3A1b4aA477314c9a23035b8F84dDe8cc")
if (profile.code.deployed && profile.code.proxy?.upgradeable) {
console.warn("Hook logic can be changed by", profile.code.proxy.admin)
}