API Bug: changeBotPairs fails for SHORT bots (“Pairs didn’t pass settings check”), but works for LONG

Hi Team,

I’ve encountered a consistent API inconsistency when programmatically managing DCA bots.

The Workflow

  1. Clone a Template Bot using PUT /api/cloneDCABot (paperContext=true).
  2. 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

  1. Validating Formats: I ensured the pair format matches exactly (BTCUSDT vs BTC_USDT). Even with a clean template using BTCUSDT, the error persists.
  2. 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".
  3. 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 pair and whiteList arrays, 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!

Hello! Thank you for reporting this detailed API bug regarding the changeBotPairs function for SHORT bots. We have received your report and appreciate the thorough explanation of the workflow, the issue, and your attempts to fix it, including the workaround. We understand this is impacting your dynamic fleet management for Short bots, and we apologize for any inconvenience this has caused. The information you provided, especially the botId from your request, will be very helpful in our investigation. We will update you shortly on our progress.

The message means that new pair cannot be set due to bot order size. Either min quote if its futures or min base if its coinm or not futures

That explains a lot. Too bad the errors can’t be more explainable. This would take away the guesswork.

What do you suggest? Using a high bot order size in the template and change it accordingly afterwards?

1 Like

Yes, you can do that.
If you has access to pairs info, you can first update order size if needed, then change pairs