PATCH /flexi/keepholder/:id
Turn "keep holder" on or off for a pool. The setting belongs to the
pool, not the single bot: every initiated, running and stopped bot of
the user on the same sPoolId as bot :id is updated.
Use case
Start or stop leaving tokens in the bots' wallets between swaps (which creates holders) for all the bots of one campaign at once.
Path params
| Param | Required | Description |
|---|---|---|
id | yes | Id of any initiated or running bot on the pool. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
bKeepHolder | boolean | yes | true to keep tokens in the wallets between swaps. |
Response 200
{
"message": "Creating holders activated",
"sPoolId": "…",
"bKeepHolder": true,
"nBotsUpdated": 3
}
message reads Creating holders deactivated when bKeepHolder is
false.
Errors
| Status | Meaning |
|---|---|
400 | Validation failed, or the bot is not initiated / running. |
404 | Bot not found or not owned by the caller. |
Example
curl -X PATCH "$BASE_URL/flexi/keepholder/<botId>" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "bKeepHolder": true }'