hookr_check_trade · Will this trade go through
read-onlyWhether a pool's rules let a given wallet make a trade: Hookr's quote runs from that wallet, so Wallet Cap, an add-on or a gate run for it, but its balance is not checked (hookr_build_swap checks that). Answers ok, refused with the reason, or unknown when the check could not run, and unknown is never ok.
Input schema
{
"type": "object",
"properties": {
"poolId": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{64}$",
"description": "The pool's 32-byte Uniswap v4 PoolId, 0x and 64 hex characters."
},
"side": {
"type": "string",
"enum": [
"buy",
"sell"
],
"description": "buy pays the pool's quote currency (ETH, HOOKR, …) for the token; sell pays the token for the quote currency."
},
"amount": {
"type": "string",
"pattern": "^(?:0|[1-9][0-9]{0,30})(?:\\.[0-9]{1,36})?$",
"description": "How much the trade pays in, in the paying currency's own units as a decimal string, e.g. \"0.05\"."
},
"wallet": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "The wallet that would trade."
}
},
"required": [
"poolId",
"side",
"amount",
"wallet"
],
"additionalProperties": false
}