# Get CoinGecko Latest Block

Returns the latest indexed block number and timestamp in the CoinGecko block format.

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

_Last reviewed: 2026-09-18_

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

Requires an API key in the `Authorization` header.

Returns the latest indexed block number and timestamp in the CoinGecko block format.

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

**JavaScript**

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

**Python**

```python
import requests

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

## Parameters

_No parameters._

## Responses

### `200` — Latest block retrieved successfully

| Field | Type | Required |
| --- | --- | --- |
| `block` | `object` | Yes |
| `block.blockNumber` | `integer (int32)` | Yes |
| `block.blockTimestamp` | `integer (int64)` | Yes |

**Example response**

```json
{}
```

### Other responses

| Status | Meaning |
| --- | --- |
| `400` | Bad request |
| `404` | Latest block 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).
