# Check a flush on any pool

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

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

What flushing the pool would move into its vault now. X is ERG for an ERG/token pool. `lastFlushHeight` is not tracked for these pools.

## Parameters

| Name | In | Type | Required | Description |

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

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

## Responses

### 200: The flush as it stands

`LDFlushCheck`

- `pendingX` (string, required): nanoERG fees the pool is holding for the vault. Decimal string.
- `pendingY` (string, required): Token side of the same. Decimal string.
- `canFlush` (boolean, required): A flush needs something to move, or the pool rejects it
- `poolAccX` (string, required): The pool's current ERG accumulator. Decimal string.
- `poolAccY` (string, required)
- `vaultAccX` (string, required): The vault's ERG accumulator. Trails the pool's; the gap is exactly the money the vault does not yet have. Decimal string. 
- `vaultAccY` (string, required)
- `vaultBalanceAfterX` (string, required): What the vault would hold once the flush lands. Decimal string.
- `vaultBalanceAfterY` (string, required)
- `lastFlushHeight` (integer · int32)
- `currentHeight` (integer · int32, required)

### 404: No LithosDex pool with that NFT.

`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, or the node could not be read. 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}/flush/check"
```

## Example response

```json
{
  "pendingX": "3180000000",
  "pendingY": "96400000",
  "canFlush": true,
  "poolAccX": "41820000000000000000000000",
  "poolAccY": "1264000000000000000000000",
  "vaultAccX": "38640000000000000000000000",
  "vaultAccY": "1167600000000000000000000",
  "vaultBalanceAfterX": "12600000000",
  "vaultBalanceAfterY": "380700000",
  "lastFlushHeight": 1298100,
  "currentHeight": 1312460
}
```
