Skip to main content
During development, you can use the developer endpoints without an API key. For production use, request an API key for higher rate limits.
This recipe sends a SOL → USDC order on DFlow: request an order, sign the returned transaction, and submit it through your RPC.
The v1 example below will work once the v1 transaction format is activated on mainnet. Until then, use the v0 tab. See the v1 migration guide for details.
Classic @solana/web3.js can’t sign or send v1 transactions (it can only read them back). This flow uses @solana/kit 8.0.0+ instead, which has a different API shape than the rest of this site’s recipes.
1

Set up

Imports, env config, and the wallet/RPC client used across every step.
2

Request an order

GET /order returns a quote and a base64-encoded transaction in one call. Pass userPublicKey so DFlow can construct the transaction for you to sign, and transactionVersion to opt into v1.
3

Sign and submit

Decode the returned wire transaction, sign it with the user’s keypair, and submit it through your RPC.

Spot Trading

How spot trading works on DFlow, and when the intent-based path makes sense.

Add Platform Fees

Monetize trades with builder fees.

Add Priority Fees

Control execution speed with priority fees.

Authenticate Requests

Authenticate requests for production rate limits.

API Routes