# One LithosDex pool and its vault

`GET /dex/pools/{poolNft}` · Lithos client API · Lithos Dex

Source: https://lithosprotocol.org/docs/api/get-ld-pool-by-nft

One pool as the index last read it, with its fee vault read from the node now.

## Parameters

| Name | In | Type | Required | Description |

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

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

## Responses

### 200: The pool and its vault

`LDPoolDetail`

- `pool` (LDPoolSummary, required): One LithosDex pool as the index last read it. Amounts are decimal strings in base units.
  - `poolNFT` (string, required)
  - `kind` (string, required, one of n2t, t2t): `n2t` is ERG against a token, `t2t` token against token
  - `utxoId` (string, required): The pool box the index read
  - `inclusionHeight` (integer · int32, required)
  - `tokenX` (LDPoolToken, required): One side of a pool. A verified token's name, ticker and decimals come from the client's verified list; any other token's from the node's token index, where whoever minted the token chose them. 
    - `tokenId` (string, required): Token id, or `ERG` for the X side of an ERG/token pool
    - `name` (string)
    - `ticker` (string): Short symbol. Verified tokens and ERG only.
    - `decimals` (integer · int32)
    - `verified` (boolean, required)
  - `tokenY` (LDPoolToken, required): One side of a pool. A verified token's name, ticker and decimals come from the client's verified list; any other token's from the node's token index, where whoever minted the token chose them. 
  - `reservesX` (string, required)
  - `reservesY` (string, required)
  - `pendingX` (string, required): Fees awaiting a flush to the vault
  - `pendingY` (string, required)
  - `supply` (string, required): Shares issued
  - `feeParams` (LDFeeParams, required): Fee numerators over `feeDenom`. `dexFeeNum` stays in the pool; `ergFeeNum` / `tokenFeeNum` are set aside for liquidity providers. 
    - `dexFeeNum` (integer · int64, required)
    - `ergFeeNum` (integer · int64, required)
    - `tokenFeeNum` (integer · int64, required)
    - `feeDenom` (integer · int64, required): Denominator of every numerator above
  - `provTokensLeft` (string, required): Deposits the pool can still take, one provision token each
  - `price` (number · double): Units of Y per unit of X at display decimals. Absent when either side's decimals are unknown.
  - `verified` (boolean, required): Whether the client's verified list names this pool
  - `genesisChecked` (boolean, required): Whether this pool's genesis was checked. False for verified pools, which are checked by hand, and while the node could not be read. 
  - `problems` (string[], required): Genesis facts this pool breaks. Any one can let the pool be drained.
  - `warnings` (string[], required): Risks short of that, such as too little ERG to survive storage rent.
- `vault` (LDPoolVault, required): A pool's fee vault. Amounts are decimal strings in base units.
  - `vaultNFT` (string, required)
  - `utxoId` (string, required)
  - `accX` (string, required): Fee per share of X, scaled by 1e27, as of the last flush
  - `accY` (string, required)
  - `balanceX` (string, required): Fees held for provisions to claim
  - `balanceY` (string, 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 index is still building, or the vault 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 GET "http://localhost:9000/dex/pools/{poolNft}"
```

## Example response

```json
{
  "pool": {
    "poolNFT": "string",
    "kind": "n2t",
    "utxoId": "string",
    "inclusionHeight": 0,
    "tokenX": {
      "tokenId": "c1980d829988229516430a47a5eca376060b6ce859616db0936e78ab25cb6de7",
      "name": "LIT",
      "ticker": "LIT",
      "decimals": 9,
      "verified": true
    },
    "tokenY": {
      "tokenId": "c1980d829988229516430a47a5eca376060b6ce859616db0936e78ab25cb6de7",
      "name": "LIT",
      "ticker": "LIT",
      "decimals": 9,
      "verified": true
    },
    "reservesX": "string",
    "reservesY": "string",
    "pendingX": "string",
    "pendingY": "string",
    "supply": "string",
    "feeParams": {
      "dexFeeNum": 9985,
      "ergFeeNum": 15,
      "tokenFeeNum": 15,
      "feeDenom": 10000
    },
    "provTokensLeft": "string",
    "price": 0.1,
    "verified": true,
    "genesisChecked": true,
    "problems": [
      "string"
    ],
    "warnings": [
      "string"
    ]
  },
  "vault": {
    "vaultNFT": "string",
    "utxoId": "string",
    "accX": "string",
    "accY": "string",
    "balanceX": "string",
    "balanceY": "string"
  }
}
```
