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

# DFlow取引スキル

> DFlow取引APIをHeliusインフラと組み合わせて、スポットスワップ、予測市場、リアルタイム市場ストリーミング、Proof KYC、トランザクション提出をカバーします。

**DFlow**スキルにより、AIアシスタントがSolanaの取引アプリケーションを構築するエキスパートになります。[DFlow's](https://pond.dflow.net)の取引APIを使用し、スポットスワップ、予測市場、リアルタイムストリーミング、Proof KYCを提供します。また、Heliusインフラを活用して、トランザクションの提出や手数料の最適化、アセットクエリ、オンチェーンモニタリングを実現します。

<Info>
  **Claude Code:** `/helius:dflow`（[plugin](/ja/agents/claude-code-plugin)経由）または自動呼び出し（スタンドアロン）。**Codex:** `$helius-dflow`（`.agents/skills/`から自動検出）。**API / Cursor / ChatGPT:** プリビルドの[システムプロンプトバリアント](/ja/agents/skills/overview#using-skills-across-platforms)を使用します。
</Info>

## カバーする内容

DFlowスキルは、DFlowおよびHeliusツールを使用してAIをルーティングします。

| ドメイン             | 使用API                             | MCPツール                                                                    |
| ---------------- | --------------------------------- | ------------------------------------------------------------------------- |
| **スポットスワップ**     | DFlow Trading API + Helius Sender | `getPriorityFeeEstimate`, `getSenderInfo`, `transferSol`, `transferToken` |
| **予測市場**         | DFlow Order API + Proof KYC       | `getPriorityFeeEstimate`, `parseTransactions`                             |
| **リアルタイム市場データ**  | DFlow WebSockets                  | DFlow MCPツール                                                              |
| **オンチェーンモニタリング** | Enhanced WebSockets, LaserStream  | `transactionSubscribe`, `accountSubscribe`, `laserstreamSubscribe`        |
| **ポートフォリオと発見**   | DAS API, Wallet API               | `getAssetsByOwner`, `getWalletBalances`, `getWalletHistory`               |
| **トランザクションの提出**  | Helius Sender                     | `getPriorityFeeEstimate`, `getSenderInfo`                                 |
| **KYC認証**        | DFlow Proof                       | DFlow MCPツール                                                              |

## 前提条件

このスキルには2つのMCPサーバーが必要です。

### Helius MCPサーバー（必須）

[Helius MCPサーバー](/ja/agents/mcp)は、トランザクション提出、アセットクエリ、オンチェーンストリーミングのためのブロックチェーンツールを提供します。

```bash theme={"system"}
claude mcp add helius npx helius-mcp@latest
```

### DFlow MCPサーバー（推奨）

DFlow MCPサーバーは、API詳細、レスポンススキーマ、コード例に関するツールを提供します。MCPがインストールされていない場合でも、fetchを使用してDFlow APIを直接呼び出すことができます。

```bash theme={"system"}
claude mcp add --transport http DFlow https://pond.dflow.net/mcp
```

<Note>
  [Claude Code plugin](/ja/agents/claude-code-plugin)を介してインストールすると、両方のMCPサーバーが自動的に起動します。
</Note>

## スタンドアロンインストール

<Steps>
  <Step title="リポジトリをクローン">
    ```bash theme={"system"}
    git clone https://github.com/helius-labs/core-ai.git
    cd core-ai/helius-skills/helius-dflow
    ```
  </Step>

  <Step title="インストールスクリプトを実行">
    ```bash theme={"system"}
    ./install.sh
    ```

    `~/.claude/skills/helius-dflow/`にインストールされます。

    **オプション：**

    * `./install.sh --project` — 現在のプロジェクトにインストール
    * `./install.sh --path /custom/path` — カスタムディレクトリにインストール
  </Step>

  <Step title="MCPサーバーをインストール">
    ```bash theme={"system"}
    claude mcp add helius npx helius-mcp@latest
    claude mcp add --transport http DFlow https://pond.dflow.net/mcp
    ```
  </Step>

  <Step title="APIキーを設定">
    **Helius:**

    ```bash theme={"system"}
    export HELIUS_API_KEY=YOUR_API_KEY
    ```

    **DFlow:** RESTの開発エンドポイントはAPIキーなしで動作します（レート制限あり）。WebSocketsおよび本番用途には、[pond.dflow.net/build/api-key](https://pond.dflow.net/build/api-key)から取得したキーが必要です。
  </Step>
</Steps>

## プロンプトの例

インストール後、シンプルな英語で質問できます：

* "DFlowとHelius Senderを使用してスワップインターフェースを構築する"
* "予測市場取引UIを作成する"
* "この予測市場のリアルタイム価格をストリームする"
* "ミームコインを取引するトレーディングボットを構築する"
* "予測市場用のProof KYCの統合方法を教えてください"
* "ライブトークン価格を含むポートフォリオダッシュボードを構築する"

## コンポジットワークフロー

DFlowスキルは複数のAPIにまたがるタスクに優れています。AIが自動的に処理する一般的なパターンをご紹介します。

### スワップ／取引アプリ

DFlow Trading APIで見積もりとルーティングを行い、Helius Senderでトランザクションを提出し、DAS APIでトークンリストを取得し、Priority Fee APIで最適な手数料を設定します。

### 予測市場UI

DFlow Metadata APIで市場を発見し、DFlow Order APIで取引を行い、Proof KYCで本人確認を行い、DFlow WebSocketsでライブ価格を提供し、Helius Senderで提出します。

### トレーディングボット

DFlow WebSocketsで価格シグナルを取得し、DFlow Order APIで実行し、Helius Senderで提出し、LaserStreamでシュレッドレベルのレイテンシーでフィル検出を行います。

### ポートフォリオ＋取引ダッシュボード

Wallet APIで保有を確認し、DAS APIでトークンメタデータを取得し、DFlow WebSocketsでライブ価格を提供し、DFlow Order APIで取引を行います。

## 含まれるもの

* **`SKILL.md`** — ルーティングロジック、ルール、および取引アプリケーションのための専門家コンテキスト
* **`prompts/`** — プリビルドのシステムプロンプトバリアント（`openai.developer.md`, `claude.system.md`, `full.md`）— [プラットフォームセットアップ](/ja/agents/skills/overview#using-skills-across-platforms)を参照
* **`references/`** — 深いドキュメントファイル：
  * `dflow-spot-trading.md` — 命令型および宣言型スワップフロー
  * `dflow-prediction-markets.md` — 予測市場注文ライフサイクル
  * `dflow-websockets.md` — リアルタイムストリーミング（価格、オーダーブック、取引）
  * `dflow-proof-kyc.md` — 予測市場向けの本人確認
  * `integration-patterns.md` — コンポジットパターン（スワップ実行、トークンセレクター、CORSプロキシ、ボット）
  * `helius-sender.md` — Helius Senderによるトランザクション提出
  * `helius-priority-fees.md` — 手数料推定戦略
  * `helius-das.md` — デジタルアセット標準API
  * `helius-laserstream.md` — gRPCストリーミング
  * `helius-wallet-api.md` — ウォレット分析とアイデンティティ
  * `helius-websockets.md` — WebSocketサブスクリプション
  * `helius-onboarding.md` — アカウント設定とサインアップフロー

## 詳細を学ぶ

<CardGroup cols={2}>
  <Card title="スキルの構築" icon="hammer" href="/ja/agents/skills/build">
    一般的なSolana開発のためのCore Heliusスキル
  </Card>

  <Card title="DFlowドキュメント" icon="book" href="https://pond.dflow.net/introduction">
    公式DFlow APIドキュメント
  </Card>

  <Card title="DFlow Cookbook" icon="code" href="https://github.com/DFlowProtocol/cookbook">
    DFlow統合のためのコード例
  </Card>

  <Card title="GitHub" icon="github" href="https://github.com/helius-labs/core-ai">
    ソースコードと問題追跡
  </Card>
</CardGroup>
