legs_are_not_balanced โ
legs_are_not_balanced
Description โ
The sell and buy legs do not balance to the same value.
HTTP Status โ
400 Bad Request
doc_url Format โ
The doc_url value is an absolute URL and changes by environment:
<docs-base-url>/errors/legs_are_not_balanced
Typical Causes โ
- The sell amount is larger or smaller than the buy amount.
- A conversion step rounded one side of the switch incorrectly.
- The payload no longer satisfies the switch balance rule.
Example โ
Response:
json
{
"errors": [
{
"code": "legs_are_not_balanced",
"message": "Legs are not balanced: 100 EUR (SELL) vs. 95 EUR (BUY)",
"doc_url": "https://docs.example.com/errors/legs_are_not_balanced"
}
]
}How To Fix โ
- Recompute the legs so the sell and buy sides match.
- Check any rounding logic in the client.
- Retry with a balanced payload.