Skip to main content

PATCH /flexi/swapmodes/:id

Set the allowed swap methods for a pool. The setting belongs to the pool, not the single bot: every initiated and running bot of the user on the same sPoolId as bot :id is updated.

Live-applied — the worker reads the setting on every swap round.

Use case​

Turn off a method that does not suit a token (for example JITO), or opt in to MULTI_BUY, for all the bots trading one pool at once.

Path params​

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

Body​

FieldTypeRequiredDescription
aAllowedSwapModesstring[]yesNon-empty subset of BUY_SELL, MULTI_WALLET, JITO, MULTI_BUY; no duplicates.

The value is stored as given. On every swap round the worker skips any method the pair cannot run and, on cashback or taxed pairs, uses MULTI_BUY in place of MULTI_WALLET.

Response 200​

{
"message": "Swap methods updated",
"sPoolId": "…",
"aAllowedSwapModes": ["BUY_SELL", "MULTI_WALLET"],
"nBotsUpdated": 3
}

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/swapmodes/<botId>" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "aAllowedSwapModes": ["BUY_SELL", "MULTI_WALLET"] }'