Hooks
Create Hook
Create a new hook for a lending market
POST
Creates a risk monitor, pre-liquidation check, or post-liquidation action hook.Documentation Index
Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Market ID.
Body Parameters
One of
monitorRisk, beforeLiquidation, or afterLiquidation.Display name (max 128 chars). Defaults to a name based on the hook type.
URL to poll for risk data. Required for
monitorRisk hooks.Array of field checks applied to the risk URI response. Each object has
path (dot-notation), optional operator (>, >=, <, <=, ==, !=), and optional threshold.Polling interval for
monitorRisk hooks. One of 1m, 5m, 15m, 30m, 1h, 6h, 12h, 24h.Array of on-chain parameter checks for
beforeLiquidation hooks. Each object has parameter (healthFactor, collateralValue, debtValue, collateralRatio, interestAccrued), operator, and threshold.Required for
afterLiquidation hooks. buy (auto-bid on auctions) or inform (send webhook).Maximum price per token for
buy action hooks.Webhook URL for
inform action hooks.Additional fields merged into webhook payloads.
Array of hook IDs whose failure triggers this hook. Max 10.
