# Place a deposit order on any pool

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

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

Locks both sides and a provision box in an order that fills for at least `minShares`. The fill mints this wallet a provision NFT. Refused on a pool that can be drained, and on an unverified pool needs `acknowledgeUnverified`.

## Parameters

| Name | In | Type | Required | Description |

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

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

## Request body

`LDPoolDepositExecuteRequest`, application/json.

- `amountX` (string, required)
- `amountY` (string, required)
- `minShares` (string, required): Fewest shares the order accepts
- `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.
- `acknowledgeUnverified` (boolean): Must be true to trade with a pool the verified list does not name

## 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, or trades with an unverified pool without acknowledgeUnverified.

`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/deposit" \
  -H "api_key: $LITHOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amountX": "string", "amountY": "string", "minShares": "string", "executorFee": "string", "maxMinerFee": "string", "acknowledgeUnverified": true }'
```

## Example response

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