Hi Team,
I’ve encountered a consistent API inconsistency when programmatically managing DCA bots.
The Workflow
- Clone a Template Bot using
PUT /api/cloneDCABot(paperContext=true). - Change Pair of the new clone using
POST /api/changeBotPairs.
The Issue
This workflow works perfectly for LONG strategy bots, but fails consistently for SHORT strategy bots, even when the templates are configured identically (Multi-Pair).
1. LONG Bot (Success)
When I perform this on a Long Template (Multi-Pair), the API accepts the pair change, even if the new pair wasn’t in the original template’s specific list (as long as it’s a valid pair for the exchange).
Response: 200 OK
2. SHORT Bot (Failure)
When I perform the exact same operation on a Short Template (Multi-Pair, e.g. BTC/USDT), I get a 400 error.
Request:
POST /api/changeBotPairs
{
"botId": "695XXXXXXXXXXXXXXXX",
"pairsToSet": ["LTC_USDT"],
"pairsToSetMode": "replace",
"paperContext": true
}
Response:
400 Bad Request
{
"status": "NOTOK",
"reason": "Pairs didn't pass settings check",
"data": null
}
Attempts to Fix
- Validating Formats: I ensured the pair format matches exactly (
BTCUSDTvsBTC_USDT). Even with a clean template usingBTCUSDT, the error persists. - Single Pair Test: If I try to use a Single Pair Short bot as a base, I get:
"Pair update is not supported in single coin bots". - Workaround: The only way I could get this to work was to manually “hack” the Template’s JSON export to include 150+ pairs in the
pairandwhiteListarrays, and then re-import it. This forces the API to accept them.
Conclusion
It seems the Short bot logic has a stricter (or broken) “Settings Check” validation than the Long bot logic. It refuses to allow changeBotPairs to set a pair that wasn’t explicitly in the original Template’s whitelist, rendering dynamic fleet management impossible for Short bots without the massive JSON workaround.
Could you please align the Short bot validation logic with the Long bot logic to allow changeBotPairs to function dynamically?
Thanks!