# Place a redeem order on any pool

`POST /dex/pools/{poolNft}/orders/redeem` · Lithos client API · Lithos Dex · requires the `api_key` header

Source: https://lithosprotocol.org/docs/api/place-ld-pool-redeem-order

Moves the provision's NFT into a redeem order, in the same transaction claiming what the vault owes the provision. Needs the NFT in this wallet. Open on every pool, whatever its genesis, so liquidity can always leave.

## Parameters

| Name | In | Type | Required | Description |

|---|---|---|---|---|

| `poolNft` | path | string | yes | The pool's NFT id, 64 hex characters |

## Request body

`LDPoolRedeemRequest`, application/json.

- `provisionBoxId` (string, required): The live provision box to close
- `executorFee` (string): nanoERG the filler keeps. Omitted, from lithosdex.orders.
- `maxMinerFee` (string): Most of the executor fee a broadcast fill may pay as a network fee. Below executorFee.

## Responses

### 200: The placement

`LDPoolOrderPlaced`

- `outcome` (string, required, one of accepted, rejected, uncertain)
- `txId` (string, required)
- `poolNFT` (string, required)
- `kind` (string, required, one of SWAP, DEPOSIT, REDEEM)
- `orderBoxId` (string, required)
- `claimedX` (string): A redeem placement: what it claimed from the vault
- `claimedY` (string)
- `provisionBoxId` (string): A redeem placement that claimed: the provision's successor

### 400: The request is malformed, names a token the pool does not hold.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 403: Missing or wrong api_key

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 404: No LithosDex pool with that NFT, or no live provision with that id.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 409: A box the placement spends moved, or another LithosDex mutation is running. Re-quote and resend.

`LDStateChangedResponse`

- `error` (integer, required)
- `reason` (string, required)
- `detail` (string, required): What moved, and what it moved to
- `poolBoxId` (string): Current pool box id
- `vaultBoxId` (string): Current vault box id
- `provisionBoxId` (string): Current provision box id

### 422: The pool can be drained, the pool cannot fill this, or the wallet cannot cover it.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 503: The pool index is still building, the pool's genesis could not be read, or the node or wallet did not answer. Retry.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### default: Error

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X POST "http://localhost:9000/dex/pools/{poolNft}/orders/redeem" \
  -H "api_key: $LITHOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "provisionBoxId": "string", "executorFee": "string", "maxMinerFee": "string" }'
```

## Example response

```json
{
  "outcome": "accepted",
  "txId": "string",
  "poolNFT": "string",
  "kind": "SWAP",
  "orderBoxId": "string",
  "claimedX": "string",
  "claimedY": "string",
  "provisionBoxId": "string"
}
```
