dflow
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 intelligence.
What this skill does
# Helius x DFlow — Build Trading Apps on Solana > Helius MCP now uses 10 public tools total, including `expandResult`. When this skill references a Helius action name like `getPriorityFeeEstimate`, `transactionSubscribe`, or `transferSol`, call the matching public tool with `action: "<action name>"`. 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 The Helius MCP server should start automatically with this plugin. Check that 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: ``` The Helius MCP server isn't running. Try restarting Cursor. If the problem persists, add it manually via Settings > Cursor Settings > MCP with command: npx helius-mcp@latest ``` ### 2. DFlow MCP Server (Optional but Recommended) The DFlow MCP server should start automatically with this plugin. 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. If DFlow MCP tools are not available, tell the user: ``` The DFlow MCP server isn't running. Try restarting Cursor. If the problem persists, add it manually via Settings > Cursor Settings > MCP with URL: https://pond.dflow.net/mcp (HTTP type) ``` ### 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: - **"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`. - **"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`. - **"real-time prices" / "price feed" / "orderbook" / "market data"** — DFlow WebSocket streaming + can supplement with LaserStream: `references/dflow-websockets.md` + `references/helius-laserstream.md`. - **"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`. - **"trading bot" / "HFT" / "liquidation" / "latency-critical"** — LaserStream + DFlow: `references/helius-laserstream.md` + `references/dflow-spot-trading.md` + `references/helius-sender.md` + `references/integration-patterns.md`. - **"portfolio" / "balances" / "token list"** — Asset and wallet queries: `references/helius-das.md` + `references/helius-wallet-api.md`. - **"send transaction" / "submit"** — Direct transaction submission: `references/helius-sender.md` + `references/helius-priority-fees.md`. - **"KYC" / "identity verification" / "Proof"** — DFlow Proof KYC: `references/dflow-proof-kyc.md`. - **"onboarding" / "API key" / "setup"** — Account setup: `references/helius-onboarding.md` + `references/dflow-spot-trading.md`. ### 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: - Swap tokens on Solana (SOL, USDC, any SPL token) - Build a swap UI or trading terminal - Integrate imperative or declarative trades - Execute trades with optimal landing rates ### 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: - Trade on prediction markets (buy/sell YES/NO outcomes) - Discover and browse prediction markets - Build a prediction market trading UI - Redeem settled positions - Integrate KYC verification for prediction market access ### Real-Time Market Data (DFlow) **Read**: `references/dflow-websockets.md`, `references/helius-laserstream.md` Use this when the user wants to: - Stream real-time prediction market prices - Display live orderbook data - Build a live trade feed - Monitor market activity 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: - Monitor transaction confirmations after trades - Track wallet activity in real time - Build live dashboards of on-chain activity - Stream account changes **Choosing between them**: - Enhanced WebSockets: simpler setup, WebSocket protocol, good for most real-time needs (Business+ plan) - LaserStream gRPC: lowest latency (shred-level), historical replay, 40x faster than JS Yellowstone clients, best for trading bots and HFT (Professional plan) - Use `getLatencyComparison` MCP tool to show the user the tradeoffs ### 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: - Build a high-frequency trading system - Detect trading opportunities at shred-level latency - Run a liquidation engine - Build a DEX aggregator with the freshest on-chain data - Monitor order fills at the lowest possible latency 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: - Build token lists for a swap UI (user's holdings as "From" tokens) - Get wallet portfolio breakdowns - Query token metadata, prices, or ownership - Analyze wallet activity and fund flows ### Transaction Submission **Read**: `references/helius-sender.md`, `references/helius-priority-fees.md` **MCP tools**: Helius (`getPriorityFeeEstimate`, `getSenderInfo`) Use this when the user wants to: - Submit raw transactions with optimal landing rates - Understand Sender endpoints and requirements - Optimize priority fees for any transaction ### Account & Token Data **MCP tools**: Helius (`getBalance`, `getTokenBalances`, `getAccountInfo`, `getTokenAccounts`, `getProgramAccounts`, `getTokenHolders`, `getBlock`, `getNetwor
Related in Web3
xaut-trade
IncludedBuy or sell XAUT (Tether Gold) on Ethereum. Supports market orders (Uniswap V3) and limit orders (UniswapX). Wallet modes: Foundry keystore or WDK. Delegates non-XAUT intents to registered skills (e.g. Polymarket prediction markets, Hyperliquid trading). Triggers: buy XAUT, XAUT trade, swap USDT for XAUT, sell XAUT, swap XAUT for USDT, limit order, limit buy XAUT, limit sell XAUT, check limit order, cancel limit order, XAUT when, create wallet, setup wallet, polymarket, prediction market, bet on, odds on, hyperliquid, perp, perpetual, long, short, open long, open short, close position, leverage.
qfc-openclaw-skill
IncludedQFC blockchain interaction — wallet, faucet, chain queries, staking, epoch & finality, AI inference
gate-dex-trade
IncludedExecutes on-chain token swaps via Gate DEX. Use when user wants to swap, buy, sell, exchange, or convert tokens, or bridge cross-chain. Covers full swap flow: price quotes, transaction build, signing, and submission. Do NOT use for read-only data lookups or wallet account management.
hunch
IncludedDiscover, bet on, track, and settle Hunch prediction markets in natural language. Trigger when a user wants to bet, take a position, or get odds on a crypto outcome — token market-cap milestones and flips, launchpad races (Bankr vs pump.fun volume / #1-days / launches over a cap), token head-to-head outperformance, mcap strike-ladders, and up/down price rounds. Also trigger on "what can I bet on about $TOKEN", "odds on …", "take YES/NO on …", "show my Hunch bets", "did my market resolve". Settles in USDC on Base via x402 (≤ $10 / bet); every bet returns an on-chain proof.
opensea
IncludedQuery NFT data, trade on the Seaport marketplace, and swap ERC20 tokens across Ethereum, Base, Arbitrum, Optimism, Polygon, and more.
polymarket
IncludedTrade on Polymarket prediction markets (CLOB V2) from a Privy EOA wallet. Search markets, place/cancel orders, manage positions. No private key handling. Use when the user wants to bet on event outcomes (e.g. "buy YES at 0.65 on the ceasefire market", "what are my open positions", "close my Trump bet").