# 단일 이벤트 조회

ID로 이벤트의 최신 리비전을 가져옵니다.

> Source: https://tokenearly.com/ko/developers/rest/get-event · Docs index: https://tokenearly.com/ko/developers/llms.txt · OpenAPI: https://api.tokenearly.com/v1/openapi.json

`GET https://api.tokenearly.com/v1/events/{id}`

항상 현재 최신 리비전을 반환합니다. 토픽 범위 밖의 이벤트는 404를 반환합니다(없음과 권한 없음을 구분하지 않음).

**API 키 필요**

## 파라미터

| 파라미터 | 위치 | 타입 | 필수 | 설명 |
|---|---|---|---|---|
| `id` | path | string | ✓ | 목록 엔드포인트가 반환한 이벤트 ID. |

## 요청 예시

**cURL**

```bash
curl "https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499" \
  -H "Authorization: Bearer $TOKENEARLY_API_KEY"
```

**Python**

```python
import os, requests

resp = requests.get(
    "https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499",
    headers={"Authorization": f"Bearer {os.environ['TOKENEARLY_API_KEY']}"},
    timeout=10,
)
resp.raise_for_status()
print(resp.json())
```

**Node.js**

```javascript
// Node 18+ (built-in fetch)
async function main() {
  const resp = await fetch("https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499", {
    headers: { Authorization: `Bearer ${process.env.TOKENEARLY_API_KEY}` },
  });
  const body = await resp.json();
  if (!resp.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
  console.log(body);
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.tokenearly.com/v1/events/6b0ff643d0e4e92d84810499", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("TOKENEARLY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(body))
}
```

## 응답 예시

```json
{
  "spec_version": "1.0",
  "id": "6b0ff643d0e4e92d84810499",
  "revision": 3,
  "action": "updated",
  "topic": "announcement.gate",
  "type": "announcement",
  "source": {
    "id": "gate",
    "name": "Gate.io"
  },
  "published_at": 1796208195,
  "published_at_ms": 1796208195000,
  "detected_at_ms": 1796208195896,
  "data": {
    "titles": {
      "zh": "Gate 已上线 RITUAL 合约交易、杠杆借贷交易、交易机器人、跟单、闪兑、定投功能",
      "en": "Gate Now Supports RITUAL for Futures Trading, Margin Loans, Bots, Copy, Convert, and Auto-Invest",
      "ko": "Gate는 RITUAL 계약 거래, 레버리지 대출 거래, 트레이딩 봇, 팔로우 트레이딩, 스왑, 정기 투자 기능을 출시했습니다."
    },
    "original_lang": "zh",
    "translated_langs": [
      "ko"
    ],
    "url": "https://www.gate.io/article/103112",
    "exchange_category": "listing",
    "listing": {
      "is_listing": true,
      "market": "futures"
    },
    "symbols": []
  }
}
```

## 오류

| 코드 | HTTP | 설명 |
|---|---|---|
| `missing_api_key` | 401 | 키가 없습니다. `Authorization: Bearer <키>`를 쓰세요. |
| `invalid_api_key` | 401 | 키가 없거나 재설정 또는 폐기되었습니다. |
| `key_expired` | 401 | 체험 키가 만료되었습니다. 새 체험 키를 신청하거나 구독 후 정식 키를 만드세요. |
| `plan_required` | 403 | 현재 플랜에 개발자 API(또는 해당 기능)가 없습니다. |
| `ip_not_allowed` | 403 | 키에 IP 허용 목록이 설정되어 있고 요청 IP가 목록에 없습니다. |
| `not_found` | 404 | 토픽 범위 안에 해당 이벤트가 없거나(GET /v1/events/{id}), 요청한 경로가 존재하지 않습니다(예: 엔드포인트 주소 오타). |
| `rate_limited` | 429 | 이 키의 요청 빈도를 넘었습니다(REST와 MCP 합산, 간격은 `/v1/me`의 `limits.rest_interval_seconds`). Retry-After 초만큼 기다린 뒤 다시 시도하세요. |
