# Quote a direct redemption on any pool

`POST /dex/pools/{poolNft}/redeem/check` · Lithos client API · Lithos Dex

Source: https://lithosprotocol.org/docs/api/check-ld-pool-direct-redeem

What closing the provision now returns, and the fees the vault owes it that a direct redemption loses.

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

`LDPoolDirectRedeemQuote`

- `poolNFT` (string, required)
- `provisionBoxId` (string, required)
- `shares` (string, required)
- `amountX` (string, required)
- `amountY` (string, required)
- `ergReturned` (string, required): The provision box's ERG, which comes back beside the reserves
- `unclaimedX` (string, required): Fees the vault owes the provision now, lost when its box is spent
- `unclaimedY` (string, required)
- `withinMinSupply` (boolean, required)
- `networkFee` (string, required)
- `poolBoxId` (string, required)

### 400: The request is malformed, names a token the pool does not hold, or leaves out an acknowledgement it needs.

`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

### 422: The pool can be drained, the pool cannot fill this at its depth or above the floor, 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: Node or wallet unavailable. Retry.

`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}/redeem/check" \
  -H "Content-Type: application/json" \
  -d '{ "provisionBoxId": "string", "executorFee": "string", "maxMinerFee": "string" }'
```

## Example response

```json
{
  "poolNFT": "string",
  "provisionBoxId": "string",
  "shares": "string",
  "amountX": "string",
  "amountY": "string",
  "ergReturned": "string",
  "unclaimedX": "string",
  "unclaimedY": "string",
  "withinMinSupply": true,
  "networkFee": "string",
  "poolBoxId": "string"
}
```
