# Check a pending fee flush

`POST /dex/flush/check` · Lithos client API · Lithos Dex

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

Preview moving the pool's pending fees into the vault. The gap between the pool's and the vault's accumulators is what a flush would release.

## Responses

### 200: State of a prospective flush

`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)

### 503: Node 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

### 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/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
}
```
