API Reference

Complete documentation for all DexFlow API endpoints

Authentication

All API requests require an API key passed in the X-API-Key header.

bash
curl https://dexflow.dev/api/v1/quote?from=ETH&to=USDC&amount=1000000000000000000 \
  -H "X-API-Key: sk_live_your_api_key_here"

Get Best Quote

GET/api/v1/quote

Query Parameters

fromrequired

Source token symbol (e.g., ETH, USDC, WBTC)

torequired

Destination token symbol

amountrequired

Amount in wei (e.g., 1000000000000000000 for 1 ETH)

Example Request

bash
curl "https://dexflow.dev/api/v1/quote?from=ETH&to=USDC&amount=1000000000000000000" \
  -H "X-API-Key: sk_live_your_key"

Example Response

json
1{
2 "success": true,
3 "data": {
4 "bestRoute": {
5 "dex": "Uniswap V3",
6 "amountOut": "3245678900",
7 "price": "3245.67",
8 "priceImpact": "0.12%",
9 "estimatedGas": "180000"
10 },
11 "allRoutes": [...],
12 "mevProtection": {
13 "riskLevel": "low",
14 "priceImpact": 0.12,
15 "recommendations": [...]
16 },
17 "cached": false
18 }
19}

Batch Quotes

POST/api/v1/batch-quote

Request Body

json
1{
2 "quotes": [
3 { "from": "ETH", "to": "USDC", "amount": "1000000000000000000" },
4 { "from": "ETH", "to": "DAI", "amount": "1000000000000000000" },
5 { "from": "WBTC", "to": "USDC", "amount": "100000000" }
6 ]
7}

Tier Limits: Free: 5, Pro: 10, Bot: 20, Enterprise: 50 quotes per request

Flash Loan Opportunities

GET/api/v1/flash-loansBot/Enterprise

Example Response

json
1{
2 "success": true,
3 "data": {
4 "arbitrage": {
5 "profitable": true,
6 "buyDex": "Uniswap V2",
7 "sellDex": "SushiSwap",
8 "buyPrice": "3200.50",
9 "sellPrice": "3250.75",
10 "netProfit": 125.50,
11 "executable": true
12 }
13 }
14}

Gas Price

GET/api/v1/gas-price
json
1{
2 "success": true,
3 "data": {
4 "gasPrice": "25000000000",
5 "gasPriceGwei": "25",
6 "estimatedCosts": {
7 "transfer": "$1.25",
8 "swap": "$8.50",
9 "approve": "$2.10"
10 }
11 }
12}

Rate Limits

60/min
Free
300/min
Pro
1000/min
Bot
5000/min
Enterprise

Error Codes

400
Bad Request

Invalid parameters or missing required fields

401
Unauthorized

Invalid or missing API key

429
Rate Limit Exceeded

Too many requests, check X-RateLimit-Reset header

500
Internal Server Error

Something went wrong on our end