# Get CoinGecko Pair

Returns a TAO/subnet-token pair and its asset identifiers in the CoinGecko pair format.

_Source: https://beta.taostats.io/docs/api-reference/coingecko/get-coingecko-pair_

_Last reviewed: 2026-09-18_

```http
GET https://api.taostats.io/api/coingecko/pair
```

Requires an API key in the `Authorization` header.

Returns a TAO/subnet-token pair and its asset identifiers in the CoinGecko pair format. Supply the pair identifier as `0-{netuid}`.

## Try it

Try this request in the browser on the HTML version of this page, or use the code samples below.

### Code samples

**cURL**

```bash
curl -H "Authorization: <YOUR_API_KEY>" \
  "https://api.taostats.io/api/coingecko/pair"
```

**JavaScript**

```js
const response = await fetch('https://api.taostats.io/api/coingecko/pair', {
  headers: {
    Authorization: '<YOUR_API_KEY>',
  },
});
const data = await response.json();
```

**Python**

```python
import requests

response = requests.get(
    "https://api.taostats.io/api/coingecko/pair",
    headers={"Authorization": "<YOUR_API_KEY>"},
)
data = response.json()
```

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | `string` | Yes | Subnet to compare with root. |

## Responses

### `200` — Pair retrieved successfully

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `pair` | `object` | Yes |  |
| `pair.asset0Id` | `string` | Yes |  |
| `pair.asset1Id` | `string` | Yes |  |
| `pair.dexKey` | `string` | Yes |  |
| `pair.id` | `string` | Yes | id must be 0-\{netuid\} where netuid is an integer |

**Example response**

```json
{}
```

### Other responses

| Status | Meaning |
| --- | --- |
| `400` | Bad request |
| `404` | Pair not found |
| `500` | Internal server error |

Every request needs an `Authorization` header holding your API key — see [Getting started with the Taostats API](https://beta.taostats.io/docs/start-here/getting-started-with-taostats-api).
