POST /smart-sell/create-bot
Create a new Smart Sell bot targeting one pool.
Pool type auto-detected from sPoolId. Bot activates immediately and
starts listening for buys; fund wallets afterwards.
After the bot is created, fund each wallet in the response with:
- Tokens you want the bot to sell
- A small SOL top-up (≈ 0.01 SOL) for tx fees
Use case
React to buys on a pool you control the supply of — e.g. scale out of a position as the price climbs.
Body
| Field | Type | Required | Description |
|---|---|---|---|
sTokenAddress | string | yes | Token mint the bot sells. |
sPoolId | string | yes | Pool to watch. |
nSellPercent | number | yes | % of incoming buy to sell back (0–100). |
nMarketCap | number | yes | Sells are skipped when the token's market cap is below this value. |
nMinSellAmount | number | yes | Min SOL size of an incoming buy to react to (>= 0.1). |
nMaxSellAmount | number | yes | Max SOL size of an incoming buy to react to (> nMinSellAmount). |
aWhitelistedWallets | string[] | no | Wallets whose buys are ignored. |
aWallets | string[] | no | Existing client-owned wallets that will hold tokens to sell from. |
bGenerateWallet | boolean | no | If true, the server generates a fresh wallet. Mutually exclusive with aWallets. |
Either aWallets or bGenerateWallet=true must be supplied.
Response 200
{
"message": "Smart sell bot created. Send tokens and 0.01 SOL to wallets.",
"botId": "<ObjectId>",
"wallets": ["<pubkey>"]
}
Errors
| Status | Meaning |
|---|---|
400 | Invalid token / pool / unsupported pool type, or wallets don't belong to caller. |
500 | Pool detection failed. |
Example
curl -X POST "$BASE_URL/smart-sell/create-bot" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{
"sTokenAddress": "<mint>",
"sPoolId": "<pool>",
"nSellPercent": 50,
"nMarketCap": 100000,
"nMinSellAmount": 0.5,
"nMaxSellAmount": 5,
"bGenerateWallet": true
}'