## Choosing fields with `select`

[`/quotes`](#get-openapiv1quotes), [`/assets`](#get-openapiv1assets),
[`/rwa`](#get-openapiv1rwa) and [`/dex/tokens`](#get-openapiv1dextokens) take an optional
`select`: a comma-separated list of the row fields you want. Each row of `items` then carries
those fields and `id`, and nothing else.

```bash
curl -H "X-Api-Key: <your-api-key>" \
  "https://open-api.coinworldcap.com/openapi/v1/quotes?slug=bitcoin&select=price,percent_change"
```

```json
{
  "code": 0,
  "message": "success",
  "message_key": "SUCCESS",
  "result": {
    "items": [
      {
        "id": 1,
        "price": "66079.916784987",
        "percent_change": { "1h": "0.1", "24h": "1.2", "7d": "3.4", "30d": "5.6", "3m": "7.8", "1y": "9", "ytd": "1.1", "all": "2.2" }
      }
    ],
    "page": 1,
    "total_page": 1,
    "total": 1
  }
}
```

- **Only the rows are trimmed.** `page`, `total` and `total_page` are unchanged, and so are
  `/dex/tokens`' `list`, `window`, `data_time`, `stale` and `filters`. Without `select` the
  response is exactly what it is today.
- **`id` is always there**, whether you name it or not. On `/dex/tokens` it is the token's own id,
  a string; to call the other `/dex` endpoints for a token, select `chain_slug` and `address` too.
- **Names are the row fields in the endpoint's field table**, top level only. A nested object or
  array — `percent_change`, `windows`, `links`, `platforms`, `explorers` — comes whole; there is
  no `percent_change.24h`.
- **A name the endpoint's rows do not have is a `400`**, code `40000`: a typo, a dotted path, or a
  field of another endpoint (`liquidity` on `/quotes`). This is unlike other parameters, where a
  name we do not read is ignored ([Check parameter names](#check-parameter-names)) — here an
  ignored name would answer rows of nothing but `id`.
- **At most 100 names**, counted after splitting: empty items are dropped and a repeated name
  counts each time. More is a `400`.
- **Names are case-insensitive** and surrounding spaces are trimmed. `select=` with nothing in it
  is the same as no `select`.
- **Sorting and filtering are unaffected.** You can sort by a field you did not select; the rows
  and their order are the same as without `select`.
- **A field that may be absent stays absent.** A row with no `rank` has none when you select
  `rank`; it is not filled in as `null`.
- **On `/assets`, `fields` comes first.** `fields` adds `links` or `platforms` to the row, then
  `select` trims it: `fields=links&select=name,links` gives `id`, `name` and `links`. Selecting
  `links` or `platforms` without the matching `fields` value is a `400`. `fields` itself is
  unchanged, and still ignores names it does not know.
