Helius dflow

From dvcrn/openclaw-skills-marketplace · View interactive version

Helius dflow is an AI agent skill from the GitHub repository dvcrn/openclaw-skills-marketplace. Build Solana trading applications combining DFlow trading APIs with Helius infrastructure. Covers spot swaps (imperative and declarative), prediction markets, real-time market streaming, Proof KYC, transaction submission via Sender, fee optimization, shred-level streaming via LaserStream, and wallet

How to use this skill

Skill file

Helius x DFlow — Build Trading Apps on Solana

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. Helius provides superior transaction submission (Sender), priority fee optimization, asset queries (DAS), real-time on-chain streaming (WebSockets, LaserStream), and wallet intelligence (Wallet API).

Prerequisites

Before doing anything, verify these:

1. Helius MCP Server

CRITICAL: Check if Helius MCP tools are available (e.g., getBalance, getAssetsByOwner, getPriorityFeeEstimate). If they are NOT available, STOP. Do NOT attempt to call Helius APIs via curl or any other workaround. Tell the user:

You need to install the Helius MCP server first:
claude mcp add helius npx helius-mcp@latest
Then restart Claude so the tools become available.

2. DFlow MCP Server (Optional but Recommended)

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:

Add the DFlow MCP server at pond.dflow.net/mcp for enhanced API tooling.

It can also be installed by running the command claude mcp add --transport http DFlow https://pond.dflow.net/mcp, or by being directly added to your project's .mcp.json:

{
  "mcpServers": {
    "DFlow": {
      "type": "http",
      "url": "https://pond.dflow.net/mcp"
    }
  }
}

3. API Keys

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

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.

Routing

Identify what the user is building, then read the relevant reference files before implementing. Always read references BEFORE writing code.

Quick Disambiguation

These intents overlap across DFlow and Helius. Route them correctly:

Spot Crypto Swaps

Read: references/dflow-spot-trading.md, references/helius-sender.md, references/helius-priority-fees.md, references/integration-patterns.md

MCP tools: Helius (getPriorityFeeEstimate, getSenderInfo, parseTransactions)

Use this when the user wants to:

Prediction Markets

Read: references/dflow-prediction-markets.md, references/dflow-proof-kyc.md, references/helius-sender.md, references/integration-patterns.md

MCP tools: Helius (getPriorityFeeEstimate, parseTransactions)

Use this when the user wants to:

Real-Time Market Data (DFlow)

Read: references/dflow-websockets.md, references/helius-laserstream.md

Use this when the user wants to:

DFlow WebSockets provide market-level data (prices, orderbooks, trades). LaserStream can supplement this with shred-level on-chain data for lower-latency use cases.

Real-Time On-Chain Monitoring (Helius)

Read: references/helius-websockets.md OR references/helius-laserstream.md

MCP tools: Helius (transactionSubscribe, accountSubscribe, getEnhancedWebSocketInfo, laserstreamSubscribe, getLaserstreamInfo, getLatencyComparison)

Use this when the user wants to:

Choosing between them:

Low-Latency Trading (LaserStream)

Read: references/helius-laserstream.md, references/integration-patterns.md

MCP tools: Helius (laserstreamSubscribe, getLaserstreamInfo)

Use this when the user wants to:

DFlow themselves use LaserStream for improved quote speeds and transaction confirmations.

Portfolio & Token Discovery

Read: references/helius-das.md, references/helius-wallet-api.md

MCP tools: Helius (getAssetsByOwner, getAsset, searchAssets, getWalletBalances, getWalletHistory, getWalletIdentity)

Use this when the user wants to:

Transaction Submission

Read: references/helius-sender.md, references/helius-priority-fees.md

MCP tools: Helius (getPriorityFeeEstimate, getSenderInfo)

Use this when the user wants to:

Account & Token Data

MCP tools: Helius (getBalance, getTokenBalances, getAccountInfo, getTokenAccounts, getProgramAccounts, getTokenHolders, getBlock, getNetworkStatus)

Use this when the user wants to:

These are straightforward data lookups. No reference file needed — just use the MCP tools directly.

Getting Started / Onboarding

Read: references/helius-onboarding.md, references/dflow-spot-trading.md

MCP tools: Helius (setHeliusApiKey, generateKeypair, checkSignupBalance, agenticSignup, getAccountStatus)

Use this when the user wants to:

Documentation & Troubleshooting

MCP tools: Helius (lookupHeliusDocs, listHeliusDocTopics, troubleshootError, getRateLimitInfo)

Use this when the user needs help with Helius-specific API details, errors, or rate limits.

For DFlow API details, use the DFlow MCP server (pond.dflow.net/mcp) or DFlow docs (pond.dflow.net/introduction).

Composing Multiple Domains

Many real tasks span multiple domains. Here's how to compose them:

"Build a swap/trading app"

  1. Read references/dflow-spot-trading.md + references/helius-sender.md + references/helius-priority-fees.md + references/integration-patterns.md
  2. Architecture: DFlow Trading API for quotes/routing, Helius Sender for submission, DAS for token lists
  3. Use Pattern 1 from integration-patterns for the swap execution flow
  4. Use Pattern 2 for building the token selector
  5. For web apps: DFlow API requires a CORS proxy — see the CORS Proxy section in integration-patterns

"Build a prediction market UI"

  1. Read references/dflow-prediction-markets.md + references/dflow-proof-kyc.md + references/dflow-websockets.md + references/helius-sender.md + references/integration-patterns.md
  2. Architecture: DFlow Metadata API for market discovery, DFlow order API for trades, Proof KYC for identity, DFlow WebSockets for live prices, Helius Sender for submission
  3. Gate KYC at trade time, not at browsing time

"Build a portfolio + trading dashboard"

  1. Read references/helius-wallet-api.md + references/helius-das.md + references/dflow-spot-trading.md + references/dflow-websockets.md + references/integration-patterns.md
  2. Architecture: Wallet API for holdings, DAS for token metadata, DFlow WebSockets for live prices, DFlow order API for trading
  3. Use Pattern 5 from integration-patterns

"Build a trading bot"

  1. Read references/dflow-spot-trading.md + references/dflow-websockets.md + references/helius-laserstream.md + references/helius-sender.md + references/integration-patterns.md
  2. Architecture: DFlow WebSockets for price signals, DFlow order API for execution, Helius Sender for submission, LaserStream for fill detection
  3. Use Pattern 6 from integration-patterns

"Build a high-frequency / latency-critical trading system"

  1. Read references/helius-laserstream.md + references/dflow-spot-trading.md + references/helius-sender.md + references/helius-priority-fees.md + references/integration-patterns.md
  2. Architecture: LaserStream for shred-level on-chain data, DFlow for execution, Helius Sender for submission
  3. Use Pattern 4 from integration-patterns
  4. Choose the closest LaserStream regional endpoint for minimal latency

Rules

Follow these rules in ALL implementations:

Transaction Sending

DFlow Trading

Data Queries

LaserStream

Links & Explorers

Code Quality

SDK Usage

Resources

Helius

DFlow

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.