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

# Khởi động nhanh với dữ liệu

> Thực hiện truy vấn dữ liệu Solana đầu tiên chỉ trong vài phút. Các ví dụ có thể sao chép và dán cho getTransactionsForAddress, getTransfersByAddress, DAS API và Wallet API.

## Thiết lập nhanh

Mỗi ví dụ dưới đây chỉ cần khóa Helius API của bạn từ [dashboard.helius.dev](https://dashboard.helius.dev). Thay thế `YOUR_API_KEY`, sau đó chọn phương thức phù hợp với dữ liệu bạn muốn truy xuất:

| Bạn muốn                                       | Sử dụng                          | Trả về                                              |
| ---------------------------------------------- | -------------------------------- | --------------------------------------------------- |
| Toàn bộ lịch sử giao dịch của một địa chỉ      | **getTransactionsForAddress**    | Các giao dịch đã giải mã của một địa chỉ            |
| Toàn bộ lịch sử chuyển tài sản của một địa chỉ | **getTransfersByAddress**        | Các lượt chuyển token và SOL gốc của một địa chỉ    |
| Token, NFT và tài sản thuộc sở hữu của một ví  | **DAS API** — `getAssetsByOwner` | Tài sản kèm siêu dữ liệu, thông tin sở hữu và số dư |
| Số dư ví kèm giá trị USD qua REST              | **Wallet API** — `/balances`     | Số dư token và NFT kèm định giá bằng USD            |

## Lựa chọn 1: Nạp bù lịch sử giao dịch (getTransactionsForAddress)

`getTransactionsForAddress` trả về toàn bộ lịch sử giao dịch đã giải mã của một địa chỉ chỉ bằng một phương thức — đây là cách nhanh nhất để nạp bù dữ liệu phục vụ việc lập chỉ mục. Truyền địa chỉ trước, sau đó truyền một đối tượng tùy chọn chứa các bộ lọc không bắt buộc.

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  const response = await fetch(`https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 1,
      method: 'getTransactionsForAddress',
      params: [
        '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
        {
          transactionDetails: 'full',
          sortOrder: 'desc',
          limit: 100,
        },
      ],
    }),
  });

  const { result } = await response.json();
  console.log(`Fetched ${result.data.length} transactions`);
  ```

  ```python Python theme={"system"}
  import requests

  url = "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY"
  payload = {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getTransactionsForAddress",
      "params": [
          "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
          {"transactionDetails": "full", "sortOrder": "desc", "limit": 100},
      ],
  }
  result = requests.post(url, json=payload).json()["result"]
  print(f"Fetched {len(result['data'])} transactions")
  ```

  ```bash cURL theme={"system"}
  curl https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getTransactionsForAddress",
      "params": [
        "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
        { "transactionDetails": "full", "sortOrder": "desc", "limit": 100 }
      ]
    }'
  ```
</CodeGroup>

<CardGroup cols={2}>
  <Card title="getTransactionsForAddress guide" icon="clock-rotate-left" href="/docs/vi/rpc/gettransactionsforaddress">
    Bộ lọc, phân trang, định dạng phản hồi và các phương pháp hay nhất.
  </Card>

  <Card title="Indexing guide" icon="layer-group" href="/docs/vi/rpc/how-to-index-solana-data">
    Xây dựng, nạp bù và duy trì chỉ mục Solana luôn cập nhật.
  </Card>
</CardGroup>

## Lựa chọn 2: Lấy lịch sử chuyển tài sản (getTransfersByAddress)

`getTransfersByAddress` trả về lịch sử chuyển token và SOL gốc đã được phân tích cú pháp cho một địa chỉ — ở cấp độ lượt chuyển thay vì cấp độ giao dịch, sẵn sàng để đối soát. Truyền địa chỉ và thêm một đối tượng tùy chọn để áp dụng bộ lọc.

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  const response = await fetch(`https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 1,
      method: 'getTransfersByAddress',
      params: ['86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY'],
    }),
  });

  const { result } = await response.json();
  console.log(`Fetched ${result.data.length} transfers`);
  ```

  ```python Python theme={"system"}
  import requests

  url = "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY"
  payload = {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getTransfersByAddress",
      "params": ["86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"],
  }
  result = requests.post(url, json=payload).json()["result"]
  print(f"Fetched {len(result['data'])} transfers")
  ```

  ```bash cURL theme={"system"}
  curl https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getTransfersByAddress",
      "params": ["86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"]
    }'
  ```
</CodeGroup>

<CardGroup cols={2}>
  <Card title="getTransfersByAddress guide" icon="arrow-right-arrow-left" href="/docs/vi/rpc/gettransfersbyaddress">
    Các loại lượt chuyển, bộ lọc, đối soát và định dạng phản hồi.
  </Card>

  <Card title="getTransfersByAddress reference" icon="code" href="/docs/vi/api-reference/rpc/http/gettransfersbyaddress">
    Đầy đủ tham số và lược đồ phản hồi.
  </Card>
</CardGroup>

## Lựa chọn 3: Lấy tài sản của ví (DAS API)

DAS API trả về NFT, token có thể thay thế và tài sản nén thuộc sở hữu của một ví chỉ trong một lệnh gọi — đây là điểm khởi đầu phổ biến nhất cho ví, chế độ xem danh mục đầu tư và hoạt động phân tích.

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  const response = await fetch(`https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: '1',
      method: 'getAssetsByOwner',
      params: {
        ownerAddress: '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
        page: 1,
        limit: 1000,
        options: {
          showFungible: true,
          showNativeBalance: true,
        },
      },
    }),
  });

  const { result } = await response.json();
  console.log(`Found ${result.total} assets`);
  ```

  ```python Python theme={"system"}
  import requests

  url = "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY"
  payload = {
      "jsonrpc": "2.0",
      "id": "1",
      "method": "getAssetsByOwner",
      "params": {
          "ownerAddress": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
          "page": 1,
          "limit": 1000,
          "options": {
              "showFungible": True,
              "showNativeBalance": True,
          },
      },
  }
  result = requests.post(url, json=payload).json()["result"]
  print(f"Found {result['total']} assets")
  ```

  ```bash cURL theme={"system"}
  curl https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": "1",
      "method": "getAssetsByOwner",
      "params": {
        "ownerAddress": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
        "page": 1,
        "limit": 1000,
        "options": {
          "showFungible": true,
          "showNativeBalance": true
        }
      }
    }'
  ```
</CodeGroup>

<CardGroup cols={2}>
  <Card title="DAS API overview" icon="gem" href="/docs/vi/das-api">
    Tất cả phương thức tài sản, các loại tài sản đặc biệt và các phương pháp hay nhất.
  </Card>

  <Card title="getAssetsByOwner reference" icon="code" href="/docs/vi/api-reference/das/getassetsbyowner">
    Đầy đủ tham số và lược đồ phản hồi.
  </Card>
</CardGroup>

## Lựa chọn 4: Lấy số dư ví qua REST (Wallet API)

[Wallet API](/docs/vi/wallet-api/overview) là một REST API cấp cao. Điểm cuối số dư trả về lượng token và NFT mà ví đang nắm giữ cùng giá trị bằng USD — không cần lớp bao JSON-RPC.

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  const address = '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY';
  const response = await fetch(
    `https://api.helius.xyz/v1/wallet/${address}/balances?api-key=YOUR_API_KEY`,
  );

  const data = await response.json();
  console.log(`Current page value: $${data.totalUsdValue}`);
  ```

  ```python Python theme={"system"}
  import requests

  address = "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"
  url = f"https://api.helius.xyz/v1/wallet/{address}/balances"
  data = requests.get(url, headers={"X-Api-Key": "YOUR_API_KEY"}).json()
  print(f"Current page value: ${data['totalUsdValue']}")
  ```

  ```bash cURL theme={"system"}
  curl "https://api.helius.xyz/v1/wallet/86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY/balances?api-key=YOUR_API_KEY"
  ```
</CodeGroup>

<CardGroup cols={2}>
  <Card title="Wallet API overview" icon="wallet" href="/docs/vi/wallet-api/overview">
    Tất cả điểm cuối ví, phương thức xác thực và đơn vị.
  </Card>

  <Card title="Wallet Balances reference" icon="code" href="/docs/vi/api-reference/wallet-api/balances">
    Các tham số truy vấn và lược đồ phản hồi đầy đủ.
  </Card>
</CardGroup>

## Các bước tiếp theo

<CardGroup cols={2}>
  <Card title="Getting Data overview" icon="database" href="/docs/vi/getting-data">
    So sánh tất cả API dữ liệu và chọn API phù hợp với trường hợp sử dụng của bạn.
  </Card>

  <Card title="API Reference" icon="code" href="/docs/vi/api-reference">
    Tài liệu đầy đủ về các phương thức và điểm cuối.
  </Card>
</CardGroup>

**Bạn cần trợ giúp?** Tham gia [Discord](https://discord.com/invite/6GXdee3gBj) của chúng tôi hoặc xem [tài liệu hỗ trợ](/docs/vi/support).
