Skip to main content
POST
Creates a hook on an external securities lending market. Hooks let you attach off-platform risk data and automated reactions to a market without running your own poller. Three hook types are available:
riskUri and webhookUrl must be publicly resolvable http or https URLs. Loopback addresses, private ranges, link-local addresses, and .local or .internal hostnames are rejected at validation time and on every outbound call.

Path Parameters

string
required
Market ID.

Body Parameters

string
required
One of monitorRisk, beforeLiquidation, or afterLiquidation.
string
Display name, 1 to 128 characters. Defaults to Risk Monitor, Pre-Liquidation Check, or Post-Liquidation Action based on the hook type.
string
URL polled on each run. Required for monitorRisk. Max 2048 characters.
array
Field checks applied to the riskUri JSON response. Max 20 entries. Required for monitorRisk on create.
number
Optional global threshold stored alongside the hook.
string
Polling interval for monitorRisk. One of 1m, 5m, 15m, 30m, 1h, 6h, 12h, 24h. A hook without a checkFrequency is never scheduled and only runs when triggered manually.
array
On-chain loan checks for beforeLiquidation. Max 10 entries.
string
Required for afterLiquidation. buy places a bid on the resulting Dutch auction through the registered wallet. inform posts to webhookUrl.
string
Price ceiling per collateral unit for buy actions, in the market’s borrow asset. The hook skips the bid when the live auction price is above this value.
string
Destination for inform actions. Required when actionType is inform. Max 2048 characters.
object
Additional fields merged into the outbound webhook body.
array
Hook IDs whose failure chains into this hook. Max 10. Every ID must belong to the same market.

Validation Errors