---
url: /errors/attempt_to_buy_in_amount_when_selling_full_position.md
---
# `attempt_to_buy_in_amount_when_selling_full_position`

`attempt_to_buy_in_amount_when_selling_full_position`

## Description

A buy leg was expressed as an amount while the switch was selling a full position.

## HTTP Status

`400 Bad Request`

## `doc_url` Format

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

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

## Typical Causes

* The client used the wrong unit for the buy leg.
* The request mixed amount-based and percentage-based switch legs incorrectly.
* The payload was built without applying the switch-kernel rules.

## Example

Response:

```json
{
  "errors": [
    {
      "code": "attempt_to_buy_in_amount_when_selling_full_position",
      "message": "When selling one full position all buy legs should be in BASIS_POINT_OF_SELL_PROCEED, but US0000000000 was found in amount.",
      "doc_url": "https://docs.example.com/errors/attempt_to_buy_in_amount_when_selling_full_position"
    }
  ]
}
```

## How To Fix

1. Express buy legs in `BASIS_POINT_OF_SELL_PROCEED` when selling a full position.
2. Keep the switch legs in the format expected by the API reference.
3. Retry after rebuilding the payload with the correct unit.
