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

# Solana 데이터 스트리밍 빠른 시작

> 5분 이내에 첫 실시간 Solana 데이터 스트림을 실행하세요. LaserStream gRPC, LaserStream WebSocket, Webhooks 설정 가이드입니다.

## 빠른 설정

작동하는 코드 예제로 몇 분 안에 Solana 데이터를 스트리밍하세요. 필요에 따라 접근 방식을 선택하세요 (가장 빠른 것부터 느린 것 순서):

| 방법                   | 최적의 용도                                           | 필요한 플랜                                       |
| -------------------- | ------------------------------------------------ | -------------------------------------------- |
| **\[미확정 거래]**        | propAMMs, 스나이퍼, 카피 트레이더, 청산 봇 — 가장 빠른 거래 신호      | Professional+                                |
| **Shred 전달**         | propAMMs, 스나이퍼, 카피 트레이더, 청산 봇, 차익 거래 — 사전 실행 데이터 | 모든 플랜 ([유료 추가 기능](/docs/ko/billing/plans#슈레드-배송)) |
| **LaserStream gRPC** | 미션 크리티컬, 백엔드 서비스                                 | 모든 플랜 (Devnet), Business+ (Mainnet)          |
| **LaserStream WSS**  | 대부분의 앱, 실시간 UI, 광범위한 호환성                         | Free+ (Helius 확장: Developer+)                |
| **Webhooks**         | 서버 알림, 이벤트 기반 앱                                  | Free+                                        |

<Tip>
  원시 쉐어가 필요하신가요? Helius
  대시보드의 [Shreds 탭](https://dashboard.helius.dev/shred-delivery-seats)에서 구독하세요.
  설정 단계는 [원시 쉐어 구독 방법](/docs/ko/shred-delivery/raw-shreds)을 참조하세요.
</Tip>

## 옵션 1: LaserStream gRPC

[24시간 이력 재생](/docs/ko/laserstream/historical-replay)과 다중 노드 장애 조치가 가능한 가장 신뢰할 수 있는 옵션입니다. 미션 크리티컬 백엔드 및 인덱서에 가장 적합합니다.

```bash theme={"system"}
npm install helius-laserstream
```

```typescript theme={"system"}
import {
  subscribe,
  CommitmentLevel,
  LaserstreamConfig,
  SubscribeRequest,
} from "helius-laserstream";

async function main() {
  const subscriptionRequest: SubscribeRequest = {
    transactions: {
      "token-filter": {
        // user-defined label for this filter
        accountInclude: ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
        accountExclude: [],
        accountRequired: [],
        vote: false,
        failed: false,
      },
    },
    commitment: CommitmentLevel.CONFIRMED,
    accounts: {},
    slots: {},
    transactionsStatus: {},
    blocks: {},
    blocksMeta: {},
    entry: {},
    accountsDataSlice: [],
  };

  const config: LaserstreamConfig = {
    apiKey: "YOUR_API_KEY",
    endpoint: "https://laserstream-mainnet-ewr.helius-rpc.com",
  };

  await subscribe(
    config,
    subscriptionRequest,
    async (data) => {
      console.log(data);
    },
    async (error) => {
      console.error(error);
    },
  );
}

main().catch(console.error);
```

<CardGroup cols={2}>
  <Card title="LaserStream 가이드" icon="book" href="/docs/ko/laserstream">
    이력 재생을 포함한 LaserStream 문서 전체
  </Card>

  <Card title="시작하기" icon="arrow-right" href="https://dashboard.helius.dev/laserstream">
    Helius 대시보드에서 LaserStream gRPC 토큰 및 엔드포인트를 받으세요
  </Card>
</CardGroup>

## 옵션 2: LaserStream WebSocket

[LaserStream WebSocket](/docs/ko/rpc/websocket)은 [표준 Solana 구독 메서드](/docs/ko/api-reference/rpc/websocket-methods)와 `transactionSubscribe` 같은 Helius 확장을 단일 통합 엔드포인트에서 제공합니다. 브라우저/UI 클라이언트와 광범위한 에코시스템 호환성에 적합합니다.

```javascript theme={"system"}
const WebSocket = require("ws");

const ws = new WebSocket("wss://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY");

ws.on("open", () => {
  console.log("WebSocket connected");

  // Helius extension: transactionSubscribe with rich filtering
  ws.send(
    JSON.stringify({
      jsonrpc: "2.0",
      id: 1,
      method: "transactionSubscribe",
      params: [
        {
          accountInclude: ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
          vote: false,
          failed: false,
        },
        {
          commitment: "confirmed",
          encoding: "jsonParsed",
          transactionDetails: "full",
        },
      ],
    }),
  );

  // Keep connection alive
  setInterval(() => ws.ping(), 30000);
});

ws.on("message", (data) => {
  const message = JSON.parse(data);
  console.log("Transaction:", message);
});
```

\*\*`YOUR_API_KEY`\*\*을 [dashboard.helius.dev](https://dashboard.helius.dev)에서 획득한 키로 교체하세요.

<Card title="LaserStream WebSocket 개요" icon="arrow-right" href="/docs/ko/rpc/websocket">
  모든 구독 메서드 (표준 Solana + Helius 확장)와 매개변수
  참조 및 예제
</Card>

## 옵션 3: Webhooks

지속적인 연결 없이 이벤트 알림이 필요한 서버 측 애플리케이션에 적합합니다.

```bash theme={"system"}
# Create a webhook
curl -X POST "https://mainnet.helius-rpc.com/v0/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "webhookURL": "https://your-server.com/webhook",
    "transactionTypes": ["Any"],
    "accountAddresses": ["YOUR_ACCOUNT_ADDRESS"],
    "webhookType": "enhanced"
  }'
```

```javascript theme={"system"}
// Handle webhook events (Express.js example)
app.post("/webhook", (req, res) => {
  req.body.forEach((event) => {
    console.log("Blockchain event:", event);
  });
  res.status(200).send("OK");
});
```

<Card title="Webhooks 가이드" icon="arrow-right" href="/docs/ko/webhooks">
  Webhook 설정 및 이벤트 처리 완벽 가이드
</Card>

## 일반적인 사용 사례

**토큰 전송 모니터링**

```javascript theme={"system"}
// Subscribe to Token Program activity
method: "programSubscribe",
params: ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", {...}]
```

**Pump.fun 거래 추적**

```javascript theme={"system"}
// Subscribe to Pump.fun program transactions
method: "transactionSubscribe",
params: [
  {
    accountInclude: ["6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"],
    vote: false,
    failed: false
  },
  { commitment: "confirmed" }
]
```

**지갑 활동 모니터링**

```javascript theme={"system"}
// Monitor specific wallet
method: "accountSubscribe",
params: ["WALLET_ADDRESS", {...}]
```

## 다음 단계

<CardGroup cols={2}>
  <Card title="스트리밍 개요" icon="play" href="/docs/ko/data-streaming">
    모든 스트리밍 옵션에 대해 배우고 각 사용 시점을 알아보세요
  </Card>

  <Card title="API 참조" icon="book" href="/docs/ko/api-reference">
    완전한 메서드 문서 및 매개변수
  </Card>
</CardGroup>

**도움이 필요하신가요?** [Discord](https://discord.com/invite/6GXdee3gBj)에 가입하거나 [지원 문서](/docs/ko/support)를 확인하세요.
