---
url: /errors/insufficient_funds.md
---
# `INSUFFICIENT_FUNDS`

`INSUFFICIENT_FUNDS`

## Description

The switch tries to sell more value than the current position holds.

## HTTP Status

`422 Unprocessable Content`

## `doc_url` Format

The `doc_url` value is an absolute URL and changes by environment:

`<docs-base-url>/errors/insufficient_funds`

## Typical Causes

* The sell amount is larger than the current position.
* The request was built from stale position data.
* A market movement or rounding change reduced the available value.

## Example

Response:

```json
{
  "errors": [
    {
      "code": "INSUFFICIENT_FUNDS",
      "message": "Insufficient funds: attempt to sell 100 EUR of ISIN US0000000000 while position is only 95 EUR",
      "doc_url": "https://docs.example.com/errors/insufficient_funds"
    }
  ]
}
```

## How To Fix

1. Lower the sell amount.
2. Refresh the position data before retrying.
3. Retry with a switch that fits the current position.
