> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cryptoquant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API v2 Discovery

> Discover API v2 endpoints, parameter values, asset classes, windows, and the exchanges that hold data for each asset.

Use the discovery APIs to enumerate endpoint parameters and on-chain assets before building
a request. Both endpoints use Bearer authentication and return JSON in the same
`result.data` / `status` envelope. The lists reflect the assets and endpoints visible in
the serving environment.

<Warning>
  **List values are candidates. The endpoint page's Assets and windows table defines the
  guaranteed coverage.** Endpoint parameter lists do not guarantee every combination of
  asset, chain, exchange, and window. Asset-level windows are a union across endpoints,
  and validated exchanges do not imply support for every metric or window. For example,
  [Supply](/v2/network/supply) supports different windows for native assets and stablecoins.
</Warning>

## Discover endpoint parameters

```text theme={null}
GET /v2/discovery/endpoints
```

Returns `/v2/` endpoint paths with their accepted parameter values and required parameter
names. Parameters vary by endpoint: on-chain entries can include `asset`, `chain`,
`exchange`, and `window`; other entries expose their own parameters. Common request
parameters `from`, `to`, `limit`, and `format` are omitted from the returned metadata.

### Query parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `asset` | string | No | Filter entries by CryptoQuant asset alias, e.g. `btc`, `eth`, or `usdt` (no chain suffix). Only endpoints whose `parameters.asset` list contains the alias are returned. This does not narrow the other parameter lists to that asset. An unmatched alias returns an empty `data` array. |
| `category` | string | No | Filter by `community`, `market`, `sentiment`, `network`, `flows`, or `indicator`. Omit to list all v2 categories. An unsupported category returns `400`. |
| `format` | string | No | `json` (default) or `csv`. An unsupported format returns `400`. |

### curl examples

```bash theme={null}
# List every visible v2 endpoint
curl --request GET \
  --url 'https://api.cryptoquant.com/v2/discovery/endpoints' \
  --header 'Authorization: Bearer YOUR_API_KEY'

# Find endpoints that accept the btc alias
curl --request GET \
  --url 'https://api.cryptoquant.com/v2/discovery/endpoints?asset=btc' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

### Response fields

| Field | Type | Description |
| - | - | - |
| `result.data` | array of objects | Matching endpoint entries. |
| `result.data[].path` | string | Full endpoint path, starting with `/v2/`. |
| `result.data[].parameters` | object of string arrays | Parameter name → candidate values for that endpoint. |
| `result.data[].parameters.asset` | string array | Asset aliases, when the endpoint has an asset parameter. Registry-backed assets are restricted to those visible and servable in the current environment. |
| `result.data[].parameters.chain` | string array | Chains, when applicable, e.g. `bitcoin` or `ethereum`. Registry-backed chains are restricted to those with a visible, servable asset. |
| `result.data[].parameters.exchange` | string array | Exchange names and aggregate aliases, when applicable. Use chain-specific metadata below when present. |
| `result.data[].parameters.window` | string array | Candidate windows across the endpoint's assets; consult its **Assets and windows** table for each asset class. |
| `result.data[].required_parameters` | string array | Required parameter names, excluding the common parameters omitted above. |
| `result.data[].parameters_by_chain` | object | Optional parameter name → chain → string array mapping, e.g. `parameters_by_chain.exchange.bitcoin`. Present when chain-specific values are available; includes only servable chains. |
| `status.code` | integer | `200` for a successful response. |
| `status.message` | string | `success` for a successful response. |

Illustrative JSON excerpt; live lists can contain additional values and entries:

```json theme={null}
{
  "result": {
    "data": [
      {
        "path": "/v2/network/supply",
        "parameters": {
          "asset": ["btc", "eth", "usdt"],
          "chain": ["bitcoin", "ethereum"],
          "window": ["block", "10min", "hour", "day"]
        },
        "required_parameters": ["asset"]
      }
    ]
  },
  "status": {"code": 200, "message": "success"}
}
```

For `format=csv`, the response is `text/csv` with columns
`path,parameters,required_parameters`. Object and array cells use Python-style
representations (single quotes). The CSV response does not include the JSON envelope or
`parameters_by_chain`; use JSON for chain-specific values.

## Discover assets

```text theme={null}
GET /v2/discovery/assets
```

Returns one entry per asset alias and chain for the on-chain classes `btc`, `eth`,
`erc20`, and `stablecoin`. Entries are sorted by alias, then chain. Only assets visible
in the serving environment are included. Optional query filters `asset`, `chain`, and
`symbol_class` narrow the list (for example `?symbol_class=stablecoin`); the response is JSON.

### curl example

```bash theme={null}
curl --request GET \
  --url 'https://api.cryptoquant.com/v2/discovery/assets' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

### Response fields

| Field | Type | Description |
| - | - | - |
| `result.data` | array of objects | Asset-and-chain entries. |
| `result.data[].asset` | string | CryptoQuant asset alias to use in `asset=`, without a chain suffix. |
| `result.data[].chain` | string | Chain for this registry entry, e.g. `bitcoin` or `ethereum`. |
| `result.data[].symbol_class` | string | `btc` (native Bitcoin), `eth` (native Ethereum), `erc20` (ERC-20 token), or `stablecoin`. |
| `result.data[].status` | string | Registry lifecycle status: `dev`, `stage`, or `prod`, filtered by the serving environment. A missing registry status is treated as `prod`. |
| `result.data[].windows` | string array | Sorted union of the windows supported for this asset and chain across visible endpoints. May be empty; it is not a per-endpoint guarantee. |
| `result.data[].exchanges` | string array | Exchanges you can pass as `exchange=` for this asset. Native assets (`btc`, `eth`) list every validated exchange in the chain's entity registry. ERC-20 tokens and stablecoins list only the validated exchanges that hold reserve data for that token in the last 3 days, plus the aggregates `all_exchange`, `spot_exchange`, and `derivative_exchange` when at least one such exchange exists. An empty array means CryptoQuant has no exchange data for that asset yet, not that calls are rejected. |
| `status.code` | integer | `200` for a successful response. |
| `status.message` | string | `success` for a successful response. |

Illustrative JSON excerpt; live lists can contain additional values and entries:

```json theme={null}
{
  "result": {
    "data": [
      {
        "asset": "btc",
        "chain": "bitcoin",
        "symbol_class": "btc",
        "status": "prod",
        "windows": ["block", "day", "hour"],
        "exchanges": ["all_exchange", "binance"]
      }
    ]
  },
  "status": {"code": 200, "message": "success"}
}
```

Start with the asset list, find candidate endpoints with
`/v2/discovery/endpoints?asset=<alias>`, then check the selected endpoint's
**Assets and windows** table before choosing a window. For exchange requests, also check
the asset's `exchanges` (only exchanges with data for that asset) and any
`parameters_by_chain` values returned by endpoint discovery. `/v2/discovery/endpoints?asset=<alias>`
returns `400` when the alias is not a visible asset.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.