Skip to main content
GET
Returns the hook’s execution log, newest first, with pagination counters. Scheduled runs, liquidations, a monitor’s breach, finished deliveries and calls to Execute Hook all write to it. The log is not the same count as the hook’s executionCount. An unmet trigger, a skipped bid, a buy run without an auction, a breach a buy hook cannot act on and a short wallet balance each add a log entry without counting as a run. A refusal before anything is evaluated adds neither. A queued inform delivery adds its entry and its count when it is delivered or fails for good.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs.
string
required
Hook ID.

Query Parameters

integer
default:"50"
Records to return, 1 to 200. Out-of-range values are clamped rather than refused: above 200 returns 200, a negative value returns 1, and 0 or a non-number falls back to 50.
integer
default:"0"
Records to skip. A negative value or a non-number counts as 0.

Response Fields

object

What data holds

A monitorRisk entry holds { fields }, one { path, operator, threshold, value, pass } per field evaluated. It is null when the fetch failed, and error says why. A beforeLiquidation entry holds { loanData, results }: the data the checks were given and one { parameter, value, pass } per check. An afterLiquidation entry holds one of these, or null when the run raised an error:
  • { action: "inform", deliveryId, status, attempts } when a delivery was delivered, with status the HTTP status. A delivery that failed for good adds error, its result is false, and status is null when no answer came.
  • { action: "buy", reason: "requires_wallet_signature", auctionId, currentPrice } after bid steps were returned.
  • { action: "buy", reason: "This liquidation opened no auction, so there is nothing to buy" } for a buy run without an auctionId.
  • { reason: "Price exceeds max", currentPrice } when the price was above maxBuyPrice.
  • { reason: "Insufficient USDC" } when the registered wallet held too little of the borrow asset, named by its symbol.
  • { reason: "Trigger condition not met" }, with triggerId when a listed hook’s last result was not false.
A riskBreach entry holds the outcome of the breach’s inform delivery, in the shape above. For a hook whose action is not inform it holds { action, monitorHookId, reason }, with result false, because a breach carries no auction to act on. An entry a liquidation wrote can also carry the liquidation’s eventKey, which keeps the liquidation from running the hook twice.

Error Codes