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

# Helius レート制限

> すべてのプランと製品における Helius レート制限の完全ガイド。

## レート制限とは？

レート制限は、1秒あたりに行えるリクエストの数を制御します。レート制限を超えると、HTTP 429 応答を受け取ります。429 やその他の一時的な失敗が発生した場合の対応方法については、以下の [再試行とエラー処理](#retries-and-error-handling) を参照してください。

## 標準レート制限

プランには、RPC リクエスト用と DAS API リクエスト用の2つの標準レート制限グループがあります。各 Helius プランの基本レート制限は次のとおりです：

<table>
  <thead align="left">
    <tr>
      <th width="200">プラン</th>
      <th width="260">RPC レート制限</th>
      <th width="260">DAS & Enhanced APIs</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><strong>Free</strong></td>
      <td>10 requests/s</td>
      <td>2 requests/s</td>
    </tr>

    <tr>
      <td><strong>Developer</strong></td>
      <td>50 requests/s</td>
      <td>10 requests/s</td>
    </tr>

    <tr>
      <td><strong>Business</strong></td>
      <td>200 requests/s</td>
      <td>50 requests/s</td>
    </tr>

    <tr>
      <td><strong>Professional</strong></td>
      <td>500 requests/s</td>
      <td>100 requests/s</td>
    </tr>

    <tr>
      <td><strong>Enterprise</strong></td>
      <td>Custom</td>
      <td>Custom</td>
    </tr>
  </tbody>
</table>

### レート制限の増加

Professional プランのチームは、\$100/月で追加の100 RPS を購入できます。

カスタムレート制限が必要な場合は、[営業チームにお問い合わせください](https://www.helius.dev/contact)。Developer または Business ティアの場合、プランをアップグレードしてレート制限を増やしてください。

## 特別レート制限

一部のエンドポイントおよび特殊な Helius 製品には、計算要件のため特別なレート制限があります。

### 取引の送信

<table>
  <thead align="left">
    <tr>
      <th width="200">エンドポイント</th>
      <th width="100">Free</th>
      <th width="100">Developer</th>
      <th width="100">Business</th>
      <th width="100">Professional</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>Sender</code></td>
      <td>50/sec</td>
      <td>50/sec</td>
      <td>50/sec</td>
      <td>50/sec</td>
    </tr>

    <tr>
      <td><code>sendTransaction</code></td>
      <td>1/sec</td>
      <td>5/sec</td>
      <td>50/sec</td>
      <td>100/sec</td>
    </tr>

    <tr>
      <td><code>sendBundle</code></td>
      <td>—</td>
      <td>—</td>
      <td>5/sec</td>
      <td>5/sec</td>
    </tr>

    <tr>
      <td><code>simulateBundle</code></td>
      <td>10/sec</td>
      <td>50/sec</td>
      <td>200/sec</td>
      <td>500/sec</td>
    </tr>
  </tbody>
</table>

Professional プランでレート制限を増やす必要がある場合は、[営業チームにお問い合わせください](https://www.helius.dev/contact)。

Professional プランのユーザーは、高スループットのトレーディングアプリをサポートするために、Sender のレートリミット増加やカスタムチップの手配を[リクエスト](https://www.helius.dev/contact)することもできます。

### 複雑な RPC コール

<table>
  <thead align="left">
    <tr>
      <th width="200">エンドポイント</th>
      <th width="100">Free</th>
      <th width="100">Developer</th>
      <th width="100">Business</th>
      <th width="100">Professional</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>getProgramAccounts</code></td>
      <td>5/sec</td>
      <td>25/sec</td>
      <td>50/sec</td>
      <td>75/sec</td>
    </tr>
  </tbody>
</table>

### 履歴データ

履歴データメソッドのバッチリクエストを行う場合、次の制限が適用されます：

<table>
  <thead align="left">
    <tr>
      <th style={{width: '300px'}}>メソッド</th>
      <th style={{width: '300px'}}>最大バッチサイズ</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>getTransaction</code></td>
      <td>100 items per request</td>
    </tr>

    <tr>
      <td><code>getTransactionsForAddress</code></td>
      <td>バッチリクエスト不可</td>
    </tr>

    <tr>
      <td><code>getTransfersByAddress</code></td>
      <td>バッチリクエスト不可</td>
    </tr>

    <tr>
      <td>他のすべての履歴メソッド</td>
      <td>10 items per request</td>
    </tr>
  </tbody>
</table>

<Warning>
  バッチ制限を超えるとエラー応答が発生します。`getTransactionsForAddress` および `getTransfersByAddress` については、各アドレスを個別のリクエストで照会する必要があります。
</Warning>

### LaserStream

<table>
  <thead align="left">
    <tr>
      <th width="200">リソース</th>
      <th width="50">Free</th>
      <th width="100">Developer</th>
      <th width="100">Business</th>
      <th width="150">Professional</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>ネットワーク</td>
      <td>—</td>
      <td>Devnet</td>
      <td>Devnet, Mainnet</td>
      <td>Devnet, Mainnet</td>
    </tr>

    <tr>
      <td>最大パブキー</td>
      <td>—</td>
      <td>10M</td>
      <td>10M</td>
      <td>10M</td>
    </tr>

    <tr>
      <td>アクティブ接続</td>
      <td>—</td>
      <td>—</td>
      <td>10</td>
      <td>100</td>
    </tr>
  </tbody>
</table>

### Wallet API

[Wallet API](/ja/api-reference/wallet-api) は、DAS & Enhanced APIs と同じレート制限に従います。すべてのエンドポイントはこれらの制限を共有します：

<table>
  <thead align="left">
    <tr>
      <th width="200">エンドポイント</th>
      <th width="100">Free</th>
      <th width="100">Developer</th>
      <th width="100">Business</th>
      <th width="100">Professional</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>すべてのWallet APIエンドポイント</td>
      <td>2/sec</td>
      <td>10/sec</td>
      <td>50/sec</td>
      <td>100/sec</td>
    </tr>
  </tbody>
</table>

これには、アイデンティティの検索、残高、履歴、転送、および資金源のエンドポイントが含まれます。当社の [Wallet API ドキュメント](/ja/wallet-api/overview) で詳細をご覧ください。

### LaserStream WebSocket

<table>
  <thead align="left">
    <tr>
      <th width="200">リソース</th>
      <th width="100">Free</th>
      <th width="100">Developer</th>
      <th width="100">Business</th>
      <th width="100">Professional</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>同時接続</td>
      <td>5</td>
      <td>150</td>
      <td>250</td>
      <td>1,000</td>
    </tr>

    <tr>
      <td>接続ごとのサブスクリプション</td>
      <td>1,000</td>
      <td>1,000</td>
      <td>1,000</td>
      <td>1,000</td>
    </tr>

    <tr>
      <td>WebSocket タイプ</td>
      <td>標準</td>
      <td>標準, 拡張</td>
      <td>標準, 拡張</td>
      <td>標準, 拡張</td>
    </tr>
  </tbody>
</table>

### Webhooks

<table>
  <thead align="left">
    <tr>
      <th width="200">リソース</th>
      <th width="100">Free</th>
      <th width="100">Developer</th>
      <th width="100">Business</th>
      <th width="100">Professional</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>最大 Webhooks</td>
      <td>5</td>
      <td>50</td>
      <td>50</td>
      <td>50</td>
    </tr>

    <tr>
      <td>Webhook ごとのアドレス</td>
      <td>100k</td>
      <td>100k</td>
      <td>100k</td>
      <td>100k</td>
    </tr>
  </tbody>
</table>

### ZK Compression

<table>
  <thead align="left">
    <tr>
      <th width="200">サービス</th>
      <th width="100">Free</th>
      <th width="100">Developer</th>
      <th width="100">Business</th>
      <th width="100">Professional</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Photon APIs</td>
      <td>2/sec</td>
      <td>10/sec</td>
      <td>50/sec</td>
      <td>100/sec</td>
    </tr>

    <tr>
      <td><code>getValidityProof</code></td>
      <td>1/sec</td>
      <td>5/sec</td>
      <td>10/sec</td>
      <td>20/sec</td>
    </tr>
  </tbody>
</table>

## 再試行とエラー処理

アプリケーションが `429 Too Many Requests`、`503 Service Unavailable` または一時的な `5xx` 応答を受け取った場合、少し待って再試行してください — 即座には再試行しないでください。即時の再試行はリクエストを積み重ね、レート制限の回復を遅らせます。

### 推奨戦略

* 最初の再試行まで約 **1秒** 待ちます。
* 再試行するたびに待ち時間を **2倍** にし、最大で **30秒** までとします。
* 複数のアプリケーションが同時に再試行しないように各待ち時間に **±25%** の小さなランダムな変動を追加します。
* **5回** 試行後に諦め、呼び出し元にエラーを返します。

### 再試行すべきエラー

| ステータス                   | 再試行? | 理由                           |
| ----------------------- | ---- | ---------------------------- |
| `400`、`401`、`403`、`404` | No   | クライアントエラー — 再試行しても結果は変わりません。 |
| `408`                   | Yes  | リクエストタイムアウト。                 |
| `409`                   | No   | コンフリクト — 呼び出し元で解決してください。     |
| `422`                   | No   | バリデーションエラー。                  |
| `429`                   | Yes  | レート制限を超過 — 待ち再試行してください。      |
| `500`、`502`             | Yes  | 一時的なサーバーエラー。                 |
| `503`                   | Yes  | サービス利用不可 — 待ち再試行してください。      |
| `504`                   | Yes  | ゲートウェイタイムアウト。                |
| ネットワークエラー               | Yes  | 接続リセット、DNS障害、またはソケットタイムアウト。  |

### 例

<CodeGroup>
  ```ts TypeScript theme={"system"}
  const RETRYABLE = new Set([408, 429, 500, 502, 503, 504]);

  export async function callWithRetry<T>(
    request: () => Promise<Response>,
    maxAttempts = 5,
  ): Promise<T> {
    let delay = 1000;
    for (let attempt = 1; attempt <= maxAttempts; attempt++) {
      const res = await request();
      if (res.ok) return (await res.json()) as T;

      if (!RETRYABLE.has(res.status) || attempt === maxAttempts) {
        throw new Error(`${res.status} after ${attempt} attempt(s): ${await res.text()}`);
      }

      const jitterMs = delay * (0.75 + Math.random() * 0.5);
      await new Promise((r) => setTimeout(r, jitterMs));
      delay = Math.min(delay * 2, 30_000);
    }
    throw new Error("unreachable");
  }
  ```

  ```python Python theme={"system"}
  import random
  import time

  RETRYABLE = {408, 429, 500, 502, 503, 504}

  def call_with_retry(request, max_attempts: int = 5):
      delay = 1.0
      for attempt in range(1, max_attempts + 1):
          response = request()
          if response.ok:
              return response.json()

          if response.status_code not in RETRYABLE or attempt == max_attempts:
              response.raise_for_status()

          time.sleep(delay * random.uniform(0.75, 1.25))
          delay = min(delay * 2, 30.0)
  ```

  ```bash Shell theme={"system"}
  call_with_retry() {
    local attempt=1 delay=1 body status
    while [ "$attempt" -le 5 ]; do
      response=$(curl -sS -w "\n%{http_code}" "$@")
      body=$(printf '%s\n' "$response" | sed '$d')
      status=$(printf '%s\n' "$response" | tail -n1)
      case "$status" in
        2*) printf '%s\n' "$body"; return 0 ;;
        408|429|500|502|503|504) ;;  # fall through and retry
        *) printf '%s\n' "$body" >&2; return 1 ;;
      esac
      # ~delay seconds with 25% jitter
      sleep "$(awk -v d="$delay" 'BEGIN { srand(); print d * (0.75 + rand() * 0.5) }')"
      delay=$(( delay * 2 > 30 ? 30 : delay * 2 ))
      attempt=$(( attempt + 1 ))
    done
    return 1
  }
  ```
</CodeGroup>

### エラー応答形式

すべての Helius API は、エラー時に構造化された JSON 本文を返します。JSON-RPC エンドポイント（Solana RPC、DAS、Sender、Priority Fee、ZK Compression）は、標準的な JSON-RPC 2.0 エンベロープを返します：

```json theme={"system"}
{
  "jsonrpc": "2.0",
  "error": { "code": -32005, "message": "Too many requests" },
  "id": "1"
}
```

REST エンドポイント（Wallet API、Admin API）は次のように返します：

CODE\_PLACEHOLDER\_8060fb8e9e559c\_END

[共通エラーコード](/ja/api-reference/common-error-codes)で、完全なエラーコードのリストと各コードの意味を確認してください。
