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
| Field | Type | Required | Description |
|---|---|---|---|
sTokenAddress | string | yes | Token mint. |
sPoolId | string | yes | Pool id. |
sTokenNameAndSymbol | string | no | Display string like "Name (SYM)". |
Response 200
{
"message": "Token bot added",
"tokenBotId": "…",
"botMasterAddress": "…",
"ePoolChosen": "RAYDIUM",
"requiredSol": 0.01
}
| Field | Description |
|---|---|
tokenBotId | Pass as iTokenBot in downstream calls. |
botMasterAddress | Send tokens + at least requiredSol SOL here to trigger bot startup. |
ePoolChosen | DEX auto-detected from the supplied sPoolId (e.g. RAYDIUM, PUMPFUN, METEORA, MOONIT). |
requiredSol | Minimum SOL required alongside the token transfer. |
Errors
| Status | Meaning |
|---|---|
400 | sPoolId 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": "…" }'