# Get CoinGecko Latest Block

Latest indexed block.

_Source: https://beta.taostats.io/docs/new/coingecko/get-coingecko-latest-block_

_Last reviewed: 2026-10-07_

```http
GET https://api.taostats.io/v1/coingecko/latest-block
```

Requires an API key in the `Authorization` header.

Latest indexed block.

## 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/v1/coingecko/latest-block"
```

**JavaScript**

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

**Python**

```python
import requests

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

## Parameters

_No parameters._

## Responses

### `200` — Latest indexed block

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `block` | `object` | Yes | CoinGecko latest-block descriptor. Field names are camelCase per the CoinGecko contract. |
| `block.blockNumber` | `integer (int32)` | Yes | Block number. |
| `block.blockTimestamp` | `integer (int64)` | Yes | Block timestamp in unix seconds. |

### `404` — No indexed block

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | `string` | Yes | Plain-english message describing the failure from the caller's perspective. |
| `status_code` | `integer (int32)` | Yes | HTTP status code (mirrored in the response status line for convenience). |

### `500` — Internal server error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | `string` | Yes | Plain-english message describing the failure from the caller's perspective. |
| `status_code` | `integer (int32)` | Yes | HTTP status code (mirrored in the response status line for convenience). |

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