Hooks
List Hooks
List all hooks configured for an external securities lending market
GET
/
lending-external-securities
/
api
/
hooks
/
{marketId}
curl "https://api.trusset.org/lending-external-securities/api/hooks/{marketId}" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/hooks/${marketId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"hooks": [
{
"id": "hook_001",
"marketId": "clx_secmarket_001",
"hookType": "monitorRisk",
"name": "NAV Publication Monitor",
"riskUri": "https://nav.example.com/funds/NYF1",
"riskFields": [{ "path": "ageHours", "operator": "<", "threshold": 36 }],
"checkFrequency": "6h",
"parameterChecks": [],
"triggerHookIds": [],
"actionType": null,
"webhookUrl": null,
"signerAddress": "0x123...456",
"active": true,
"lastResult": true,
"lastExecutedAt": "2025-06-15T06:00:00.000Z",
"executionCount": 142,
"createdAt": "2025-06-01T09:00:00.000Z"
}
]
},
"metadata": {
"timestamp": "2025-06-15T12:00:00.000Z",
"requestId": "a1b2c3d4-...",
"instanceId": "inst_abc123"
}
}
Returns every hook attached to the market, newest first. Hooks cover three stages: scheduled risk monitoring, pre-liquidation checks, and post-liquidation actions.
Path Parameters
string
required
Market ID.
Response Fields
object
Show child attributes
Show child attributes
array
Hook records ordered by
createdAt descending. Each contains id, marketId, hookType, name, riskUri, riskFields, riskThreshold, checkFrequency, parameterChecks, triggerHookIds, actionType, maxBuyPrice, webhookUrl, webhookPayload, signerAddress, active, lastResult, lastExecutedAt, executionCount, and createdAt.curl "https://api.trusset.org/lending-external-securities/api/hooks/{marketId}" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/hooks/${marketId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"hooks": [
{
"id": "hook_001",
"marketId": "clx_secmarket_001",
"hookType": "monitorRisk",
"name": "NAV Publication Monitor",
"riskUri": "https://nav.example.com/funds/NYF1",
"riskFields": [{ "path": "ageHours", "operator": "<", "threshold": 36 }],
"checkFrequency": "6h",
"parameterChecks": [],
"triggerHookIds": [],
"actionType": null,
"webhookUrl": null,
"signerAddress": "0x123...456",
"active": true,
"lastResult": true,
"lastExecutedAt": "2025-06-15T06:00:00.000Z",
"executionCount": 142,
"createdAt": "2025-06-01T09:00:00.000Z"
}
]
},
"metadata": {
"timestamp": "2025-06-15T12:00:00.000Z",
"requestId": "a1b2c3d4-...",
"instanceId": "inst_abc123"
}
}
⌘I
curl "https://api.trusset.org/lending-external-securities/api/hooks/{marketId}" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/hooks/${marketId}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"hooks": [
{
"id": "hook_001",
"marketId": "clx_secmarket_001",
"hookType": "monitorRisk",
"name": "NAV Publication Monitor",
"riskUri": "https://nav.example.com/funds/NYF1",
"riskFields": [{ "path": "ageHours", "operator": "<", "threshold": 36 }],
"checkFrequency": "6h",
"parameterChecks": [],
"triggerHookIds": [],
"actionType": null,
"webhookUrl": null,
"signerAddress": "0x123...456",
"active": true,
"lastResult": true,
"lastExecutedAt": "2025-06-15T06:00:00.000Z",
"executionCount": 142,
"createdAt": "2025-06-01T09:00:00.000Z"
}
]
},
"metadata": {
"timestamp": "2025-06-15T12:00:00.000Z",
"requestId": "a1b2c3d4-...",
"instanceId": "inst_abc123"
}
}
