dflow

Integrate DFlow spot swaps and prediction market trading APIs on Solana.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill dflow-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dflow
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/dflow
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill dflow-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @solana/web3.js, @solana/spl-token, @phantom/react-sdk, ws, bs58, and includes references (resource) components.

What problem does it solve? AI agents and developers lack accurate, up-to-date knowledge of DFlow's trading APIs on Solana, leading to incorrect endpoints, wrong token mints, and failed swap or prediction market integrations. ## Core Features & Use Cases - Swap API Integration: Execute imperative and declarative token swaps via the Order, Quote, and Swap endpoints with slippage, priority fee, and Jito MEV protection configuration. - Prediction Market Trading: Query events, markets, orderbooks, and trades through the Metadata API, and trade YES/NO outcome tokens with dedicated slippage parameters. - Real-Time Streaming: Subscribe to price, orderbook, and trade updates over WebSocket for live market monitoring. - Use Case: Build a trading bot that fetches a quote for a SOL-to-USDC swap, signs the returned VersionedTransaction, monitors async order status, and streams prediction market prices in real time. ## Quick Start Use the dflow skill to write TypeScript code that gets a quote and executes a swap of 1 SOL to USDC through the DFlow Order API.

Frequently Asked Questions about dflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute a token swap with the DFlow API on Solana?

Call GET /order on quote-api.dflow.net with inputMint, outputMint, amount, and userPublicKey to receive a base64 transaction. Deserialize it as a VersionedTransaction, sign it with your keypair, and send it via a Solana Connection.

What is the difference between imperative and declarative swaps in DFlow?

Imperative swaps give full route control at signing time using the /quote and /swap endpoints. Declarative swaps use intent-based execution via /intent and /submit-intent, deferring route optimization to execution time for better pricing and MEV protection.

How do I trade prediction market outcome tokens with DFlow?

Query the Metadata API at api.prod.dflow.net to get a market's yes_mint or no_mint address, then use the Trade API's /order endpoint with that mint as input or output. Set predictionMarketSlippageBps for separate prediction market slippage control.

Does the DFlow API require an API key?

Most endpoints accept requests without a key but limit you to roughly 10 requests per minute. Passing an API key in the x-api-key header, obtained at pond.dflow.net/build/api-key, provides higher rate limits for production use.

Why is my DFlow async order stuck in pending status?

Async orders move through pending, open, and pendingClose states before closing. Poll GET /order-status with the transaction signature every few seconds; if it returns expired or failed, retry with a higher prioritization fee.

Can I use DFlow swaps with the Phantom wallet?

Yes, connect Phantom via @phantom/react-sdk or the window.phantom.solana provider, then pass the wallet public key to the /order endpoint. Deserialize the returned transaction and submit it with provider.signAndSendTransaction.