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

# Tron Kafka 토픽

> Tron Kafka 토픽 이름, 파티션 키, 페이로드 스키마 레퍼런스 목록.

Tron에 대해 발행되는 Kafka 토픽의 권위 있는 목록입니다. 모든 토픽은 `tron.` 접두사를 사용합니다.

엔드투엔드 연결 상세, SASL 크리덴셜, SDK 예시는 [접근 방식 → Kafka Streams → Tron Streams](/ko/docs/access-methods/kafka-streams/tron-streams)를 참고하세요. 권위 있는 Protobuf 정의는 [github.com/chainstream-io/streaming\_protobuf/tron](https://github.com/chainstream-io/streaming_protobuf/tree/main/tron)을 참고하세요.

## 파티셔닝

* **토큰 주소** (base58 인코딩된 TRC-20 컨트랙트 주소) — 토큰 중심 토픽(`tokens`, `dex.trades`, `dex.pools`, `candlesticks`, `token-prices`, `token-supplies`)용
* **계정 주소** — 계정 중심 토픽(`balances`, `v1.transfers.proto`)용

동일 컨트랙트 또는 계정의 이벤트는 블록 순서로 같은 파티션에 도착합니다.

## 토픽 매트릭스

### DEX 거래

| 토픽                          | Proto 메시지     | 스키마 파일                   | 설명                              |
| --------------------------- | ------------- | ------------------------ | ------------------------------- |
| `tron.dex.trades`           | `TradeEvents` | `tron/trade_event.proto` | 원시 DEX 스왑 (SunSwap, JustSwap 등) |
| `tron.dex.trades.processed` | `TradeEvents` | `tron/trade_event.proto` | USD / TRX 가격, 의심 플래그로 보강        |

### 토큰

| 토픽                      | Proto 메시지     | 스키마 파일                   | 설명                     |
| ----------------------- | ------------- | ------------------------ | ---------------------- |
| `tron.tokens`           | `TokenEvents` | `tron/token_event.proto` | 토큰 라이프사이클 이벤트          |
| `tron.tokens.processed` | `TokenEvents` | `tron/token_event.proto` | 설명, 이미지, 소셜 링크로 보강된 토큰 |

### 토큰 수준 통계

| 토픽                    | Proto 메시지          | 스키마 파일                          | 설명                      |
| --------------------- | ------------------ | ------------------------------- | ----------------------- |
| `tron.token-prices`   | `TokenPriceEvent`  | `tron/token_price_event.proto`  | 집계된 가격 업데이트 (USD + TRX) |
| `tron.token-supplies` | `TokenSupplyEvent` | `tron/token_supply_event.proto` | 유통 + 총 공급량 변동           |

### 잔고

| 토픽              | Proto 메시지       | 스키마 파일                     | 설명               |
| --------------- | --------------- | -------------------------- | ---------------- |
| `tron.balances` | `BalanceEvents` | `tron/balance_event.proto` | 계정별 원시 잔고 변동 이벤트 |

### DEX 풀

| 토픽               | Proto 메시지       | 스키마 파일                      | 설명                    |
| ---------------- | --------------- | --------------------------- | --------------------- |
| `tron.dex.pools` | `DexPoolEvents` | `tron/dex_pool_event.proto` | 풀 생성 / 업데이트 / 동기화 이벤트 |

### 전송

| 토픽                                  | Proto 메시지          | 스키마 파일                         | 설명                           |
| ----------------------------------- | ------------------ | ------------------------------ | ---------------------------- |
| `tron.v1.transfers.proto`           | `TransfersMessage` | `tron/transfers_message.proto` | 모든 TRC-10 + TRC-20 + 네이티브 전송 |
| `tron.v1.transfers.processed.proto` | `TransfersMessage` | `tron/transfers_message.proto` | 블록 시점 가격 + USD 가치로 보강된 전송    |

### 캔들스틱

| 토픽                  | Proto 메시지           | 스키마 파일              | 설명                    |
| ------------------- | ------------------- | ------------------- | --------------------- |
| `tron.candlesticks` | `CandlestickEvents` | `candlestick.proto` | 여러 해상도에 걸친 사전 집계 OHLC |

## 컨슈머 예시

```python theme={null}
from confluent_kafka import Consumer
from streaming_protobuf.tron.trade_event_pb2 import TradeEvents

consumer = Consumer({
    "bootstrap.servers": "kafka.chainstream.io:9093",
    "security.protocol": "SASL_SSL",
    "sasl.mechanism": "SCRAM-SHA-512",
    "sasl.username": "<your-username>",
    "sasl.password": "<your-password>",
    "group.id": "my-consumer",
    "auto.offset.reset": "latest",
})
consumer.subscribe(["tron.dex.trades.processed"])

while True:
    msg = consumer.poll(1.0)
    if msg is None or msg.error():
        continue
    events = TradeEvents.FromString(msg.value())
    for trade in events.Trades:
        print(trade)
```

추가 컨슈머 예시는 [Tron Streams 가이드](/ko/docs/access-methods/kafka-streams/tron-streams)를 참고하세요.

## 다음 단계

<CardGroup cols={2}>
  <Card title="EVM Kafka 토픽" icon="ethereum" href="/ko/api-reference/kafka-topics/evm">
    Ethereum, BSC, Base, Polygon 등의 토픽 목록
  </Card>

  <Card title="Solana Kafka 토픽" icon="sun" href="/ko/api-reference/kafka-topics/solana">
    Solana의 토픽 목록
  </Card>

  <Card title="Kafka Streams 개요" icon="server" href="/ko/docs/access-methods/kafka-streams/overview">
    연결, 인증, 파티션 모델
  </Card>

  <Card title="Tron Streams 가이드" icon="book" href="/ko/docs/access-methods/kafka-streams/tron-streams">
    필드 정의 및 컨슈머 예시
  </Card>
</CardGroup>
