# Quote a liquidity deposit

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

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

Quote a deposit. Supply `availableX` and `availableY` for the most shares those funds buy, or `shares` for the cheapest deposit that buys exactly that many.

## Request body

`LDDepositRequest`, application/json.

- `availableX` (string): nanoERG available to deposit. Decimal string.
- `availableY` (string): Raw token units available to deposit. Decimal string.
- `shares` (string): Exact number of LP shares to buy. Decimal string.

## Responses

### 200: Quote for the requested deposit

`LDDepositQuote`

- `shares` (string, required): LP shares the deposit unlocks; becomes the provision's size. Decimal string.
- `amountX` (string, required): nanoERG the pool takes. Decimal string.
- `amountY` (string, required): Raw token units the pool takes. Decimal string.
- `shareOfSupply` (number · double, required): Fraction of the pool the provision will represent once it lands
- `provisionBoxValue` (string, required): nanoERG that must also fund the new provision box, on top of amountX. Decimal string.
- `totalErgRequired` (string, required): Total nanoERG leaving the wallet, network fee aside. Decimal string.
- `entryX` (string, required): Accumulator the provision enters at. It is owed nothing accrued before this. Decimal string. 
- `entryY` (string, required): Token side of the same. Decimal string.

### 400: Supply either `shares`, or both `availableX` and `availableY`.

`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 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/deposit/check" \
  -H "Content-Type: application/json" \
  -d '{ "availableX": "5000000000", "availableY": "151000000", "shares": "1176470" }'
```

## Example response

```json
{
  "shares": "1176470",
  "amountX": "5000000000",
  "amountY": "151058823",
  "shareOfSupply": 0.00117,
  "provisionBoxValue": "600000000",
  "totalErgRequired": "5600000000",
  "entryX": "41820000000000000000000000",
  "entryY": "1264000000000000000000000"
}
```
