Skip to main content

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​

ParamRequiredDescription
idyesId of any initiated or running bot on the pool.

Body​

FieldTypeRequiredDescription
bKeepHolderbooleanyestrue 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​

StatusMeaning
400Validation failed, or the bot is not initiated / running.
404Bot 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 }'