---
url: /errors/legs_are_not_balanced.md
---
# `LEGS_ARE_NOT_BALANCED`

`LEGS_ARE_NOT_BALANCED`

## Description

The sell and buy legs do not balance to the same value.

## HTTP Status

`422 Unprocessable Entity`

## `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

1. Recompute the legs so the sell and buy sides match.
2. Check any rounding logic in the client.
3. Retry with a balanced payload.
