Skip to main content

PATCH /smart-sell/change-config

Update one bot's configuration. Only the fields you send are changed; missing fields are left alone. Array fields (aWhitelistedWallets, aWallets) replace the stored array.

Live-applied — no restart needed.

Use case​

Tune reactiveness on the fly: raise nSellPercent during a rally, extend the whitelist to ignore a new MM wallet, etc.

Body​

FieldTypeRequiredDescription
sBotIdstringyesSmart Sell id.
nSellPercentnumbernoNew trade percentage (0–100).
nMarketCapnumbernoNew minimum market cap (USD). Must be > 0.
nMaxMarketCapnumbernoBUY bots only: new market-cap ceiling (USD). 0 removes the cap. Must be > the effective nMarketCap when > 0.
nMinSellAmountnumbernoNew min trigger size, in the bot's eAmountUnit. Must be > 0 and at least the equivalent of 0.1 SOL in that unit (see create-bot).
nMaxSellAmountnumbernoNew max trigger size. Must stay greater than nMinSellAmount (the stored value is used for a side you do not send).
eAmountUnitQUOTE | SOL | USDnoNew unit for the size band. Changing it to a different unit requires nMinSellAmount and nMaxSellAmount in the same request, expressed in the new unit.
bConvertProceedsToSolbooleannoConvert accumulated quote-token proceeds back to SOL (sell bots on token-quoted pools).
aWhitelistedWalletsstring[]noReplaces the whitelist. Each entry must be a valid Solana public key.
aWalletsstring[]noReplaces the wallet list. Non-empty; each entry must be a valid public key of a wallet owned by the caller. Duplicates are dropped.

Response 200​

{ "message": "Bot config updated" }

Errors​

StatusMeaning
400Validation failed; eAmountUnit changed without both band ends; nMinSellAmount below the minimum; nMaxSellAmount not greater than nMinSellAmount; nMaxMarketCap on a SELL bot or not greater than nMarketCap; or some aWallets are not owned by the caller.
403Bot not owned by caller.
404Bot not found.

Example​

curl -X PATCH "$BASE_URL/smart-sell/change-config" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "sBotId": "<id>", "nSellPercent": 75 }'