# List your outstanding orders on any pool

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

Source: https://lithosprotocol.org/docs/api/list-ld-pool-orders

Every order this wallet owns on the pool that has not yet filled or been cancelled, including orders whose placement is unconfirmed, as `GET /dex/orders` lists them for ERG:LIT. A token/token swap names the token it sells in `tokenIn`. Unconfirmed placements first, then newest first.

## Parameters

| Name | In | Type | Required | Description |

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

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

## Responses

### 200: Outstanding orders owned by this wallet on the pool

`LDOrderList`

- `orders` (LDOrder[], required)
  - `boxId` (string, required): Order box id. Pass it to `POST /dex/orders/{boxId}/cancel`.
  - `type` (string, required, one of SWAP, DEPOSIT, REDEEM)
  - `status` (string, required, one of PENDING, OPEN, FILLING, CANCELLING): PENDING: the placement is unconfirmed. OPEN: placed and waiting for a fill. FILLING: an unconfirmed transaction fills it. CANCELLING: an unconfirmed transaction cancels it. Only PENDING and OPEN orders can be cancelled. 
  - `placementTxId` (string, required): Transaction that created the order box
  - `placedHeight` (integer · int32): Height the placement confirmed at. Absent while it is unconfirmed.
  - `spendingTxId` (string): The unconfirmed transaction filling or cancelling the order. Present when FILLING or CANCELLING.
  - `owner` (string, required): Address that receives the fill, and the only key that can cancel
  - `value` (string, required): nanoERG held by the order box. Decimal string.
  - `executorFee` (string, required): nanoERG the order pays whoever fills it. Decimal string.
  - `maxMinerFee` (string, required): Most nanoERG a fill may pay as a miner fee, out of `executorFee`. Decimal string.
  - `ergIn` (boolean): SWAP only. True when selling ERG for the token.
  - `tokenIn` (string): A token/token SWAP only: the token sold.
  - `amountIn` (string): SWAP only. nanoERG or raw token units sold into the pool. Decimal string.
  - `minOutput` (string): SWAP only. Least the owner receives: tokens when selling ERG, or nanoERG after `executorFee` when selling the token. Decimal string. 
  - `amountX` (string): DEPOSIT only. Most nanoERG offered to the reserves. Decimal string.
  - `amountY` (string): DEPOSIT only. Raw token units offered. Decimal string.
  - `minShares` (string): DEPOSIT only. Fewest shares the order accepts. Decimal string.
  - `ownerNFT` (string): REDEEM only. Ownership NFT of the provision the order closes.
  - `provisionBoxId` (string): REDEEM only. Current box of that provision. Absent when it cannot be found.
  - `fillableNow` (boolean, required): Whether the order would fill against the current pool. False when the pool cannot meet the order's minimum or refuses it; the order waits until that changes or it is cancelled. Always true while `FILLING` and false while `CANCELLING`. 

### 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.

`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 or mempool did not answer. Never returns a partial list.

`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}/orders" \
  -H "api_key: $LITHOS_API_KEY"
```

## Example response

```json
{
  "orders": [
    {
      "boxId": "5035b2e112b4f5b873dd3444c01df1e7e697807fd84fe96790eacb128e46428d",
      "type": "SWAP",
      "status": "OPEN",
      "placementTxId": "40b7d045a858d537cdbf072e46ffbb86c0c9f6b0e93c369c1ffcba76797636d7",
      "placedHeight": 484719,
      "spendingTxId": "9f3c1ab7d2e45806c91f7b3ad4e2091856cbf740e3a92d5178cc0b46e21f5d38",
      "owner": "3WwbzR34YmLRy3Z6WLON5hBBkX8Zm1gUHmC7tEXDNRJfHBqhsZr",
      "value": "1004000000",
      "executorFee": "3000000",
      "maxMinerFee": "1000000",
      "ergIn": true,
      "tokenIn": true,
      "amountIn": "1000000000",
      "minOutput": "29974258",
      "amountX": "5000000000",
      "amountY": "152000000",
      "minShares": "1170587",
      "ownerNFT": "a1f4c2e8b7d93052416fbc8e07d21935a8c4f60b2e91d7385c06a4b1f2e83d97",
      "provisionBoxId": "ce00d6e0f4fd3390c0519bb0d24824e1e6b06978163f4845a7cf2c1c7d8f1b65",
      "fillableNow": true
    }
  ]
}
```
