## GET /openapi/v1/dex/chains

The chains a list covers, with how many of its tokens are on each.

### Query parameters

| Parameter | Type | Default | Notes |
|:--|:--|:--|:--|
| `list` | string | `trending` | `trending`, `new` or `gainers`, in any case |
| `window` | string | `24h` | `5m`, `1h`, `4h` or `24h`: which version of the list, as on `/dex/tokens` |

### Response

```json
{
  "code": 0,
  "message": "success",
  "message_key": "SUCCESS",
  "result": {
    "items": [
      { "slug": "solana", "name": "Solana", "display_name": "Solana", "token_count": 474 },
      { "slug": "bnb-smart-chain-(bep20)", "name": "BNB Smart Chain (BEP20)", "display_name": "BSC", "token_count": 459 }
    ]
  }
}
```

Not paged. The chain holding the list's best-ranked token comes first.

| Field | Type | Notes |
|:--|:--|:--|
| `slug` | string | The `chain_slug` the other `/dex` endpoints take |
| `name`, `display_name` | string | Both the slug when we have no name for the chain |
| `token_count` | number | Tokens of this list on this chain, after the list's default filters (see `/dex/tokens`); this endpoint takes no filters |

### Examples

```bash
# The chains Trending covers
curl -H "X-Api-Key: <your-api-key>" \
  "https://open-api.coinworldcap.com/openapi/v1/dex/chains"

# The chains of the 1-hour Gainers list
curl -H "X-Api-Key: <your-api-key>" \
  "https://open-api.coinworldcap.com/openapi/v1/dex/chains?list=gainers&window=1h"
```

| HTTP status | `code` | When |
|:--|:--|:--|
| 400 | 40000 | `list` or `window` outside the values above |
| 503 | 50300 | No Trending list younger than three hours ([DEX tokens](#dex-tokens-what-the-endpoints-share)) |

A New, Gainers or shorter-window list that is missing or more than three hours old answers
`items: []`. The other errors are in [Errors](#errors).
