Documentation Index
Fetch the complete documentation index at: https://pond.dflow.net/llms.txt
Use this file to discover all available pages before exploring further.
During development, you can use the developer endpoints without
an API key. For production use, you’ll need an API key to avoid
rate limits.
Priority fees only affect when a trade executes. They do not change routing,
slippage checks, or trade semantics (what priority fees do not affect).
How DFlow handles priority fees details the two modes.
Choose your priority fee mode
Apply priority fees to your request
Imperative (Order)
Declarative (Intent)
Set prioritizationFeeLamports on the /order request as either a lamport
value or one of auto, medium, high, veryHigh, disabled.Max Priority Fee (auto/level)
const queryParams = new URLSearchParams();
queryParams.append("inputMint", SOL);
queryParams.append("outputMint", USDC);
queryParams.append("amount", amount.toString());
queryParams.append("userPublicKey", keypair.publicKey.toBase58());
queryParams.append("slippageBps", "50");
// Adaptive fee chosen by the server.
queryParams.append("prioritizationFeeLamports", "high");
// Or use automatic selection:
// queryParams.append("prioritizationFeeLamports", "auto");
const orderResponse = await fetch(
`${API_BASE_URL}/order?${queryParams.toString()}`
).then((x) => x.json());
Exact Priority Fee (lamports)
const queryParams = new URLSearchParams();
queryParams.append("inputMint", SOL);
queryParams.append("outputMint", USDC);
queryParams.append("amount", amount.toString());
queryParams.append("userPublicKey", keypair.publicKey.toBase58());
queryParams.append("slippageBps", "50");
// Fixed priority fee in lamports.
queryParams.append("prioritizationFeeLamports", "20000");
const orderResponse = await fetch(
`${API_BASE_URL}/order?${queryParams.toString()}`
).then((x) => x.json());
For intents, set feeBudget on the /intent request to your desired
priority fee plus the 10,000 lamport base processing fee.Exact Priority Fee (feeBudget)
const desiredPriorityFeeLamports = 20_000;
const baseProcessingFeeLamports = 10_000;
const feeBudget = desiredPriorityFeeLamports + baseProcessingFeeLamports;
const queryParams = new URLSearchParams();
queryParams.append("inputMint", SOL);
queryParams.append("outputMint", USDC);
queryParams.append("amount", amount.toString());
queryParams.append("userPublicKey", keypair.publicKey.toBase58());
queryParams.append("slippageBps", "50");
queryParams.append("feeBudget", feeBudget.toString());
const intentResponse = await fetch(
`${API_BASE_URL}/intent?${queryParams.toString()}`
).then((x) => x.json());
API Routes
Cookbook Repository
This recipe, along with many more, is available in the
DFlow Cookbook Repo. You can
clone it and start coding immediately.