Skip to main content

POST /flexi/initialize

Create one or more bots in a single group. Returns a sGroupId and the paymentAddress to fund. Bots stay INITIATED until paymentAddress receives the required SOL (or tokens, for ePaymentMode: "TOKEN"), at which point the worker automatically starts them and moves to RUNNING.

Once the request passes validation, any earlier INITIATED (unpaid) bots of this user are canceled — only one pending order exists at a time.

Use case​

Launch a volume-boost campaign with N bots, each with its own SOL budget and swap/wait-time ranges, sharing one pool and token.

Body​

FieldTypeRequiredDescription
aBotsarrayyes1–20 bot configs.
aBots[].nSOLnumberyesSOL budget for this bot. At least 0.3, at most two decimal places. At most 2 when ePaymentMode is TOKEN.
aBots[].nMinWaitTimeintegernoMin seconds between swaps, 0–3599. Default 0.
aBots[].nMaxWaitTimeintegernoMax seconds between swaps, 0–3599. Must be ≥ nMinWaitTime. Default: nMinWaitTime.
aBots[].nMinSwapSolnumbernoMin SOL per swap. Default 0.3.
aBots[].nMaxSwapSolnumbernoMax SOL per swap. Must be ≥ nMinSwapSol. Default: the larger of 1.5 and 5 × nMinSwapSol.
sTokenAddressstringyesToken mint.
sPoolIdstringyesPool id.
ePoolChosenenumyesRAYDIUM, METEORA, MOONIT, MOONSHOT, PUMPFUN, PUMPSWAP, LAUNCHLAB, HEAVEN, DBC.
ePaymentModeSOL | TOKENyesFunding currency.
ePaymentTokenQUOTE_TOKEN | BASE_TOKENwhen TOKENWhich side of the pair.
bKeepHolderbooleannoKeep tokens in wallet between swaps. When re-boosting a token that already has bots, an explicit value here is honored; if omitted, the previous bot's setting is inherited.
bGetReactionsbooleannoEnable DEX reaction triggers.
isAfterBondingbooleannoBot starts only after the token migrates from the bonding curve to the target pool.
aAllowedSwapModesstring[]noSwap methods the bots may use: a non-empty subset of BUY_SELL, MULTI_WALLET, JITO, JUPITER_MULTI_WALLET, MULTI_BUY, JUPITER_ONE_WALLET, no duplicates. Default: the methods already set for this pool by the user's other bots, otherwise BUY_SELL, MULTI_WALLET, JITO, JUPITER_MULTI_WALLET minus the ones the pair cannot run (see below).

Swap methods​

A requested aAllowedSwapModes is stored as given. On every swap round the worker skips any method the pair cannot run (for example JITO on Moonit/Heaven pools, cashback coins and taxed pairs) and, on cashback or taxed pairs, uses MULTI_BUY in place of MULTI_WALLET. Change it later with PATCH /flexi/swapmodes/:id.

JUPITER_MULTI_WALLET and JUPITER_ONE_WALLET work like MULTI_WALLET and MULTI_BUY, but every swap goes through Jupiter on the bot's own pool. A Jupiter round runs as BUY_SELL when Jupiter does not route that pool, a swap Jupiter cannot build goes straight to the pool, and on cashback or taxed pairs JUPITER_ONE_WALLET is used in place of JUPITER_MULTI_WALLET.

Response 200​

{ "message": "Bot initialized", "sGroupId": "…", "paymentAddress": "…" }

paymentAddress is the SOL deposit address for ePaymentMode: "SOL" and the token deposit address for "TOKEN". It is created on first use.

Errors​

StatusMeaning
400Validation error or pool not found for provided id.

Example​

curl -X POST "$BASE_URL/flexi/initialize" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{
"aBots": [ { "nSOL": 5, "nMinWaitTime": 30, "nMaxWaitTime": 120 } ],
"sTokenAddress": "…",
"sPoolId": "…",
"ePoolChosen": "RAYDIUM",
"ePaymentMode": "SOL"
}'