Developer Docsv1
OpenFlow DEX API
Swap any token at best price across EVM chains. Non-custodial, no account needed.
2.5 bps feeNo auth for quotesNon-custodialSolana + EVM
Base URL
https://api.openflow.network/gwAll endpoints are prefixed with this URL. You can proxy through /gw if self-hosting.
1. Get a quote
Query parameters
Example
curl "https://api.openflow.network/gw/dex/quote?inputMint=SOL&outputMint=USDC&amount=1000000000"Response
{
"quoteId": "b3e2f1a0-...",
"inputAmount": "1000000000",
"outputAmount": "148210432",
"priceImpact": 0.0021,
"executionChain": "solana",
"routes": [{ "pool": "HJPjoWUr...", "protocol": "orca_whirlpool" }],
"fee": { "bps": 2.5, "amount": "37052" },
"validUntil": "2026-07-07T21:30:00Z"
}2. Build the transaction
Request body
Example
curl -X POST https://api.openflow.network/gw/dex/swap/build \
-H "Content-Type: application/json" \
-d '{ "quoteId": "b3e2f1a0-...", "userWallet": "YourWalletAddress" }'Response
{
"chain": "solana",
"txBase64": "AQAAA...",
"approvalTxBase64": null,
"minOutputAmount": "147469",
"expectedOutput": "148210432",
"validUntil": "2026-07-07T21:30:00Z"
}3. Sign and submit
txBase64 is a serialised unsigned transaction. Have your user sign and submit — OpenFlow is never involved.
EVM (wagmi)
import { useSendTransaction } from "wagmi";
const { sendTransaction } = useSendTransaction();
if (built.approvalTxBase64) {
await sendTransaction({ to: routerAddress, data: built.approvalTxBase64 });
await new Promise(r => setTimeout(r, 2000));
}
await sendTransaction({ to: routerAddress, data: built.txBase64 });4. Confirm the swap
Request body
Other endpoints
Fees & integrator revenue
Every swap charges 2.5 basis points (0.025%) of output. Pass a feeRecipient and 60% goes to your wallet automatically.
Rate limits
GET /dex/quote — 10 req/s per IP, no auth.POST /dex/swap/build — same limit, no auth.POST /dex/swap — requires API key (server-side execution).