Skip to main content
POST
/
lending-stocks
/
api
/
hooks
/
{marketId}
/
{hookId}
/
execute
curl -X POST "https://api.trusset.org/lending-stocks/api/hooks/{marketId}/{hookId}/execute" \
  -H "X-API-Key: trusset_your_key_here" \
  -H "Content-Type: application/json"
{
  "success": true,
  "data": {
    "success": true,
    "result": true,
    "data": { "score": 72 }
  }
}
Runs a hook immediately outside its scheduled cycle. For monitorRisk hooks, fetches and evaluates the risk URI. For beforeLiquidation and afterLiquidation hooks, you must provide the relevant data in the request body.

Path Parameters

marketId
string
required
Market ID.
hookId
string
required
Hook ID.

Body Parameters

loanData
object
Required for beforeLiquidation hooks. Object with loan parameters (healthFactor, collateralValue, etc.).
liquidationData
object
Required for afterLiquidation hooks. Object with loanId, auctionId, collateralAmount, debtOwed, borrower.
curl -X POST "https://api.trusset.org/lending-stocks/api/hooks/{marketId}/{hookId}/execute" \
  -H "X-API-Key: trusset_your_key_here" \
  -H "Content-Type: application/json"
{
  "success": true,
  "data": {
    "success": true,
    "result": true,
    "data": { "score": 72 }
  }
}