Liquidation Bots
Update Bot
Relabel a liquidation bot, or archive or restore its record
PATCH
/
lending-external-securities-v2
/
api
/
liquidation-bots
/
{botId}
curl -X PATCH "https://api.trusset.org/lending-external-securities-v2/api/liquidation-bots/{botId}" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{"label": "Retired keeper", "archived": true}'
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/liquidation-bots/${botId}`,
{
method: 'PATCH',
headers: {
'X-API-Key': 'trusset_your_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ archived: false })
}
);
const { data } = await res.json();
{
"success": true,
"data": {
"bot": {
"id": "clx_bot_001",
"instanceId": "inst_abc123",
"botAddress": "0xc40dea7387a290e7ce71784a65ae0ed6bb1ae555",
"ownerWallet": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"label": "Retired keeper",
"archived": true,
"deployTxHash": "0x1a2531f9e02d8b3660364d25a982585f822fbe8689e811e7b967cbd1d670ba7b",
"createdAt": "2026-09-20T10:00:00.000Z",
"updatedAt": "2026-09-25T12:00:00.000Z"
}
},
"error": null,
"metadata": {
"timestamp": "2026-09-25T12:00:00.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"instanceId": "inst_abc123"
}
}
{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "Nothing to update"
}
}
Changes the bot’s record in Trusset: its label, or whether it is archived. Nothing goes on-chain.
A body that changes nothing returns
Archiving hides the bot from the default List Liquidation Bots and changes nothing else. The contract stays deployed with its float, its market roles and its enabled markets, and any caller can still liquidate through it. To stop it, pause it with Bot Owner Action or disconnect it with Connect Bot to Market.
Path Parameters
string
required
Bot ID.
Body Parameters
string | null
Display label, at most 64 characters. Surrounding whitespace is trimmed.
null or an empty label clears it.boolean
true hides the bot from the default list, false restores it. The current value counts as no change.VALIDATION_ERROR with the message Nothing to update. That covers an empty body and one carrying only archived at its current value.
Response Fields
object
Show child attributes
Show child attributes
object
The updated record:
id, instanceId, botAddress, ownerWallet, label, archived, deployTxHash, createdAt and updatedAt. On-chain state is not included.curl -X PATCH "https://api.trusset.org/lending-external-securities-v2/api/liquidation-bots/{botId}" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{"label": "Retired keeper", "archived": true}'
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/liquidation-bots/${botId}`,
{
method: 'PATCH',
headers: {
'X-API-Key': 'trusset_your_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ archived: false })
}
);
const { data } = await res.json();
{
"success": true,
"data": {
"bot": {
"id": "clx_bot_001",
"instanceId": "inst_abc123",
"botAddress": "0xc40dea7387a290e7ce71784a65ae0ed6bb1ae555",
"ownerWallet": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"label": "Retired keeper",
"archived": true,
"deployTxHash": "0x1a2531f9e02d8b3660364d25a982585f822fbe8689e811e7b967cbd1d670ba7b",
"createdAt": "2026-09-20T10:00:00.000Z",
"updatedAt": "2026-09-25T12:00:00.000Z"
}
},
"error": null,
"metadata": {
"timestamp": "2026-09-25T12:00:00.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"instanceId": "inst_abc123"
}
}
{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "Nothing to update"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
VALIDATION_ERROR | 400 | label is longer than 64 characters or not a string, archived is not a boolean, or the body changes nothing |
BOT_NOT_FOUND | 404 | No bot with this ID belongs to your instance |
BOT_UPDATE_FAILED | 500 | An unexpected failure. The message is generic; retry |
⌘I
curl -X PATCH "https://api.trusset.org/lending-external-securities-v2/api/liquidation-bots/{botId}" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{"label": "Retired keeper", "archived": true}'
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/liquidation-bots/${botId}`,
{
method: 'PATCH',
headers: {
'X-API-Key': 'trusset_your_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ archived: false })
}
);
const { data } = await res.json();
{
"success": true,
"data": {
"bot": {
"id": "clx_bot_001",
"instanceId": "inst_abc123",
"botAddress": "0xc40dea7387a290e7ce71784a65ae0ed6bb1ae555",
"ownerWallet": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
"label": "Retired keeper",
"archived": true,
"deployTxHash": "0x1a2531f9e02d8b3660364d25a982585f822fbe8689e811e7b967cbd1d670ba7b",
"createdAt": "2026-09-20T10:00:00.000Z",
"updatedAt": "2026-09-25T12:00:00.000Z"
}
},
"error": null,
"metadata": {
"timestamp": "2026-09-25T12:00:00.000Z",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"instanceId": "inst_abc123"
}
}
{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "Nothing to update"
}
}
