Skip to main content

POST /flexi/addtokenbot

Create a token bot — an entry point for users who hold tokens rather than SOL. Returns tokenBotId and a botMasterAddress to fund. Once the user sends their tokens + at least requiredSol to that address, the server sells the tokens for SOL and starts the BotV2 instances automatically.

Use case

User holds a token position and wants to run volume bots without manually converting to SOL first.

Body

FieldTypeRequiredDescription
sTokenAddressstringyesToken mint.
sPoolIdstringyesPool id.
sTokenNameAndSymbolstringnoDisplay string like "Name (SYM)".

Response 200

{
"message": "Token bot added",
"tokenBotId": "…",
"botMasterAddress": "…",
"ePoolChosen": "RAYDIUM",
"requiredSol": 0.01
}
FieldDescription
tokenBotIdPass as iTokenBot in downstream calls.
botMasterAddressSend tokens + at least requiredSol SOL here to trigger bot startup.
ePoolChosenDEX auto-detected from the supplied sPoolId (e.g. RAYDIUM, PUMPFUN, METEORA, MOONIT).
requiredSolMinimum SOL required alongside the token transfer.

Errors

StatusMeaning
400sPoolId points to an unsupported or unrecognized pool program (DEX could not be detected).

Example

curl -X POST "$BASE_URL/flexi/addtokenbot" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "sTokenAddress": "…", "sPoolId": "…" }'