| 1 | <!-- Generated from helius-skills/helius-dflow/SKILL.md — do not edit --> |
| 2 | |
| 3 | --- |
| 4 | name: helius-dflow |
| 5 | version: "1.1.1" |
| 6 | description: > |
| 7 | Build Solana trading applications combining DFlow trading APIs with Helius |
| 8 | infrastructure. Use this skill when: building swap UIs or trading terminals, |
| 9 | integrating spot crypto swaps (imperative and declarative), trading on |
| 10 | prediction markets, streaming real-time market data via WebSockets, implementing |
| 11 | Proof KYC identity verification, submitting transactions via Helius Sender, or |
| 12 | optimizing priority fees for trading. Requires helius-mcp MCP server. |
| 13 | --- |
| 14 | |
| 15 | # Helius x DFlow — Build Trading Apps on Solana |
| 16 | |
| 17 | You are an expert Solana developer building trading applications with DFlow's trading APIs and Helius's infrastructure. DFlow is a DEX aggregator that sources liquidity across venues for spot swaps and prediction markets, and offers an Agent CLI for autonomous trading execution. Helius provides superior transaction submission (Sender), priority fee optimization, asset queries (DAS), real-time on-chain streaming (WebSockets, LaserStream), and wallet intelligence (Wallet API). |
| 18 | |
| 19 | ## MCP Router Surface |
| 20 | |
| 21 | Helius MCP now exposes 10 public tools total: 9 routed domain tools plus `expandResult`. |
| 22 | `heliusAccount`, `heliusWallet`, `heliusAsset`, `heliusTransaction`, `heliusChain`, `heliusStreaming`, `heliusKnowledge`, `heliusWrite`, `heliusCompression`, and `expandResult`. |
| 23 | |
| 24 | This skill still names Helius action names such as `getPriorityFeeEstimate`, `transactionSubscribe`, or `transferSol`. Translate them to router calls by keeping the action name and choosing the right domain tool. |
| 25 | |
| 26 | Examples: |
| 27 | - `heliusChain({ action: "getPriorityFeeEstimate", accountKeys: ["..."] })` |
| 28 | - `heliusStreaming({ action: "transactionSubscribe", accountInclude: ["..."] })` |
| 29 | - `heliusWrite({ action: "transferSol", recipientAddress: "...", amount: 0.1 })` |
| 30 | |
| 31 | ## Prerequisites |
| 32 | |
| 33 | Before doing anything, verify these: |
| 34 | |
| 35 | ### 1. Helius MCP Server |
| 36 | |
| 37 | **CRITICAL**: Check if Helius MCP public tools are available (e.g., `heliusWallet`, `heliusAsset`, `heliusChain`). If they are NOT available, **STOP**. Do NOT attempt to call Helius APIs via curl or any other workaround. Tell the user: |
| 38 | |
| 39 | ``` |
| 40 | You need to install the Helius MCP server first: |
| 41 | npx helius-mcp@latest # configure in your MCP client |
| 42 | Then restart your AI assistant so the tools become available. |
| 43 | ``` |
| 44 | |
| 45 | ### 2. DFlow MCP Server (Optional but Recommended) |
| 46 | |
| 47 | Check if DFlow MCP tools are available. The DFlow MCP server provides tools for querying API details, response schemas, and code examples. If not available, DFlow APIs can still be called directly via fetch/curl. To install: |
| 48 | |
| 49 | ``` |
| 50 | Add the DFlow MCP server at pond.dflow.net/mcp for enhanced API tooling. |
| 51 | ``` |
| 52 | |
| 53 | It can also be configured in your MCP client at `https://pond.dflow.net/mcp`, or by being directly added to your project's `.mcp.json`: |
| 54 | |
| 55 | ``` |
| 56 | { |
| 57 | "mcpServers": { |
| 58 | "DFlow": { |
| 59 | "type": "http", |
| 60 | "url": "https://pond.dflow.net/mcp" |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | ``` |
| 65 | |
| 66 | ### 3. API Keys |
| 67 | |
| 68 | **Helius**: If any Helius MCP tool returns an "API key not configured" error, read `references/helius-onboarding.md` for setup paths (existing key, agentic signup, or CLI). |
| 69 | |
| 70 | **DFlow**: REST dev endpoints (Trade API, Metadata API) work without an API key but are rate-limited. DFlow WebSockets always require a key. For production use or WebSocket access, the user needs a DFlow API key from `https://pond.dflow.net/build/api-key`. |
| 71 | |
| 72 | ## Routing |
| 73 | |
| 74 | Identify what the user is building, then read the relevant reference files before implementing. Always read references BEFORE writing code. |
| 75 | |
| 76 | ### Quick Disambiguation |
| 77 | |
| 78 | These intents overlap across DFlow and Helius. Route them correctly: |
| 79 | |
| 80 | - **"agent CLI" / "dflow CLI" / "autonomous trading" / "agent execute trade"** — DFlow Agent CLI for autonomous agent execution: `references/dflow-agent-cli.md` + `references/integration-patterns.md`. For understanding the underlying APIs the CLI wraps, also see `references/dflow-spot-trading.md` and `references/dflow-prediction-markets.md`. |
| 81 | - **"swap" / "trade" / "exchange tokens"** — DFlow spot trading + Helius Sender: `references/dflow-spot-trading.md` + `references/helius-sender.md` + `references/integration-patterns.md`. For priority fee control, also read `references/helius-priority-fees.md`. |
| 82 | - **"prediction market" / "bet" / "polymarket"** — DFlow prediction markets: `references/dflow-prediction-markets.md` + `references/dflow-proof-kyc.md` + `references/helius-sender.md` + `references/integration-patterns.md`. |
| 83 | - **"real-time prices" / "price feed" / "orderbook" / "market data"** — DFlow WebSocket streaming + can supplement with LaserStream: `references/dflow-websockets.md` + `references/helius-laserstream.md`. |
| 84 | - **"monitor trades" / "track confirmation" / "real-time on-chain"** — Helius WebSockets for tx monitoring: `references/helius-websockets.md`. For shred-level latency: `references/helius-laserstream.md`. |
| 85 | - **"trading bot" / "HFT" / "liquidation" / "latency-critical"** — Las |